duplicates

Update: using sql to keep only a single record where both name field and address field repeat in 5+ records - Microsoft Access

Hey all, I am trying to delete all but one record from table where name field repeats same value more than 5 times and the address field repeats more than five times for a table. So if there are 5 records with a name field and address field that are the same for all 5, then I would like to delete 4 out of 5. An example: id name address...

Remove Duplicate ID's?

I have a list of 50,000 ID's in a flat file and need to remove any duplicate ID's. Is there any efficient/recommended algorithm for my problem? Thanks. ...

duplicating php resources

are there any way to duplicate the resources produced by functions such as mysql_query? it may sound dumb but i wanted to reuse such resources so that i won't retype the mysql_query() again and again just to use have a resource..like for example $rsrc = mysql_query('SELECT * FROM `table` LIMIT 0,1'); $rows = mysql_fetch_array($rsrc); ...

how itertools.tee works, can type 'itertools.tee' be duplicated in order to save it's "status" ?

All, pls see below test code about itertools.tee: li = [x for x in range(10)] ite = iter(li) ================================================== it = itertools.tee(ite, 5) >>> type(ite) <type 'listiterator'> >>> type(it) <type 'tuple'> >>> type(it[0]) <type 'itertools.tee'> >>> >>> list(ite) ...

removing duplicates in nsarray

Hi friends how can i remove duplicates in nsarray. for instance my array contains following data. I want to compare with adjacent dates to avoid duplicates but it throughs error. Can anyone guide me what i am going wrong calendar first- ( 2010-09-25 17:00:00 GMT, "AAA", 2010-09-25 17:00:00 GMT, "AAA", 2010-09-26 17:00:00 GMT, "BBB"...

Why is CakePHP duplicating my queries? (this is not the same "too many queries" problem that is usually asked)

I've defined these relationships in my models: Lead hasMany Job Job HABTM Employee Job HABTM Truck I'm trying to do a find('all') from my Truck model, and limit the results to: All Trucks, all jobs associated with those trucks that have a certain pickup date, the employees assigned to those jobs, and the lead associated with the jo...

Is there somethin uniquely for JPG files so I can consiredier dupicates

I want to make sample WinForm C# app for hunting duplicate photos on my laptop. My question is is there some record, tag ,Exif data or anything else which is unique for JPG(photo) file. So I can read that data put into data set and hunt for duplicates. ...

JS associative array with duplicate names

ok, so I have an array like: var myarray = { "field_1": "lorem ipsum", "field_2": 1, "field_2": 2, "field_2": 6 }; as you see there are duplicate names in the array, but with different values. If i go through it like (using jQuery): $.each(myarray, function(key, value) { console.log(key); console.log(myarray[key]); ...

Send news feed with the new facebook.php class

Hi i'm new developer of fb apps and i want to know how can i send a message to the wall of my friends using the new facebook.php class http://github.com/facebook/php-sdk I do it this $result = $facebook->api('/me/feed/', 'post', array($ids,'message' => 'Playing around with FB Graph..') ); This code work for the firts time i c...

How to Remove Duplicate Domains from a Large List of URLs? RegEx or Otherwise

I originally asked this question: http://stackoverflow.com/questions/4002115/regular-expression-in-gvim-to-remove-duplicate-domains-from-a-list However, I realize I may be more likely to find a working solution if I "broaden my scope" in terms of what solution I'm willing to accept. So, I'll rephrase my question & maybe I'll get a bett...

More elegant way to check for duplicates in C++ array?

I wrote this code in C++ as part of a uni task where I need to ensure that there are no duplicates within an array: // Check for duplicate numbers in user inputted data int i; // Need to declare i here so that it can be accessed by the 'inner' loop that starts on line 21 for(i = 0;i < 6; i++) { // Check each other number in the ...

Finding duplicates in sorted, linked list.

Hello! I've created a sorted linked list and now I'm trying to figure out how to remove duplicates. I wanted to add code that would do this in the Add method I created but I can't seem to figure it out. I feel like this should be relatively easy but I'm a bit brain dead right now. In my add method I check the index to see where an item ...

MS Access - check sub-form before entry for duplicate

Hi folks, I've got a subform (customersAnswersSub) inside of a main form (customersAnswers). Upon someone entering a new customerAnswersSub entry - I wanted it to check for duplicates first. It has to check across 4 different fields to match first. This is what I've got so far. Private Sub Form_BeforeUpdate(Cancel As Integer) Di...

Removing duplicates members from a list of tuples

Hi, this question might have similars in SO but my case is a bit different. and I tried to adapt those answers to my problem but couldn't. so here is the thing: I have this list : [(['c', 'a', 'b'], 10), (['c', 'a', 'b'], 9),(['h','b'],2)] for example. I want to remove the duplicates in this list by keeping tuple that has the larger nu...

my mysql result set is duplicating?why

im doing this query on mysql, but its giving me duplicate results sets: this is my query: SELECT u.username, u.picture, m.id, m.user_note, m.reply_id, m.reply_name, m.dt, m.votes_up FROM user u, notes m WHERE m.topic_id =14 ORDER BY m.dt DESC i dont understand why its doing it? please help :)) EDIT: table schema notes{id, user_id, ...

how do i copy one row to insert into the same table?

insert into table select * from table where primarykey=1 I just wanna copy one row to insert into the same table, but i don't want list all the columns after the "select",cause this table has too many columns. But when i do this, i get the error: "Duplicate entry 'xxx' for key 1" I can handle this by creating another table with same c...

Java Creating Random Numbers with No Duplicates

In this case, the MAX is only 5, so I could check the duplicates one by one, but how could I do this in a simpler way? For example, what if the MAX has a value of 20? Thanks. int MAX = 5; for (i = 1 , i <= MAX; i++) { drawNum[1] = (int)(Math.random()*MAX)+1; while (drawNum[2] == drawNum[1]) { d...

Duplicate local variable in JSP in RAD

I get a "Duplicate Local Variable" error in JSP after build in RAD. I have same variable names inside scriptlet tags different logic:present / logic iterate tags. Sample code. <logic:present> <% int var1 = 5; %> </logic:present> ................... <logic:present> <% int var1 = 5; %> </logic:present> Since the variable are in...

Duplicate results returned from query when distinct is used

On a current project at I am needing to do some pagination of results returned from SQL. I have hit a corner case in which the query can accept identifiers as part of the where clause, normally this isn't an issue but in one case we have a single identifier being passed up that has a one to many relationship with one of the tables that t...