Questions tagged [duplication]
181 questions
6
votes
3 answers
Is there a tool to finding redundancy through out a set of library code (.net C#)?
Is there a tool to finding redundancy through out a set of library code (.net C#)?
The problem is I have a number of .NET libraries, but they tend to have a lot of similar/duplicate "helper" or "utility" functions. Some times the code may not be…
![](../../users/profiles/361836.webp)
lucidquiet
- 5,441
- 7
- 37
- 76
6
votes
1 answer
Duplicating content on save for a multilingual umbraco site
[Edit] I have actually been allowed to use the doc names, which makes it much easier but I still think it would be interesting to find out if it is possible.
I have to set a trigger to duplicate content to different branches on the content tree as…
![](../../users/profiles/1091551.webp)
The_Cthulhu_Kid
- 1,758
- 1
- 26
- 38
6
votes
3 answers
Duplicated "set-cookie: ci-session" fields in header by codeigniter
For each time $this->session->set_userdata() or $this->session->set_flashdata() is used in my controller, another identical "Set-Cookie: ci_session=..." is added to the http header the server sends.
Multiple Set-Cookie fields, with the same cookie…
![](../../users/profiles/808289.webp)
mathulus
- 75
- 1
- 5
5
votes
2 answers
How to Insert Core Data Record Related to Another Without Duplication
I have two core data entities, Articles and Favorite. Articles has To-Many relationship to Favorite. First, I inserted all Articles object successfully.
Now, I'm trying to insert ArticleID in “Favorite” entity but I cant. Either the record is…
![](../../users/profiles/727058.webp)
smaiibnauf
- 63
- 1
- 4
5
votes
2 answers
How to avoid duplication of event subscription?
I have 3 classes namely Login, Barcode, and the Main.
Login class just contains the authentication of the users.
Barcode class has the following snippet code:
class Barcode
{
public delegate void BarcodeReadHandler(object sender,…
![](../../users/profiles/3663116.webp)
banana
- 145
- 6
5
votes
1 answer
MySQL - adding constraint once adds it twice with diffent case
I have this weird behaviour when I add a constraint to a MySQL table:
[...] add constraint qrtz_blob_triggers_ibfk_1 foreign key [...]
Now SHOW CREATE TABLE shows the constraint twice:
CONSTRAINT `qrtz_blob_triggers_ibfk_1` FOREIGN KEY…
![](../../users/profiles/2678759.webp)
Timo
- 278
- 2
- 10
5
votes
4 answers
What is the best practice for service-dao pattern?
let's think about a simple User insert operation. My Spring related classes to do this job are UserController, UserService, UserServiceImpl, UserDAO, UserDAOImpl.
At controller side i call userService.insert(new User()) and in userService.insert()…
![](../../users/profiles/1153321.webp)
user1153321
- 317
- 5
- 17
4
votes
2 answers
Duplicate a mysql database from within mysql?
This is probably a longshot but..
is it possible to duplicate a whole database layout (tables, view, procedures, everything) with a query or multiple queries in a stored procedure?
Basically looking for the same functionality as if I would use…
![](../../users/profiles/537925.webp)
Steinthor.palsson
- 5,618
- 12
- 39
- 50
4
votes
1 answer
Duplicate form fields when using fields_for
I am trying to create a nested form to handle a has_many :through relationship and getting duplicated fields being rendered.
Models
Company
has_many :provides
has_many :services, :through => :provides
accepts_nested_attributes_for :services,…
![](../../users/profiles/563177.webp)
Edward Ford
- 1,553
- 3
- 12
- 25
4
votes
1 answer
ASP.NET MVC - Avoiding duplicated validation code in JavaScript and C#, and with contextual validation that considers other property values?
How can you avoid duplicated validating code in JavaScript and C# in ASP.NET MVC 3, preferably also an example with contextual validation that considers other properties ?
Does ASP.NET MVC 3 make it possible to avoid duplicated validation logic in…
![](../../users/profiles/310457.webp)
user310457
- 501
- 4
- 14
4
votes
5 answers
How to choose colors in web development
When I build a site I tend to do a bit of graphic design (developer style) in Paint.NET, but how do I know the colors will all display properly on all browsers on different machines? What color depth to you generally code for? 16bit 256 colors etc.
![](../../users/profiles/27294.webp)
Craig
- 34,658
- 33
- 108
- 191
4
votes
2 answers
autocmd function always executed twice
I put together the following pile of awesomeness:
if !exists("g:AsciidocAutoSave")
let g:AsciidocAutoSave = 0
endif
fun! AsciidocRefresh()
if g:AsciidocAutoSave == 1
execute 'write'
execute 'silent !asciidoc -b html5 -a icons "%"'
…
![](../../users/profiles/1382925.webp)
Profpatsch
- 4,338
- 5
- 25
- 30
4
votes
1 answer
Duplicate tables having N:M relationship (including relationship)
Working on an existing webapp (PHP/MySQL) I came to this point:
I have 2 tables storing names and types id. The relation between them being N<---->N I have another table in between. (see picture)
I have a last table called "category" which is…
![](../../users/profiles/639725.webp)
monsieur_h
- 1,320
- 1
- 9
- 20
3
votes
2 answers
How to programmatically determine param name when constructing an ArgumentException?
When constructing an ArgumentException, a couple of the overloads take a string that is the invalid argument's parameter name. I figure it would be nice to not have to remember to update this ctor param whenever I change the method's param name. Is…
![](../../users/profiles/8705.webp)
Mal Ross
- 4,303
- 4
- 31
- 46
3
votes
5 answers
Using the same test suite on various implementations of a repository interface
I have been making a little toy web application in C# along the lines of Rob Connery's Asp.net MVC storefront.
I find that I have a repository interface, call it IFooRepository, with methods, say
IQueryable GetFoo();
void PersistFoo(Foo…
![](../../users/profiles/5599.webp)
Anthony
- 4,961
- 6
- 62
- 85