Click here to Skip to main content
15,898,922 members
Home / Discussions / Algorithms
   

Algorithms

 
AnswerRe: which algorithm dominates f(n) or (g(n)) Pin
Afzaal Ahmad Zeeshan6-Oct-16 7:32
professionalAfzaal Ahmad Zeeshan6-Oct-16 7:32 
GeneralRe: which algorithm dominates f(n) or (g(n)) Pin
Member 127799066-Oct-16 8:50
Member 127799066-Oct-16 8:50 
Questionquestion about cycle reduction problem Pin
Member 127782295-Oct-16 10:58
Member 127782295-Oct-16 10:58 
AnswerRe: question about cycle reduction problem Pin
Chris Losinger6-Oct-16 3:59
professionalChris Losinger6-Oct-16 3:59 
Questionbooth's algorithm vs russian peasant's algorithm for multiplying two binary numbers Pin
EZCodeProject27-Sep-16 13:45
EZCodeProject27-Sep-16 13:45 
AnswerRe: booth's algorithm vs russian peasant's algorithm for multiplying two binary numbers Pin
harold aptroot28-Sep-16 3:11
harold aptroot28-Sep-16 3:11 
GeneralRe: booth's algorithm vs russian peasant's algorithm for multiplying two binary numbers Pin
EZCodeProject28-Sep-16 7:08
EZCodeProject28-Sep-16 7:08 
QuestionTrying to get additions, deletions and changes between 2 file versions Pin
Christopher Cote26-Sep-16 2:56
Christopher Cote26-Sep-16 2:56 
I am creating a DOORS database script that will be used to get all differences between 2 versions of a particular DOORS table (new vs old). I want to get all differences between the 2 tables (additions, deletions and changes). For anyone who doesn't know about DOORS, when an object is removed from a DB, the program marks the item's attribute as deleted, but you can still see it when you loop through all items. What I want to do is create a function that will display any items that have been changed since the older version.
Here is the algorithm I'm using:

JavaScript
for each newItem in newVers
    if (newItem.deleted) {
        check if deleted in oldVers
        if (!oldVers.deleted) {   //if it was deleted in the old version, we don't need to worry about it
            //add item to deleted array
        }
    } else {
        if (newItem.id exists in oldVers) {
            //check if there are any differences
            if (newVers != oldVers) {
                //add new version with changes to changed array
            }
        } else {
            //add new item to added array
        }
    }
}

Does this look like the way I should do this, or is there a better way? Just to reiterate, I am only looking for what, in the newer version has changed since the older one. I am not worried about changes in the opposite direction.
Any ideas would be appreciated.

Chris

modified 26-Sep-16 9:02am.

AnswerRe: Trying to get additions, deletions and changes between 2 file versions Pin
Peter_in_278026-Sep-16 17:41
professionalPeter_in_278026-Sep-16 17:41 
GeneralRe: Trying to get additions, deletions and changes between 2 file versions Pin
Christopher Cote5-Dec-16 3:12
Christopher Cote5-Dec-16 3:12 
QuestionCompress items of size based on width and height Pin
jkirkerx20-Sep-16 13:59
professionaljkirkerx20-Sep-16 13:59 
SuggestionRe: Compress items of size based on width and height Pin
Maciej Los26-Sep-16 4:44
mveMaciej Los26-Sep-16 4:44 
AnswerRe: Compress items of size based on width and height Pin
Maciej Los26-Sep-16 12:01
mveMaciej Los26-Sep-16 12:01 
GeneralRe: Compress items of size based on width and height Pin
jkirkerx27-Sep-16 7:46
professionaljkirkerx27-Sep-16 7:46 
QuestionRe: Compress items of size based on width and height [Modified] Pin
Maciej Los27-Sep-16 8:39
mveMaciej Los27-Sep-16 8:39 
AnswerRe: Compress items of size based on width and height [Modified] Pin
jkirkerx27-Sep-16 10:42
professionaljkirkerx27-Sep-16 10:42 
GeneralRe: Compress items of size based on width and height [Modified] Pin
Maciej Los27-Sep-16 21:41
mveMaciej Los27-Sep-16 21:41 
GeneralRe: Compress items of size based on width and height [Modified] Pin
jkirkerx28-Sep-16 6:36
professionaljkirkerx28-Sep-16 6:36 
GeneralThis is what I released today for production testing Pin
jkirkerx30-Sep-16 7:26
professionaljkirkerx30-Sep-16 7:26 
GeneralRe: This is what I released today for production testing Pin
Maciej Los4-Oct-16 9:22
mveMaciej Los4-Oct-16 9:22 
GeneralRe: This is what I released today for production testing Pin
jkirkerx4-Oct-16 9:30
professionaljkirkerx4-Oct-16 9:30 
GeneralRe: This is what I released today for production testing Pin
Maciej Los4-Oct-16 9:34
mveMaciej Los4-Oct-16 9:34 
GeneralRe: This is what I released today for production testing Pin
jkirkerx4-Oct-16 9:37
professionaljkirkerx4-Oct-16 9:37 
QuestionJoin lines text file using binary difference Pin
muttleychess1-Sep-16 5:34
muttleychess1-Sep-16 5:34 
AnswerRe: Join lines text file using binary difference Pin
Gerry Schmitz1-Sep-16 6:13
mveGerry Schmitz1-Sep-16 6:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.