Questions tagged [duplication]

180 questions
1
vote
3 answers

db4o Impedance Mismatch

I've built a nice repository layer around a db4o database to store Product objects, which relate to Manufacturer objects in a one-to-many relationship, i.e.: public class Manufacturer { public string Name { get; set; } } public class Product //…
Petrus Theron
  • 27,855
  • 36
  • 153
  • 287
1
vote
2 answers

Duplicating subclass of abstract baseclass

I have an abstract base-class to enforce some subclasses to overload the << operator. I am storing a bunch of pointers to instances of these subclasses in an std::stack... At some point I wish to duplicate the top item of the stack (and push it on…
Daniel Sloof
  • 12,568
  • 14
  • 72
  • 106
1
vote
3 answers

Does anyone know how to get rid of this error while trying to use GSON libraries?

I am using code (not written by me) with dependencies on GSON libraries. I have downloaded the libraries and when I try to include them in the project I get a duplication error. Specifically: Error generating final archive: Found duplicate file for…
NotACleverMan
  • 12,107
  • 12
  • 47
  • 67
1
vote
2 answers

Question regarding Duplicating Properties in ViewModels

I have a question regarding the duplication of properties within view models. For my Search View i have a viewmodel that looks like this public class SearchModel { public IEnumerable Genders {get;set;} ... other select lists …
zSynopsis
  • 4,854
  • 21
  • 69
  • 106
1
vote
2 answers

How can I read, analyze, and then "un-read" and reread the beginning of an input stream in Perl?

I'm reading and processing a stream of input from the ARGV filehandle in Perl (i.e. the while(<>) construct) a regular filehandle, which may be STDIN. However, I need to analyze a significant portion of the input in order to detect which of four…
Ryan C. Thompson
  • 40,856
  • 28
  • 97
  • 159
1
vote
1 answer

Avoid duplication of function in jQuery

This function is written twice to save the checkbox state as well as the corresponding div text. How do I write the code in a function once and then call it twice on load and click events respectively? $(document).ready(function() { …
input
  • 7,503
  • 25
  • 93
  • 150
1
vote
1 answer

Duplicating record and it's children - but children get deleted from old record

My problem is similar to: My cloning method is stealing the children from the original model But I can't seem to get the solution for this to work with mine. I'm trying to create an order exchange form which involves populating the form with the old…
1
vote
1 answer

Duplicate model along with it's associations

I came across this post that gave an answer on how to do this but it's not quite working for me. I have a model called SitePage which has many SitePageGroup which in turn has many SitePageContent // SitePage Model public $hasMany = array( …
Jordan
  • 2,393
  • 4
  • 30
  • 60
1
vote
1 answer

Delete the entire row if the a value in value is equal to previous row in Python

I am new to python programming and I need a help to delete the entire row based on the value of a single column in a dataframe. I want to delete the row, if a value in a single column is equal to the previous row value. The following is my data, …
ijaz ahamed
  • 157
  • 1
  • 2
  • 10
1
vote
1 answer

Distinct() method does not work?

I tried to use Distinct() to filter my collection to prevent duplication but my linq query still adds the same values to list. thanks in advance. public ObservableCollection CollectTopicsFromXml() { ObservableCollection
ilcognito
  • 37
  • 7
1
vote
1 answer

DuplicateKeyException alternative for javax.persistence

Is there something like of DuplicateKeyException applicable to javax.persistence.*? I've found this exception for ejb lib only: DuplicateKeyException Thank you.
sergionni
  • 13,290
  • 42
  • 132
  • 189
1
vote
2 answers

EntityFramework adds duplicate related objects on SaveChanges

Objects public class Noun { public int Id { get; set; } [MaxLength(128)] public string Name { get; set; } public bool Active { get; set; } public virtual Category Category { get; set; } public int CategoryId { get; set;…
ohmusama
  • 4,159
  • 5
  • 24
  • 44
1
vote
1 answer

JPA entity resultset duplication with more than one collection

The Contact entity defines relationships to two collections of entity of type email and nickname which exist in two MySQL tables. My issue is that the result set this returns has duplicated email and nicknames. { "contactId": 1, "givenName":…
Ian Hudson
  • 21
  • 3
1
vote
4 answers

Merge Columns and Remove Duplication

I have a input file that has data in 2 columns. I need to merge both the columns and remove the duplication. Any suggestions how to start with ? Thanks ! Input file 5045 2317 5045 1670 5045 2156 5045 1509 5045 3833 5045 1013 5045 3491 5045 32 5045…
user3964336
1
vote
1 answer

Mobile client, server, data integrity rules, logic duplication

I have mobile application and a server. Users can register via my mobile app. Users enter their e-mail and desired password in order to register. There are rules that applied to the password, for example, password length, characters allowed, etc.…
nickolay
  • 3,643
  • 3
  • 32
  • 40