I would like to know if compression algorithms always generate unique output for two different sets of files.
Say, I have two files A and B, and say I am applying a compression algorithm (for instance like PKZIP - this could be any compression algorithm) for each of these files to get A.zip and B.zip respectively. Is it possible for A.z...
I have a large list of integers that are sent to my webservice. Our business rules state that these values must be unique. What is the most performant way to figure out if there are any duplicates? I dont need to know the values, I only need to know if 2 of the values are equal.
At first I was thinking about using a Generic List of i...
I rarely work with xslt's so I'm not the greatest at it, but, I was wondering how to go about solving this problem:
<Element>
<childElement type="type1">Bob</childElement>
<childElement type="type1">Smith</childElement>
<childElement type="type2">Bob</childElement>
</Element>"
I want to enforce @type uniqueness, where I would...
I have a list of strings, I need to be able to simply probe if a new string is in the table or not. When the list is large, testing a simple list directly is pretty inefficient... so typically I use a Dictionary to get constant lookup speeds, although I don't actually care about the value. This seems like a misuse of a dictionary, so I'm...
What is the best way to check if an image is unique using PHP? Say I have a directory of about 30 images (about 500*500 pixels), and someone uploads another picture, what is a good way to check if the uploaded image is not yet in the directory?
Is there some sort of way to create hash's of images which can be easily compared? I then cou...
Hi everyone,
Is there any way I can validate a value updated in a Core Data entity's property against values of the property in other entities in the collection?
At the moment I create an entity with some default values, add it to arrangedObjects, then get the user to modify the various property values. However, I would like to check a...
I am making a Viewer model with
belongs_to :users
belongs_to :orders
that joins the models Users and Orders with a :has_many :through => :viewers.
And the Viewer model has the attributes of user_id and order_id.
How would I set it up so that new viewers are only accepted if both user_id and order_id are unique in the same row? I re...
I have following association
class Employee
include Mongoid::Document
employee_id :name
references_many :companies, stored_as => :array, :inverse_of => :employees
end
class Company
include Mongoid::Document
field :name
references_many :employees, stored_as => :array, :inverse_of => :companies
end
Now How can I check the uni...