unique

IQ and aptitude

Does IQ and any specific aptitude have a bearing on whether or not someone can become a good software developer? It seems to me that SE are mostly clever folks and love theoretical problems. Does it mean if you have a low IQ or are horrendous at logical puzzles that you would suck at Software development? In your experience. ...

XSL: Combining grouping and call-template

Hello, I've read with interest the techniques available on the web to extract a unique list of items from a XML file containing duplicates using XSL. These range into 2 categories: 1) The Muenchian method (example: http://www.jenitennison.com/xslt/grouping/) 2) Or the previous-sibling look-up These both rely on an XPath expression to s...

Is the SetUp.exe file unique for Deployment Package?

Someone asked me this today after a failed file move, and I was not sure what to tell them. When you build a .NET deployment package you get the setup.exe and the .msi files. I know that the .msi file is needed... but for the setup.exe, is that unique? Meaning, can we just move the .msi file and be fine, or do we need to keep the two to...

django unique for each date

Hello First of all let me show you my model: class ChannelStatus(models.Model): channel = models.ForeignKey(Channel,unique_for_date="date") date = models.DateField() platform = models.ManyToManyField(Platform) Right now, when I want to make an ChannelStatus entry, there cant be more than one entry which is t...

Is it possible to set a unique constraint as a foreign key in another table?

Is it possible to set a unique constraint as a foreign key in another table? If yes, how would you go about declaring it? How would you go about assigning a candidate key? Is it possible? Sorry, I'm a real noob at oracle. Example: I have a product table that consists of: prod_id, prod_name, prod_price, QOH Where I want prod_name to ...

Hibernate - renaming objects with a unique constraint.

Say you have a bunch of Article objects, with a "title" property. Then there's an ARTICLE table with a TITLE column. The TITLE column has a unique constraint. The UI shows all the articles on one page, with a text field for editing the title. Imagine a situation where you have two articles X & Y, X having the title "1" and Y having the...

Derby - Obtain column list of uniqueness constraint

I 'RTFM' and did not find a way to retrieve the columns involved in a unique constraint for a given schema and table. Somewhere I read that there should be an implicitly created unique index, which backs the unique constraint. Its name is supposed to be equal to the name of the conglomerate that corresponds to the unique constraint. So...

Unique Constraint on two fields and their reverse

Hello, The problem is the following, I have a table of friendships in my database, the friendship table has two foreign keys to the users table. I want to set a unique key on the two foreign keys so that I will have no duplicates, but I want more, I want that if user A added user B, then B won't be able to add A, and I want to have on...

Getting all unique Items in a C# list

Hey all, What is the fasters / most efficient way of getting all the unique items out of a C# list? I have List that possiably has multiple repeating items in it and only want the unique values within the list. Thanks ...

C# non-persistent `static` keyword?

Hi, I come from a C/C++ background and am having trouble doing some things in C#. My problem right now is that I need a static keyword that works like in C++. So that the property is global to all instances of the class, which is what C#'s does. But what I don't want is the persistence in C#(/ASP.NET). I want the static property global t...

strange behavior of php array_unique

I'm using following peace of code to output an array: echo "======output without array_unique====="; var_dump($selected); echo "=====output with array_unique====="; var_dump(array_unique($selected));die; And the output is: ======output without array_unique===== array 0 => array 'uri' => string 'http://localhost/conferen...

How to find where I have a duplicate control ID (C#)

Hi, I am creating huge amounts of dynamic controls, and for everything that must have an ID assigned, I assign it using a guaranteed unique variable(unless 64bits overflows from just controls). Now, I have a problem though. I have a duplicate control somewhere and I can not discover where it is added or anything because it doesn't happe...

PHP MYSQL multiple or single DISTINCT/UNIQUEvalues

Currently I have this query: SELECT column1,column2 FROM table column1 needs to be distinct, column2 does not. SELECT DISTINCT column1, NON-DISTINCT column2 FROM table Now I know that doesn't make sense but I need column1 to be distinct and column2 to be anything. How would I do that. ...

Httpruntime cache keys not unique?

Although i have specified a unique key, it seems the following code will return one value for 5 requests, then another for the next couple, then revert back to the value saved in the original request and just continue until there are 10's of different objects all stored under the same key. It then seems almost random which of these value...

Having a problem utilizing xs:unique

Can anyone point me as to why the unique element in my XSD is not forcing unique-ness? This should throw an error because the last ScreenResult element does not contain a unique value for the Type attribute. I should also note that I'm truly after forcing one of each Type within ScreenResults (ScreenResult is required to exist 3 times,...

How to make elements of vector unique? (remove non adjacent duplicates)

I have a vector containing few non-adjacent duplicates. As a simple example, consider: 2 1 6 1 4 6 2 1 1 I am trying to make this vector unique by removing the non-adjacent duplicates and maintaining the order of elements. Result would be: 2 1 6 4 The solutions I tried are: Inserting into a std::set but the problem with this a...

MySQL: grab one row from each category, but remove duplicate rows posted in multiple categories

Hi all. I have a database of articles, which are stored in categories. For my homepage, I want to grab an article from each category (I don't care which). However, some articles are crossposted to multiple categories, so they come up twice. I have a table called tblReview with the article fields (reviewID, headline, reviewText) and a ...

SQL Select Entire Row by Distinct Columns

Hello, I need an sql statement which will allow me to select an entire row from oracle database, but by distinct columns. Here is a simplified database: Project_Num Title Category 0 Project 1 Admin 0 Project 1 Development 1 Project 2 Admin 2 Pro...

Java ( Counting Distinct Integers )

how do you return number of distinct/unique values in an array for example int[] a = {1,2,2,4,5,5}; ...

SimpleModal Basic Modal Dialog: how to open unique windows within the same page?

Hi there, I'm using the SimpleModal Basic Modal Dialog and am having trouble using it to open more than one unique window on a page (I don't need them to open at the same time or on top of one another). I tried adding another class and calling out that class in my js file, but I'm not getting it. Here is my example page, where I have t...