duplicate-data

How to count duplicates in Ruby Arrays

How do you count duplicates in a ruby array? For example, if my array had three a's, how could I count that ...

What's causing duplicate character entry in my web form textboxes in IE?

We have a fairly robust ASP.NET app using quite a bit of AJAX, jQuery & CSS. After opening a new instance of the browser using CTRL+N, when entering data into textboxes, if users want to enter "foobar" it dups every key they hit. So they get "ffoooobbaarr" instead. We're not able to isolate this to a consistent debugging environment th...

obj-c duplicate symbol for header variable

It was my impression that using #import would only import a file once per build, yet after trying to define a variable in a header, and then importing that header in two different source files, I get a duplicate symbol linker error for the variable. How is this possible? ...

SQL find duplicate records occuring within 1 minute of each other

I am checking website entrys that are recorded in a database columns: browser, click_type_id, referrer, and datetime if multiple rows have the same browser, click_type_id, and referrer and are timestamped (occur within 1 minute of one another) they are considered a duplicate. I need a sql statement that can query for these duplicates ...

What algorithm should be used when doing filechecksums to find dupes?

Is taking a MD5 sum still suitable for checking for file dupes? I know that it isn't secure, but does that really matter in the case of trying to find file dupes? Should I be using something in the SHA family instead? What is best practice in this use case? ...

DataDeduplication idea

Good morning Just built a small Data De-duplication chunk of code in C# and want to check if anyone has done something simular before, and if so, how? is there publicly available code for this? The code i wrote is on GitHub at http://gist.github.com/273880. At the moment, there is no physical backing store, and no way of storing what...

Is it possible for SQL to find records with duplicates?

Can I use a SQL query to find records where one field is identical in both? That is, can I use the following table and return 1,3 (the ids) by comparing the name columns (and ignoring the phone)? ID | Name | Phone 1 | Bob | 5555555555 2 | John | 1234567890 3 | Bob | 1515151515 4 | Tim | 5555555555 ...

Finding duplicate rows in SQL Server

I have a SQL Server database of organizations, and there are many duplicate rows. I want to run a select statement to grab all of these and the amount of dupes, but also return the ids that are associated with each organization. A statement like: SELECT orgName, COUNT(*) AS dupes FROM organizations GROUP BY orgName ...

mysql duplicate data deletion

This shows me all the first names and last names that have exactly two entries that are identical SELECT `firstname`,`lastname`,COUNT(*) AS Count FROM `people` GROUP BY `firstname`,`lastname` HAVING Count = 2 How do I turn this into a DELETE FROM WHERE statement with a LIMIT to only remove one of each of the entries and leave the o...

Abstracting NSManagedObject and NSDictionary

In my project I have some objects that I show from a server, lets call them Foo's. When I get my Foo feed, I parse them into a NSMutableDictionary subclass called RemoteFoo, and pass these RemoteFoo objects all around the app to display data. If the user ends up wanting to download a RemoteFoo, I then create a core-data NSManagedObject...

How can I look for the duplicate values in a certain field in a spreadsheet ?

Hello I have an excel file and I wanna look for the duplicate values in a certain field like a list of email accounts. Like making them to be formatted the same or something like that. Do you know how to that ? ...

Remove duplicates from an array of objects in javascript

I have an object that contains an array of objects. things = new Object(); things.thing = new Array(); things.thing.push({place:"here",name:"stuff"}); things.thing.push({place:"there",name:"morestuff"}); things.thing.push({place:"there",name:"morestuff"}); I'm wondering what is the best method to remove duplicate objects from an arr...

Forward a copy of http requests to another (test) environment

I want all the production data for my web-app to also flow through my testing environment. Essentially, I want to forward every http request for the production site to the test site (and also have the production website serve it!). What is a good way to do this? My site is built with Django, and served by mod_wsgi. Is this best implem...

Avoiding Duplicate Data in DB (for use with Rails)

I have five tables that I am trying to get to work nicely together but may need some help. I have three main tables: accounts members and roles. With two join tables account_members and account_member_roles. The accounts and members table are joined by account_members (fk account_id and member_id) table. The other 2 table...

How to remove the quoted text from an email and only show the new text

I am parsing emails. When I see a reply to an email, I would like to remove the quoted text so that I can append the text to the previous email (even if its a reply). Typically, you'll see this: 1st email (start of conversation) This is the first email 2nd email (reply to first) This is the second email Tim said: This is the firs...

Finding duplicate files by content across multiple directories

I have downloaded some files from the internet related to a particular topic. Now I wish to check if the files have any duplicates. The issue is that the names of the files would be different, but the content may match. Is there any way to implement some code, which will iterate through the multiple folders and inform which of the files...

Remove duplicates from generic list<T>

Hi, I have came with solution to remove duplicates from generic list<T> in .NET 2.0 as follows: List<CaseStudy> caseStudies = CaseStudyDAO.FindCaseStudiesByDate(DateTime.Now.Date, DateTime.Now.Date.AddDays(1)); caseStudies.RemoveAll( delegate(CaseStudy c) { return caseStudies.IndexOf(c) != caseStudies.FindIn...

sql-server: how to select from dupilcate rows from table?

Hi All, I have the following table. CREATE TABLE TEST(ID TINYINT NULL, COL1 CHAR(1)) INSERT INTO TEST(ID,COL1) VALUES (1,'A') INSERT INTO TEST(ID,COL1) VALUES (2,'B') INSERT INTO TEST(ID,COL1) VALUES (1,'A') INSERT INTO TEST(ID,COL1) VALUES (1,'B') INSERT INTO TEST(ID,COL1) VALUES (1,'B') INSERT INTO TEST(ID,COL1) VALUES (2,'B') I ...

How to delete duplicate records in MySQL by retaining those fields with data in the duplicate item but not in the original item?

I have few thousands of records with few 100 fields in a MySQL Table. Some records are duplicates and are marked as such. Now while I can simply delete the dupes, I want to retain any other possible valuable non-null data which is not present in the original version of the record. Hope I made sense. For instance : a b c d e f key dupe...

How to compare 2 lists and merge them in Python/MySQL?

I want to merge data. Following are my MySQL tables. I want to use Python to traverse though a list of both Lists (one with dupe = 'x' and other with null dupes). This is sample data. Actual data is humongous. For instance : a b c d e f key dupe -------------------- 1 d c f k l 1 x 2 g h j 1 3 i h u u 2 4 u r t 2 x ...