Questions tagged [duplication]
180 questions
6
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 "%"'
…

Profpatsch
- 4,918
- 5
- 27
- 32
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…

The_Cthulhu_Kid
- 1,839
- 1
- 31
- 42
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…

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…

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,…

banana
- 145
- 6
5
votes
3 answers
CQRS code duplication in commands
I have a question about code duplication in the command side of the CQRS principle.
Been following the articles from:
https://www.cuttingedge.it/blogs/steven/pivot/entry.php?id=91
https://www.cuttingedge.it/blogs/steven/pivot/entry.php?id=92
It…

user4419743
- 55
- 2
- 5
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…

Timo
- 308
- 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()…

user1153321
- 347
- 6
- 18
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…

Steinthor.palsson
- 6,286
- 13
- 44
- 51
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,…

Edward Ford
- 1,631
- 3
- 13
- 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…

user310457
- 511
- 5
- 14
4
votes
2 answers
Stop Scrapy crawling the same URLs
I've written a basic Scrapy spider to crawl a website which seems to run fine other than the fact it doesn't want to stop, i.e. it keeps revisiting the same urls and returning the same content - I always end up having to stop it. I suspect it's…

prbens
- 43
- 1
- 5
4
votes
1 answer
grid.arrange plotting same graphic for all plots in list
I am running R version 3.1.1. in RStudio and am having difficulties with grid.arrange.
I am reading sales data for over 100 stores and plotting the sales over time. I am also trying to group the plots to display a set number at a time.
However,…

user3730560
- 41
- 1
4
votes
2 answers
Reusing "i" for JavaScript for loops
I recently started using PHP Storm (love it) and noticed that it flags declarations of "var i" in for loops as duplicate in JavaScript. I learned that apparently the scope of that variable exists outside of the loop.
for (var i = 0; i < 10; i++) {
…

Captain Stack
- 3,572
- 5
- 31
- 56
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.

Craig
- 36,306
- 34
- 114
- 197