Re: program to remove duplicates

Liste des GroupesRevenir à cl c  
Sujet : Re: program to remove duplicates
De : fir (at) *nospam* grunge.pl (fir)
Groupes : comp.lang.c
Date : 21. Sep 2024, 23:18:09
Autres entêtes
Organisation : i2pn2 (i2pn.org)
Message-ID : <8630bec343aec589a6cdc42bb19dae28120ceabf@i2pn2.org>
References : 1 2
User-Agent : Mozilla/5.0 (Windows NT 5.1; rv:27.0) Gecko/20100101 Firefox/27.0 SeaMonkey/2.24
Chris M. Thomasson wrote:
On 9/21/2024 11:53 AM, fir wrote:
>
>
i think if to write a simple comandline program
that remove duplicates in a given folder
[...]
>
Not sure if this will help you or not... ;^o
>
Fwiw, I have to sort and remove duplicates in this experimental locking
system that I called the multex. Here is the C++ code I used to do it. I
sort and then remove any duplicates, so say a threads local lock set was:
>
31, 59, 69, 31, 4, 1, 1, 5
>
would become:
>
1, 4, 5, 31, 59, 69
>
this ensures no deadlocks. As for the algorithm for removing duplicates,
well, there are more than one. Actually, I don't know what one my C++
impl is using right now.
>
https://groups.google.com/g/comp.lang.c++/c/sV4WC_cBb9Q/m/Ti8LFyH4CgAJ
>
// Deadlock free baby!
void ensure_locking_order()
{
   // sort and remove duplicates
>
   std::sort(m_lock_idxs.begin(), m_lock_idxs.end());
>
   m_lock_idxs.erase(std::unique(m_lock_idxs.begin(),
     m_lock_idxs.end()), m_lock_idxs.end());
}
>
Using the std C++ template lib.
im not sure what you talking about but i write on finding file duplicates (by binary contents not by name).. it is disk thing and i dont think mutexes are needed - you just need to read all files in folder and compare it byte by byte to other files in folder of the same size

Date Sujet#  Auteur
21 Sep 24 * program to remove duplicates28fir
21 Sep 24 +* Re: program to remove duplicates5fir
21 Sep 24 i`* Re: program to remove duplicates4fir
21 Sep 24 i `* Re: program to remove duplicates3fir
21 Sep 24 i  `* Re: program to remove duplicates2fir
22 Sep 24 i   `- Re: program to remove duplicates1fir
21 Sep 24 +* Re: program to remove duplicates19Chris M. Thomasson
22 Sep 24 i`* Re: program to remove duplicates18fir
22 Sep 24 i +- Re: program to remove duplicates1Chris M. Thomasson
22 Sep 24 i `* Re: program to remove duplicates16Lawrence D'Oliveiro
22 Sep 24 i  +* Re: program to remove duplicates14fir
22 Sep 24 i  i+- Re: program to remove duplicates1Chris M. Thomasson
22 Sep 24 i  i+- Re: program to remove duplicates1Lawrence D'Oliveiro
22 Sep 24 i  i`* Re: program to remove duplicates11Paul
22 Sep 24 i  i +* Re: program to remove duplicates9fir
22 Sep 24 i  i i`* Re: program to remove duplicates8Bart
22 Sep 24 i  i i +* Re: program to remove duplicates3fir
22 Sep 24 i  i i i`* Re: program to remove duplicates2fir
22 Sep 24 i  i i i `- Re: program to remove duplicates1fir
22 Sep 24 i  i i `* Re: program to remove duplicates4fir
22 Sep 24 i  i i  `* Re: program to remove duplicates3fir
22 Sep 24 i  i i   `* Re: program to remove duplicates2fir
22 Sep 24 i  i i    `- Re: program to remove duplicates1fir
22 Sep 24 i  i `- Re: program to remove duplicates1Chris M. Thomasson
22 Sep 24 i  `- Re: program to remove duplicates1DFS
22 Sep 24 +- Re: program to remove duplicates1Lawrence D'Oliveiro
1 Oct 24 `* Re: program to remove duplicates2Josef Möllers
1 Oct 24  `- Off Topic (Was: program to remove duplicates)1Kenny McCormack

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal