Questions tagged [no-duplicates]
70 questions
2
votes
2 answers
How to print without duplicates with perl?
My assignment is a little more in depth than the title but in the title is my main question. Here is the assignment:
Write a perl script that will grep for all occurrences of the regular expression in all regular files in the file/directory list as…

Fred Lohrman
- 75
- 1
- 2
- 5
2
votes
3 answers
Mysql Union two tables with different values
I need to return all the values from one table and then join this table to another query without duplicating values. This is my query so far.
CREATE TABLE tmp_tbl (Id INT(11) PRIMARY KEY, Per VARCHAR(30), Des VARCHAR(50), Rol INT(11));
INSERT…

Quentin
- 900
- 8
- 13
1
vote
1 answer
Which hash algorithm for duplicate URLs checking?
I am saving URL's in a database, and when i insert a new one, i want to check if that url exists already in the database.
A common practice (if i'm not mistaken) is to hash the urls using md5 or sha-1 etc... and checking that field in database for…

easy_weezy
- 101
- 2
- 6
1
vote
2 answers
deleting duplicate records on mysql?
I have this mysql query that finds duplicates and the number of occurances for each topic:
SELECT name,
COUNT(name) AS NumOccurrences
FROM topics
GROUP BY name
HAVING ( COUNT(name) > 1 )
but what I want to do is delete all the duplicates that are…

pingpong
- 1,157
- 4
- 19
- 32
1
vote
13 answers
Avoiding duplicate identifiers in the database
NOTICE: Appericiate all the answers, thanks but we already have a sequence.. and can't use the UNIQUE contraints because some items need to have duplicates.. I need to handle this using PLSQL somehow, so based on some criteria (using an if…

Tolga E
- 12,188
- 15
- 49
- 61
1
vote
1 answer
How I can transform a jQuery function in one AngularJS directive?
I have to validate a form with a directive, for to AngularJS can to be able to enable or disable the submit form button.
I have a function in jQuery, but I need that AngularJS watches this behavior.
This function compares inputs to prevent duplicate…

Gustavo Contreras
- 33
- 7
1
vote
3 answers
how to exclude rows that have duplicates in one field
I have a very simple task, but I cannot find any solution. I have two tables, 'articles' and 'categories'
My article table look like this:
id | cat_id | title | content
1 1 Blah Content 1
2 1 Blah2 Content 2
3 2 …

Tjodalv
- 340
- 3
- 15
1
vote
2 answers
Windows batch file to copy files allow for renamed file extension but not copy duplicates
I want to copy files from two directories on a remote computer to a single directory on a windows server. In one directory I have files with the extension *.csv and in the other *.asc. Drives have been mapped with the UNC convention so we have…

user1044111
- 57
- 2
- 9
1
vote
4 answers
How to stop duplicates when picking random number in Java
public void start() throws TwitterException, IOException
{
twitter.setOAuthConsumer(CONSUMER_KEY, CONSUMER_KEY_SECRET);
AccessToken oathAccessToken = new AccessToken(ACCESS_KEY, ACCESS_KEY_SECRET);
…

Kelly Redmond
- 11
- 2
1
vote
4 answers
How to produce normal distribution without duplicates in C++?
I am trying to find a fast way to produce random float numbers between 0 and 1 normally distributed but from the implementations that I have seen its all about random numbers meaning that there are possible duplicate values.
My restriction is that I…

BugShotGG
- 5,008
- 8
- 47
- 63
1
vote
1 answer
JavaScript - repeat function that lists 'n' amount of random numbers within a range without duplicates
I am trying to create an Animated Responsive Image Grid using this.
In it's source code you can see that the code for those images are physically typed out individually rather than using a function that repeats it for a an 'n' amount of times. If…

user3491393
- 11
- 1
1
vote
2 answers
LinkedHashSet Not Removing Duplicates
I am trying to create a search algorithm that stores coordinate pairs in a wrapper class called HashSquareSpec. In order to avoid duplicates, and maintain insertion order, I am inserting each HashSquareSpec into a LinkedHashSet. Even though I have…

Alan W
- 291
- 1
- 5
- 18
1
vote
1 answer
Java - test for duplicate objects
I have a loop, which creates objects. The first Object 'myObject' gets Strings from an other class (the class stores strings in an array. I can access the strings through an hashmap).
The Object myOtherObject stores myOject.
I want to test whether…

Ubuntix
- 324
- 4
- 15
1
vote
1 answer
Getting distinct values from linq to xml query
I am getting a csv file and converting it to XML and this works well.
The XML looks like this
A
1
1.0
…

maxthestork
- 13
- 3
1
vote
4 answers
Get a new result from a List
I have a detailed list and I want a new one with the elements of one property with no duplicates like this.
List list = List();
list.Add(new Class1("1", "Walmart", 13.54));
list.Add(new Class1("2", "Target", 12.54));
list.Add(new…

Maximus Decimus
- 4,901
- 22
- 67
- 95