Search Results

Search found 4640 results on 186 pages for 'unique'.

Page 7/186 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • excel / open office - append an incrementing value to all non-unique fields

    - by mheavers
    I have a large table of about 7500 store names. I need to search through those names and, if they are not unique, append an incrementing value, for example: store_1 store_2 etc. Anyone know how to do this? For another project, I was using this: =J1&IF(COUNTIF($J$1:J1,J1)1,COUNTIF($J$1:J1,J1),"") but in open office this gives an error, and in google spreadsheets, it times out because my database is so big. Any suggestions?

    Read the article

  • NHibernate Unique Constraint on Name and Parent Object fails because NH inserts Null

    - by James
    Hi, I have an object as follows Public Class Bin Public Property Id As Integer Public Property Name As String Public Property Store As Store End Class Public Class Store Public Property Id As Integer Public Property Bins As IEnumerable(Of Bin) End Class I have a unique constraint in the database on Bin.Name and BinStoreID to ensure unique names within stores. However, when NHibernate persists the store, it first inserts the Bin records with a null StoreID before performing an update later to set the correct StoreID. This violates the Unique Key If I persist two stores with a Bin of the same name because The Name columns are the same and the StoreID is null for both. Is there something I can add to the mapping to ensure that the correct StoreID is included in the INSERT rather than performing an update later? We are using HiLo identity generation so we are not relying on DB generated identity columns Thanks James

    Read the article

  • Unique JQuery Events for a Class

    - by Daniel Macias
    I am trying to create a class that can send a unique jQuery event. Example: function Bomb(id) { this.evnt = $.Event("BOOM!_" + id); this.detonate = function() { $(document).trigger(evnt); }; } var firecracker = new Bomb(); var nuclearbomb = new Bomb(); $(document).bind(firecracker.evnt.type, function(){ // It's the fourth of july!!! }); $(document).bind(nuclearbomb.evnt.type, function(){ // We're dead }); firecracker.detonate(); nuclearbomb.detonate(); How can I create a unique event within the Bomb class without having to pass in an ID to create a unique event string for the class?

    Read the article

  • add ANOTHER primary key to a table which is UNIQUE

    - by gdubs
    so im having problems with adding another primary key to my table. i have 3 columns: 1. Account ID (Identity) 2. EmailID 3. Data field when i made the table i had this to make the Account ID and the Email ID unique PRIMARY KEY (AccountID, EmailID) i thought that would make my emailid unique, but then after i tried inserting another row with the same emailid it went through. so i thought i missed something out. now for my question: IF, i had to use alter, How do i alter the table/PK Constraint to modify the EmailID field and make it Unique IF i decided to drop the table and made a new one, how do i make those two primary keys uniqe? Thanks a bunch!!

    Read the article

  • Storing unique ID in UITableViewCell

    - by culov
    I have a table where there will often be two cells with the same title. I'm zooming in on a map whenever a cell in the table is clicked, so using the title as a unique identifier is out of the question. I already have a unique identifier, but I need to find a way to store it in a UITableViewCell object. I have been considering two options, both of which are poor, IMO. 1) store the unique ID as the text inside the text of the detailTextLabel property. 2) build a custom UITableViewCell class. I'm new to objective C, and I would essentially like to know if theres a third option that isnt as inefficient as #1, but not as involved as #2. Thanks

    Read the article

  • Shell Script- each unique user

    - by Dinis Monteiro
    Hi guys I need "for each unique user, report which group they are a member of and when they last logged in" so i have: #!/bin/sh echo "Your initial login:" who | cut -d' ' -f1 | sort | uniq echo "Now is logged:" whoami echo "Group ID:" id -G $whoami case $1 in "-l") last -Fn 10 | tr -s " " ;; *) last -Fn 10 | tr -s " " | egrep -v '(^reboot)|(^$)|(^wtmp a)|(^ftp)' | cut -d" " -f1,5,7 | sort -uM | uniq -c esac My question is: how i can show the each unique user? the script above only show the more recent user logged in the system, but i need all unique users. anyone can help? thanks

    Read the article

  • Excel - Counting unique values that meet multiple criteria

    - by wotaskd
    I'm trying to use a function to count the number of unique cells in a spreadsheet that, at the same time, meet multiple criteria. Given the following example: A B C QUANT STORE# PRODUCT 1 75012 banana 5 orange 6 56089 orange 3 89247 orange 7 45321 orange 2 apple 4 45321 apple In the example above, I need to know how many unique stores with a valid STORE# have received oranges OR apples. In the case above, the result should be 3 (stores 56089, 89247 and 45321). This is how I started to try solving the problem: =SUM(IF(FREQUENCY(B2:B9,B2:B9)>0,1)) The above formula will yield the number of unique stores with a valid store#, but not just the ones that have received oranges or bananas. How can I add that extra criteria?

    Read the article

  • Grails Unique Constraint for Groups

    - by WaZ
    Hi there, I have the following requirement I have 3 domains namely: class Product { String productName static constraints = { productName(unique:true,blank:false) } class SubType { String subTypeName static constraints = { subTypeName(unique:true,blank:false) } String toString() { "${subTypeName}" } } class CLType { String TypeName static belongsTo = Car static hasMany = [car:Cars] static constraints = { } String toString() { "${TypeName}" } class CLines implements Serializable { Dealer dealer CLType clType SubType subType Product product static constraints = { dealer(nullable:false,blank:false,unique:['subType','product','clType']) clType(blank:false,nullable:false) subType(nullable:true) product(nullable:true) } } I want to achieve this combination: A user can assign dealer a CLType. But cannot have duplicates. As an example consider this scenario Please let me know what to mention in my unqiue constraint to make this possible? Thanks, Much Appreciated.

    Read the article

  • Grails: Duplicates & unique constraint validation

    - by rukoche
    OK here is stripped down version of what I have in my app Artist domain: class Artist { String name Date lastMined def artistService static transients = ['artistService'] static hasMany = [events: Event] static constraints = { name(unique: true) lastMined(nullable: true) } def mine() { artistService.mine(this) } } Event domain: class Event { String name String details String country String town String place String url String date static belongsTo = [Artist] static hasMany = [artists: Artist] static constraints = { name(unique: true) url(unique: true) } } ArtistService: class ArtistService { def results = [ [ name:"name", details:"details", country:"country", town:"town", place:"place", url:"url", date:"date" ] ] def mine(Artist artist) { results << results[0] // now we have a duplicate results.each { def event = new Event(it) if (event.validate()) { if (artist.events.find{ it.name == event.name }) { log.info "grrr! valid duplicate name: ${event.name}" } artist.addToEvents(event) } } artist.lastMined = new Date() if (artist.events) { artist.save(flush: true) } } } In theory event.validate() should return false and event will not be added to artist, but it doesn't.. which results in DB exception on artist.save() Although I noticed that if duplicate event is persisted first everything works as intended. Is it bug or feature? :P

    Read the article

  • Unique number identifier generation

    - by xwrs
    I have to create logic for generation unique number identifier for records in database. id, generated in database is a separate column. At this moment, when user calls "create record" action, I save new record, get its database id, generate record number using this id, then put it to the edit form. Using this way means that all entity fields should be nullable to save record to database. I don't like this way. I know that should be better way. Is there a better practice to generate unique number identifier? What is possibility of generating non-unique random numbers? Thank you

    Read the article

  • Excel: count number of unique/distinct row in range with condition

    - by Bertvan
    I have a an excel sheet with: in Col A: week numbers in Col B: dates (timesheet entries) I need to know the number of days worked for each week, so I need to the number of unique date entries per week number. I found formula's (both array as non-array) that handle this for a fixed range, but I want to have the results in another column per week number. So, the result of the added dataset below would be (the colon is just for clarity): 14: 2 15: 3 17: 6 20: 2 21: 3 If this is the source data: 14: 4/04/2012 14: 4/04/2012 15: 10/04/2012 15: 10/04/2012 15: 11/04/2012 17: 26/04/2012 17: 26/04/2012 17: 26/04/2012 17: 26/04/2012 17: 27/04/2012 17: 27/04/2012 20: 14/05/2012 20: 14/05/2012 21: 23/05/2012 21: 23/05/2012 21: 25/05/2012

    Read the article

  • AD Custom Attribute with unique value

    - by Zilog
    I have custom AD attribute added to my AD schema. Attribute's syntax is Unicode String. It is added to user class and the purpose of it is to store user ID of corporate ERP system. Problem is, that I can have two or more user objects with the same value stored in that attribute, which is something that I would like to avoid. Is there a way to configure AD attribute so it is unique within the domain boundary? (The same behavior as SAMAccountName attribute.) i.e : If there already exists user object in AD with this attribute set to "JSmith" and I try to set that attribute with the same value for another user, Direcory Services will refuse to update that object and give me "already exists" error. Domain functional level is windows 2003.

    Read the article

  • Unique string values in range

    - by Dean Smith
    I have some spreadsheets where there are large number of cells that have essentially been used for free text. There is a finite set of values for this free text and most, if not all repeat. eg. A B C D 1 Monkey Gorilla Cat Dog 2 Dog Cat Gorilla Gorilla 3 Dog Dog Dog Cat There are probably 50 or so different cell values spread over multiple sheets and hundreds of rows and columns. I need to analyse this data and count occurancies, which is not a problem other than getting a list of unique values to start with and this has been driving me up the wall. What is the best way to produce this list. So from the above we would have Monkey Dog Cat Gorilla In order of preferred solutions, as this will need to be done monthly. Dynamic formula based VB Script Other ( Advanced filtering or other manual steps )

    Read the article

  • rename multiple files with unique name

    - by psaima
    I have a tab-delimited list of hundreds of names in the following format old_name new_name apple orange yellow blue All of my files have unique names and end with *.txt extension and these are in the same directory. I want to write a script that will rename the files by reading my list. So apple.txt should be renamed as orange.txt. I have searched around but I couldn't find a quick way to do this.I can change one file at a time with 'rename' or using perl "perl -p -i -e ’s///g’ *.txt", and few files with sed, but I don't know how I can use my list as input and write a shell script to make the changes for all files in a directory. I don't want to write hundreds of rename command for all files in a shell script. Any suggestions will be most welcome!

    Read the article

  • PHP: why uniqid returned value is only 13 digits long

    - by Marco Demaio
    uniqid() function returns a 13 digits long hexadecimal number. According to the spec in php.net site, the function uses microtime to generate the unique value. But microtime returns numbers in string format as the following one: "0.70352700 12689396875" which are basically the microseconds and the seconds elapsed since 1970. This is a 9+11 digits decimal number. Converting a 20 decimal number into hex would result in a 16 digits hexadecimal NOT a 13 digits one. I also thought to take out the "0." part that seem to never change, and the last two digits of the microsec part that seem to remain always "00". Doing this the decimal number would be only 9+11-3 digits long, but still a decimal number of 17 digits when converted into hex would result in 14 digits hexadecimal number NOT 13. You probably think I'm crazy in asking such a thing, but I'm concerned about using uniqid, unique values are important to be unique, a duplicated value could screw up an entire application.

    Read the article

  • mysql retrieve duplicate entry

    - by Cypher
    I have a huge text file that I'm importing into a mysql database. The four important tables that I'm using are -- schools (id,name) variables (id, name) var_entries (id, var_id, data) with unique( var_id, data) data (id, school_id, var_ent_id) I have a file that I'm importing into this database. I want every variable to have a unique set of values (hence the unique call) but I also then want to associate the appropriate var_entrie with a school in data. So my question is is there a way to get the appropriate var_ent_id when you a duplicate var_entry is added? I know I can do this with storing the values and using a strcmp but it'd be messy.

    Read the article

  • Catching constraint violations in JPA 2.0.

    - by Dennetik
    Consider the following entity class, used with, for example, EclipseLink 2.0.2 - where the link attribute is not the primary key, but unique nontheless. @Entity public class Profile { @Id private Long id; @Column(unique = true) private String link; // Some more attributes and getter and setter methods } When I insert records with a duplicate value for the link attribute, EclipseLink does not throw a EntityExistsException, but throws a DatabaseException, with the message explaining that the unique constraint was violated. This doesn't seem very usefull, as there would not be a simple, database independent, way to catch this exception. What would be the advised way to deal with this? A few things that I have considered are: Checking the error code on the DatabaseException - I fear that this error code, though, is the native error code for the database; Checking the existence of a Profile with the specific value for link beforehand - this obviously would result in an enormous amount of superfluous queries.

    Read the article

  • VB.net Unique Hardware ID ideas

    - by xzerox
    I was wondering if there would be anything else I could use in my Hardware ID protection that would make it much more unique. I am currently using Processor ID Volume ID Mac Address Graphics Card Name If you guys can provide source codes to anything else that would make it even more unique please tell me.

    Read the article

  • Reliable way of generating unique hardware ID

    - by mr.b
    Question: what's the best way to accomplish following. I have to come up with unique ID for each networked client, such that: it (ID) should persist once client software is installed on target computer, and should continue to persist if software is re-installed on same computer and same OS installment, it should not change if hardware configuration is modified in most ways (except changing the motherboard) When hard drive with client software installed is cloned to another computer with identical hardware configuration (or, as similar as possible), client software should be aware of that change. A little bit of explanation and some back-story: This question is basically age old question that also touches topic of software copy-protection, as some of mechanisms used in that area are mentioned here. I should be clear at this point that I'm not looking for a copy-protection scheme. Please, read on. :) I'm working on a client-server software that is supposed to work in local network. One of problems I have to solve is to identify each unique client in network (not so much of a problem), so that I can apply certain attributes to every specific client, retain and enforce those attributes during deployment lifetime of a specific client. While I was looking for a solution, I was aware of following: Windows activation system uses some kind of heavy fingerprinting mechanism, that is extremely sensitive to hardware modifications, Disk imaging software copies along all Volume IDs (tied to each partition when formatted), and custom, uniquely generated IDs during installation process, during first run, or in any other way, that is strictly software in its nature, and stored in registry or on hard drive, so it's very easy to confuse two Obvious choice for this kind of problem would be to find out BIOS identifiers (not 100% sure if this is unique through identical motherboard models, though), as that's the only thing I can rely on, that isn't duplicated, transferred by cloning, and that can't be changed (at least not by using some user-space program). Everything else fails as either being not reliable (MAC cloning, anyone?), or too demanding (in terms that it's too sensitive to configuration changes). Am I missing something obvious here? Sub-question that I'd like to ask is, am I doing it correctly, architecture-wise? Perhaps there is a better tool for task that I have to accomplish... Another approach I had in mind is something similar to handshake mechanism, where server maintains internal lookup table of connected client IDs (which can be even completely software-based and non-unique at any given moment), and tells client to come up with different ID during handshake, if duplicate ID is provided upon connection. That approach, unfortunately, doesn't play nicely with one of requirements to tie attributes to specific client during lifetime.

    Read the article

  • hibernate get unique field result

    - by cometta
    i use below to get unique "departmentCode" , but by using distinct, my list only return 'departmentCode' all other fields are not retrieved from table, how to retrieve other fields as well like 'divisionCode' and make sure 'departmentCode' is always unique? DetachedCriteria crit = DetachedCriteria.forClass(Company.class); crit.setProjection(Projections.distinct(Projections.property("departmentCode")));

    Read the article

  • Sqlite table constraint - unique on multiple columns

    - by Rich
    I can find syntax "charts" on this on the sqlite website, but no examples and my code is crashing. I have other tables with unique constraints on a single column, but I want to add a constraint to the table on two columns. This is what I have that is causing a SQLiteException with the message "syntax error". CREATE TABLE name (column defs) UNIQUE (col_name1, col_name2) ON CONFLICT REPLACE I'm doing this based on the following: table-constraint

    Read the article

  • Addthis: Sharing for unique items on page

    - by Espen Arnoy
    I am using addthis (addthis.com) to offer sharing on items listed on a page (stage.hverdagskupp.no). Since each item on the page is unique, I want the shared information to be unique as well. However, facebook and twitter only seems to allow global page information to be shared. Anyone knows how to define item specific sharing information with addthis, for facebook and twitter?

    Read the article

  • Unique partition ID

    - by BlueMan
    I'm looking for same way to get an unique ID of every partition in Win OS. Also for flash drives (SD cards, pendrives, etc.) connected to PC. I think that after formatting they get an unique ID - like MAC, right? Also I want to get other information of that partition - it's name, file system, size, etc.

    Read the article

  • not unique ids in a route in Rails

    - by Victor P
    In a blog in Rails I want to have paths like http://mydomain.com/posts/28383/comments#21 This is the 21st comment of the 28383th post. The 21 is not an unique id, but the pair 28383, #21 is unique. How can I do this in Rails? Do I have to change the routes? the model? I will be very thankful if you can point me in the right direction Thanks

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >