Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <pre><code>/* This program will remove the fb://profile links from your contact cards. I would suggest creating an addressbook archive first before running this against your actual contacts. The easiest way to use this is to search your contact cards for "profile" select all and export as a single vCard. Then compile and run this program with that vCard as input and specify an output file, say fbRemoved.vcf I found that AddressBook behaves oddly when I try to do a mass import selecting use new for all cards. To get around this I just deleted all cards I had selected in the "profile" search then imported fbRemoved.vcf Written by: Alexander Millar Date: 30 Feb 2010 */ #include &lt;iostream&gt; #include &lt;iomanip&gt; #include &lt;stdio.h&gt; #include &lt;fstream&gt; #include &lt;string&gt; using namespace std; bool contains_fb_link(string str) { size_t found; found = str.find("fb\\://profile/"); if(found!=string::npos) { return true; } return false; } int main( int argc, char *argv[] ) { istream *infile; ostream *outfile = &amp;cout; string str; switch ( argc ) { case 3: outfile = new ofstream( argv[2] ); if ( outfile-&gt;fail() ) { cerr &lt;&lt; "Error! Could not open output file \"" &lt;&lt; argv[2] &lt;&lt; "\"" &lt;&lt; endl; exit(-1); } case 2: infile = new ifstream( argv[1] ); if ( infile-&gt;fail() ) { cerr &lt;&lt; "Error! Could not open input filee\"" &lt;&lt; argv[1] &lt;&lt; "\"" &lt;&lt; endl; exit(-1); } break; default: cerr &lt;&lt; "Usage: " &lt;&lt; argv[0] &lt;&lt; " input-file [output-file]" &lt;&lt; endl; } for ( ;; ) { getline(*infile,str); if( infile-&gt;eof() ) break ; if(contains_fb_link(str)) { getline(*infile,str); if( infile-&gt;eof() ) break ; } else { *outfile &lt;&lt; str &lt;&lt; endl; } } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload