|
I have a files containing both duplicate and non-duplicate records.The file is already sorted by a key.I want to determine those records that are duplicate and records that are non-duplicate.If duplicate the record is move to a duplicate file and if non...
Started by gibboo on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Here's an example this that involves no code....
This avoids a separate loop to read the sorted file .
If it's not, write the record to the "duplicate" file to the valid or duplicate file.
The sort key to compare the next record against.
|
|
I'm looking for the best approach to dealing with duplicate code in a legacy PHP project with about 150k lines of code.
Is this something best approached manually or are there standalone duplicate code detectors that will ease the pain?
Started by Ken on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
Have to change code, it's most of the times faster to duplicate the code than to refactor it so it can years googling to this very same question you posted here!
The CloneDR finds duplicate code, both extraction of....
|
|
Hi
I am making a web application in asp.net mvc C# with jquery that will have different pricing plans.
Of course the more you pay the more features you get.
So I was planning to use roles. So if someone buys plan 1 then they get a role of plan 1. Then...
Started by chobo2 on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Regarding the textbox.
Removed the other code, as you pointed out that you would just use the User class.
Would benefit from inheriting your price plan information to save duplicating the code itself.
|
Ask your Facebook Friends
|
What tools can I used to find duplicate code that is a good candiate for refactoring?
Update:
Any language, any IDE.
Started by Justin Tanner on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at stackoverflow):
Comparator
Name
comparator, filterator — fast location of common code
DESCRIPTION
comparator is a program for quickly finding common sections in two or more source-code.
Of is called Simian.
|
|
I've searched the Internet for a while now and I have not been able to find any free (or cheap) tools/utilities/modules that can analyze a set of Perl files (modules or scripts) and flag duplicate or cloned or copy/pasted code.
I'm better now, but I used...
Started by Kurt W. Leucht on
, 7 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Code Comparison and Plagirism....
There are several tools like http://pmd.sourceforge.net/ that can detect duplicate code by string matches.
What do you mean by duplicate code? Just character exact matches or semantic matches.
|
|
The challenge: The shortest code, by character count , that detects and removes duplicate characters in a String. Removal includes ALL instances of the duplicated character (so if you find 3 n's, all three have to go), and original character order needs...
Started by Alex on
, 42 posts
by 38 people.
Answer Snippets (Read the full thread at stackoverflow):
If you want, with original string and the VB....
Javascript 1.8 s.split('').filter of "".join(c for c in s if s.count(c)<2) , and it's virtually the same code anyway).
Strip all duplicate characters (S), Print the result to stdout (P).
|
|
I've moved a class to the App_Code folder and I'm now receiving the following error message:
CS0433: The type 'myProject.App_Code.ItemType' exists in both 'c:\WINDOWS\ Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\8cdcbe9c\ b9695514\...
Started by Jamie Dixon on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
Did you copy the file into app_code instead of moving it? Or have you created a backup copy.
|
|
I wish to get a quick feeling for how much “copy and paste” coding we have, there are many tools for C# / Java to check for this type of thing. Are there any such tools that work well with VB.NET?
(I have seen what looks like lots of repeated code, but...
Started by Ian Ringrose on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
[I'm the author of CloneDR ("Clone Doctor") .]
CloneDR.
Groovy source code and even plain text files.
|
|
Hi,
I have a large number of Enums that implement this interface:
/** * Interface for an enumeration, each element of which can be uniquely identified by it's code */ public interface CodableEnum { /** * Get the element with a particular code * @param...
Started by Don on
, 12 posts
by 12 people.
Answer Snippets (Read the full thread at stackoverflow):
Abstract enums are potentially very useful "template" enum code all over the....
It seems like you are actually implementing run time type going to use the enum value's name as your code.
Sorry.
Used to duplicating that code.
|
|
I have the following goal:
I Have a list of top menu links on my website
Home * Links * Quotes * Photos
The only difference is that whenever you are on a particular page, I want that page to just be text (not a href link) and the others to be links (to...
Started by oo on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
In the code behind on the master page I had code....
I did the same thing using a master page, using ASP:Hyperlink controls .
You could expose a Bool on each page.
Create a UserControl for your common code and add a reference to each page.
|