Showing posts with label time travel with computers. Show all posts
Showing posts with label time travel with computers. Show all posts

Tuesday, December 20, 2016

C.I.A. using hacker organizations and free masons against me. And other organizations too.

Copyright(C) 2016 http://time-travel.institute

December 21, 2016. 11:12 AM

Well as the people know that keep up with my blog the C.I.A. used the free masons to stop me from posting about time travel with computers at above top secret. In fact they have stopped me at least 4 times now from posting about computer time travel at above top secret.

Last night December 20th a person with a avatar of anonymous the hacker group was following me around You Now the online chat rooms. Well now its not unusual for two people to be in the same chat rooms more than once during the day. So, I thought nothing about it. But it kept happening.

Well I ended up in a chat room with a female that looked too young per You Nows rules. You now usually when they find out they will get them out of there. And, the last young girl I saw get banned I think it was the C.I.A. following me that got her band. SO AT LEAST THOSE MOTHER FUCKERS (the C.I.A.) ARE GOOD FOR SOMETHING!!!!

Well the guy or girl with the anonymous hacker group avatar shows up. He starts spamming the chat saying "What does your daddy want"? Over and over again TO A UNDERAGE MINOR!!! 
This could not of been a member of anonymous. They don't harasses children to get revenge against an adult. The "Conspiracy Against Time Travel" you guys are a piece of shit!!!

My opinion of Ray Hudson, Darby Phillips, And Pamela just got a hell of a lot lower. I pretty sure that person wearing the anonymous aviator was not a member of anonymous. Anonymous would of come after me directly they would not of gone after a child to get revenge on me. That was low. This had to be the C.I.A. and the N.S.A. They do not want anonymous and myself hooking up. That was what this was about. And this was a low blow below the belt.

Finally my screen froze up and I was unable to use my internet for about two hours. Now, I have a problem with the C.I.A. talking to a little girl like that. It it was one thing for Pamela and I to talk that way to each other because we both are adults. 

But for the C.I.A. to follow me around You Now then harasses a underage minor in a chat room TO GET REVENGE AGAINST ME IS JUST FUCKING WRONG!!! But I stay out of it. That is between You Now and the C.I.A. I was there legally and I was on my best behavior. The C.I.A. not so much.

Now that girl I did not know. They done this to me before. I laugh at the facial expressions those girls make when the conspiracy against time travel starts in. Its funny. Also the conspiracy against time travel need to know if I want to talk to the females at you now I can also do it from their social media. You Now is moderated and monitored and they have rules which I abide by.

I don't have to use you now. So again they are not stopping anything. This one girl though I did not know. I stepped into the chat room and was their for only a few minutes when the "Conspiracy Against Time Travel" pulled their shit on me. 

Actually they did it to her. I just watched and laughed about it and went on with my life. That was between her, them, and you now as far as I am concerned. I am not responsible for the felonies Ray Hudson, Darby Phillips, Pamela, Aaron Hiniker commit against me or others that is on them. But, they are C.I.A. and N.S.A. so their covered.

Later I in the morning my internet starting working again after the You Now incident. But, it goes in and out through out the day. Mostly when I am day trading because they are hacking me. I have already gotten with my ISP and tried to resolve it and the conclusion was I was being hacked. I had Comcast and Comcast said they could not help me with the hacking. I went to ATT and they gave me the best router they could and told me to change my password on a regular bases. Which does not work. The block it from outside the router so changing the password or putting up fire walls does not do any good.

So, clearly "The Conspiracy Against Time Travel" was using my words where I told Pamela I was her daddy. Which since she is pretending to be my girl friend online after stealing my ex-girl friends information from my home computer illegally. Then used that information against me on the internet. 

Then "I AM HER DADDY". PAMELA, WHO'S YO DADDY BITCH? PAMELA WHO'S YO DADDY? PAMELA, WHAT DOES YOUR DADDY WANT? HEY PAMELA, WHAT DOES YOUR DADDY WANT BITCH? YOU KNOW WHAT HE WANTS BABY DOLL!!! TAKE CARE OF IT. MAKE YOUR DADDY VERY HAPPY PAMELA!!!!!!!!!!!!!!!!!!!! I WOULD COCK SLAP HER IF I COULD. GENTLY OF COURSE. THEN I WOULD RUB MY BALL SACK ALL OVER HER FACE. THEN I WOULD GIVE HER A TIME TRAVELING FACE FUCK FROM HELL.

BAAAAAAAAAHAHAAHAHAHAHAHAHAHAHAHA!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

BAAAAAAAAAHAHAAHAHAHAHAHAHAHAHAHA!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

BAAAAAAAAAHAHAAHAHAHAHAHAHAHAHAHA!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Oh shit my ribs are hurting. Pamela how does it taste baby?

BAAAAAAAAAHAHAAHAHAHAHAHAHAHAHAHA!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

SHE PRETENDED TO BE MY GIRL FRIEND AT ABOVE TOP SECRET SO I GAVE HER THE FUCKING JOB AS MY GIRL FRIEND. THIS BIG FAT CUMMY DICK IS ALL YOUR'S PAMELA.

Well as said I will talk about time travel with computers all I want to. Where I want too. And when I want too. This shit has been going on now since 2008 and 2017 is coming up at the end of this month.

I will be programming tonight on time travel project. Well that's it for right now.
--------------------------------------------------------------------------------------------------------------
12/21/16 1:32pm

Well just now the "Conspiracy Against Time Travel" blocked my ATT  internet when I tried to day trade right after I submitted a order. All I did was get on my private hot spot. Now I am day trading. Those guys will never learn. They can all SUCK MY GOD DAMN DICK YOU FUCKING COCK SUCKING COWARDS!!!!!!!!!!!!!!!!!! (Talking to the Conspiracy Against Time Travel.) You see I am just one person. So they need a Army to stop me. I must be good.

They want to distract me and make this blog about them committing felonies against me and keep me from talking about time travel with computers instead. Its not working.

I want to say I love the fact these guys are spending money on me to hack me. I love the fact they are wasting their computer resources on me to hack me. I love the fact their wasting their time on me. I love the fact this is costing them money, time, and resources. WAST ALL THOSE MONEY TIME AND RESOURCES YOU WANT "CONSPIRACY AGAINST TIME TRAVEL"!!!!!!!

BAAAAAAAAAAAAAAHAHAHAHAHAHAHAHAHAHAH!!!!!!!!!!!!!!!!!!!!!!!!!

What I will do though is put out another blog book that will be published commercially. That is what I will do. Tonight I will be back hard at it writing my time travel code for the public. Anyone can goto http://sourceforge.net/timetravelproject/ and download it. Also, fire codes at http://sourceforge.net/firecodes/

And anyone can now buy my books, DVD, and watch my videos on you tube.

I have a message for the hacker group Anonymous. I don't know if that guy on You Now was from you. I know Anonymous does not forget and does not forgive but I do. Even if Anonymous was hacking me for what ever reason I am still Anonymous friend and shall always be their friend even if I am not their friend. Because Anonymous and I share the same goals. Freedom of information and because the enemy of my enemy is my friend. I shall always be Anonymous friend and will be their for them to assist them with time travel with computers if they should ever ask me. Anonymous even if I am your enemy I will be your friend when and if you need me. Ok, that is where Anonymous and I stand. I am their friend and will always be their friend even if I am not their friend. They may not forget and may not forgive but I do. Anonymous as far as I am concerned you and I are good. Even if you guys are hacking me. My code is at sourceforge Anonymous. It is yours. I got more code coming. And if Anonymous is hacking me it is because Ray Hudson put them up to it. So, I got no problem with them. 

And as far as what happened at you now if they don't know what account I am on and what computer I am on and what internet connection I am on I can YOU NOW ALL I WANT!!! As I always said they can slow me down but they can not and will not EVER STOP ME!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

----------------------------------------------------------------------------------

12/21/2016 10:27 PM. 

I am setting here on my throw away hotspot fixing to set up for a night of programming on my computer time travel. I am going to get my coffee first. I was just sitting here thinking about my drone that I am going to put Armageddon on. Also, with that drone I can get internet I won't have to use my home internet. I got it all planned out. My A.I. will be my hacking army and I will fight back against the "Conspiracy Against Time Travel". With my A.I.
Anonymous will get my code eventually too because I WILL OPEN SOURCE IT AND PUT IT ON THE GOD DAMN INTERNET.

Well my programming won't do itself just like Pamela sucks my dick because it won't suck itself. Pamela your daddy is waiting for you honey. Talk later. 

COME HERE PAMELA!!! Where did that bitch go? When ever there is a dick to suck she is never around. I am going to put her over my knees when I find her and paddle her behind. And since she is such a freak she would probably enjoy it too.
------------------------------------------------------------------------------
12/22/2016
04:41 AM

BasePowerCounter.cpp is getting closer to getting done. It works in a higher base. Right now I am using it in base 99999999. I can use it in what ever base I want though as long as c++ can represent that high of a number.

I got the code debugged now I have some problems with how the program is running that I have to correct.

There are two sections to this program. Coding a binary file to a base power check sum and decoding a base power check-sum back to a computer file.

Now after this I will get the file regression program working in other number bases as well. Once I have that done then my file regression program will generate me a regression line.

Then I take that regression line and generate check-sums of time travel computer media files.

then I that those check-sums and put them back into my base power counter program and then we have time travel media files.

And, THIS IS WHAT ALL THE FUSS IS ABOUT!!!!!!!!!!!!!!! THIS IS WHY RAY HUDSON AND DARBY PHILLIPS AND PAMELA AND AARON HINIKER WHO WORK FOR THE CIA DON'T WON'T ME DOING!!!!! 

THIS IS WHY I AM GETTING HACKED, HARASSED, AND THREATEN!!!!!! THIS IS WHY!!!!!!!!!!!!!!!!!!!!!!!!!!

THIS IS WHY THEY THREATEN TO KILL ME AT CRAIG'S LIST!!!!

NO MATTER WHAT I SAID, NO MATTER WHAT I DID, NO MATTER HOW I DID IT, NO MATTER WHERE I WENT THEY WERE ALL WAYS GOING TO FUCK WITH ME!!!! THEY WERE ALWAYS GOING TO FUCK WITH ME NO MATTER WHAT!!!!

THIS WAS NEVER GOING TO END WELL FOR ME!!! EVER!!!!!

THEY THE C.I.A AND N.S.A. ARE TROLLS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

THEY ARE THE C.I.A. AND N.S.A. FUCKING WITH PEOPLE IS WHAT THEY DO!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

THIS IS WHY COCK-BREATH PAMELA PRETENDED TO BE MY GIRL FRIEND AT ABOVE TOP SECRET AND THEY TOOK MY THREAD DOWN AND THEY HACKED MY HOME COMPUTER AND STOLE PERSONAL INFORMATION!!!!!!!!!!!! AND USED IT AGAINST ME!!!!!

I'm good now. I am done for the night. I will pick my programming up again tomorrow. I uploaded my code of my base power counter to time travel project at sourceforge but it is not finished yet. My algorithm works good as gold. I just got to get the program to work good as gold too.

I am doing this to piss Ray Hudson off. He don't won't me posting my computer code. Here is the code. The base power counter needs more work the rest works but I am going to make it better. This is what I am working on. This is why Ray Hudson and Darby Phillips and Pamela want me off the internet. This is my header file to base power counter at the very top.

Anonymous if that was you guys chasing me around at You Now you are still welcome to have this code. If you want I will be glad to work with your programmers whether or not you guys are after me or not. Like I said my interest and loyalties lay with you guys whether or not you guys are punishing me. So I am with you guys. I will try to be a good boy if I can. I am not hacking anyone and I won't help hack anyone but I will answer questions about computer time travel. I will answer questions about time-hacking. I will be a computer time travel consultant only to you guys.

But understand I work for the world with computer time travel. I don't work for specific groups or people. I am a world computer time travel consultant. I work to bring this to mankind. You guys talking Anonymous are just a rock I am stepping on to cross a creek. Please understand that. No insult intended. And because Anonymous is that rock I am there for them 200%. Even if they punish me. I can forgive. I can forget.

So, Anonymous and I are allies. I will and always shall be their friend. So Anonymous and I have a understanding. We have a treaty. I would request that Anonymous I will not demand that they please stop any operations they have going on against me. That is a request only. Anonymous please don't work for the USA against me please. It is not right. Again that is a request. If want you can help me stop the hacking against me. But, that is up to you guys.

Also that group has policed their own members before. Even hackers hack each other. So, its all good. Now, I am not part of Anonymous if anyone whats to now. I am a solo act.

Also it occurred to me the C.I.A. could be playing me against Anonymous. They want us to be enemies. I AM NOT FUCKEN DOING THAT!!!  I will be their friend NO MATTER WHAT FUCKEN COMES. 

And you know what. Me teaming up with Anonymous is the C.I.A. and the N.S.A. worst fucking night mare come true. For I could teach them to time hack. Then they could hack computers without ever connecting to the internet or a phone line. And it would not just be in the present. It would be in all of space-time.

For Einstein said all of space-time exist at the same time. That means ALL COMPUTER FILES EXIST AT THE SAME TIME. With my methods they would have access to every computer file within space-time any fucking time they wanted too.

But, I am not part of their group. And I don't go after specific computers or people. I am just a simple happy computer time traveler. I would advise the U.S.A. government and Darby Phillips, Ray Hudson, and Pamela and their dog Aaron Hiniker to leave me the fuck along. Stop all operations against me. They have been warned. I will not tell them again. This shit stops today or else. You have been warned.

I am their Anonymous friend. Because we share the same interest and goals and we share the same enemies. Right now the C.I.A. is after my fat white ass hard. And they have let me fucking know about it. Even threaten me with a fucken accident at Craigs list. So no I will be Anonymous friend. Even if they come after me.

But you guys (talking to Anonymous) have my blog and if you go to sourceforge you can get my public code. With that you probably don't need me to get the rest worked out but if you do I am sure you guys can find me if you want. Your welcome Anonymous. Take this computer time travel it is yours. The rest of the world can have it too.
          
Anonymous these programs are a gift to you from me. Enjoy. They still need a little work. Put your programmers on it.

 Below is 4 programs
1. base power counter (still under construction) For constructing time travel computer media files. In the coding part my coding program did not put the last remainder in the file when converting bases. So I got to fix that. My decoding part I am still testing it. I got fix my coding part first before I can fix my decoding part. Its going to be cool. I am going to make a new post laughing at the "Conspiracy Against Time Travel" when I get it done.

2. regression line program (for getting a regression line of time travel computer media files) Seems to work.

3. check-sum generator (for taking the regression line and generating check-sums of time travel computer media) Seems to work.

4. public version 9 my throttled counter (For reconstructing check-sums of time travel computer media to computer files.) Seems to work. I am going to massively paralyze this counter and upgrade it.

  THIS IS WHAT I HAVE FOR THE PUBLIC VERSION OF MY TIME TRAVEL COMPUTER CODE. THE REST IS AT SOURCEFORGE.NET UNDER TIME TRAVEL PROJECT AND FIRE CODES.

WORLD - TAKE THIS COMPUTER TIME TRAVEL IT IS YOURS!!! ANONYMOUS YOU CAN HAVE IT TOO!!! 
I AM STILL IMPROVING THE PUBLIC VERSION OF MY CODE BUT THIS IS THE JEST OF IT. I HAVE ONLY BEEN WORKING ON THE PUBLIC VERSION OF MY TIME TRAVEL CODE FOR A SHORT PERIOD OF TIME. BUT THIS IS HOW IT WORKS!!!! I HAD 8 YEARS TO WORK ON THE PRIVATE VERSION OF MY CODE.

TAKE COMPUTER TIME TRAVEL WORLD IT IS YOURS. FUCK THE "CONSPIRACY AGAINST TIME TRAVEL". FUCK EM!!! TAKE IT WORLD!!! TAKE IT!!!!!!!!!!!!

THE "CONSPIRACY AGAINST TIME TRAVEL" CAN GO STRAIGHT TO GOD DAMN HELL!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

#ifndef basepower_h
#define basepower_h

     #include
     #include
     #include
     #include
     #include
     #include  
     #include
     #include
     #include
     #include

// ======================================================================================================================
    // Declare namespace
    using namespace std;
// ======================================================================================================================
// Header key goes here
// ======================================================================================================================
int createbpchecksum(string file1, long long numberbase, int buffersize)


    // declare variables
    long long begin1;
    long long end1;
    unsigned char buffer;
    char pause;
    int byte1;
    long long count1;
    long long filesize1;
    long long pbnum1;
    long long pbnum2;
    long long pbnum3;
    long long carry;
    int test2;
    
    // create power file
    fstream c1myfile1("power.txt", ios::out);
    c1myfile1 << 256 << "\n";
    c1myfile1.close();
    c1myfile1.clear();
    c1myfile1.flush();

    // create addition file
    fstream c1myfile2("addition.txt", ios::out);
    c1myfile2.close();
    c1myfile2.clear();
    c1myfile2.flush();

    // create check sum file
    fstream c1myfile3("pbchecksum.txt", ios::out);
    c1myfile3.close();
    c1myfile3.clear();
    c1myfile3.flush();

    // open binary file
    // open file1
    fstream myfile1(file1.c_str(), ios:: in | ios:: binary);
    if (!myfile1)
    {
         cout << "Error in line 1029.\n";
         cin >> pause;
         myfile1.close();
         myfile1.clear();
         myfile1.flush();
         exit(1); // terminate with error
    }

    // get file size of binary file
     begin1 = myfile1.tellg();
     if (!myfile1)
     {
          myfile1.close();
 myfile1.clear();
 myfile1.flush();
          cout << "Failed to read file two.\n";
          cin >> pause;
          exit(1);
     }

     myfile1.seekg (0, ios::end);
     end1 = myfile1.tellg();
     filesize1 = (end1-begin1);

    // set count1
    count1 = -1;
    // start do loop
    do
    {
         //increment count
         count1++;
         // read byte from binary file
         // read file 1
         myfile1.seekg(count1);
         myfile1.read( reinterpret_cast( &buffer ),buffersize);
         begin1 = myfile1.tellg();
         byte1 = (int)buffer;

         // delete addition file
         system("rm addition.txt");

         // open addition file
         fstream c1myfile2("addition.txt", ios::out);

         // open power file
         c1myfile1.open("power.txt", ios::in);


         // set carry to 0
         carry = 0;

         // multiple byte times base power file <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<,
         do
         {    
              pbnum1 = 0;
              // Read power file
//              c1myfile1 >> pbnum1;
              if (!c1myfile1.eof( ))
              {
                   c1myfile1 >> pbnum1;
              }


              pbnum2 = 0;
              // multiply number * byte
              pbnum2 = (pbnum1 * byte1) + carry;
              carry = 0;

              // convert to base and set carry
              if (pbnum2 >= numberbase)
              {
                 pbnum3 = 0;

                 // convert to numberbase
                 carry = int(pbnum2 / numberbase);
                 pbnum3 = pbnum2 - (int(pbnum2/numberbase) * numberbase);

              }

              if (pbnum2 < numberbase)
              {
                   pbnum3 = 0;
                   pbnum3 = pbnum2;
              }
              
              // Error out if carry greater
              if (carry > numberbase)
              {
                   cout << "Carry greater than number base." << "\n";
                   cin >> pause;
                   exit(0);
              }

              // write to addition file              
//              c1myfile2 << pbnum3 << "\n";
              if (!c1myfile1.eof( ))
              {
                   c1myfile2 << pbnum3 << "\n";
              }

         } while(!c1myfile1.eof( )); 

         if (carry > 0)
         {
              // write to addition file              
              c1myfile2 << carry << "\n";
         }

         // close power file 
        c1myfile1.close();
        c1myfile1.clear();
        c1myfile1.flush();

         // close addition file
         c1myfile2.close();
         c1myfile2.clear();
         c1myfile2.flush();

         
         // add addition file to check sum file <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

         // Reopen additon file
         c1myfile2.open("addition.txt", ios::in); 

         // open check-sum file
         c1myfile3.open("pbchecksum.txt", ios::in); 

         // create temp file to hold result
         // open temp file for multiplication (This file will be renamed).
         fstream c1myfile4("temp.txt", ios::out);

         // set carry to 0
         carry = 0;
         do
         {
              // set pbnum to 0
              pbnum1 = 0;

              // read addition file
              if (!c1myfile2.eof( ))
              {
                   c1myfile2 >> pbnum1;
              }

              pbnum2 = 0;

              // check-sum file              
              if (!c1myfile3.eof( ))
              {
                   c1myfile3 >> pbnum2;
              }

              // clear pbnum3
              pbnum3 = 0;
              
              // do base addition
              pbnum3 = pbnum1 + pbnum2 + carry;

              // set carry to 0
              carry = 0;

              // convert to base and set carry
              if (pbnum3 >= numberbase)
              {
                
                // set pbnum3 to 0 
                pbnum3 = 0;

                 // convert to numberbase
                 carry = int(pbnum3 / numberbase);
                 pbnum3 = pbnum3 - (int(pbnum3/numberbase) * numberbase);

              }
              
              // Error out if carry greater
              if (carry > numberbase)
              {
                   cout << "Carry greater than number base." << "\n";
                   cin >> pause;
                   exit(0);
              }

              test2 = 0;
              if (!c1myfile2.eof( ))
              {
                   test2 = 1;
              }

              if (!c1myfile3.eof( ))
              (
                   test2 = 2;
              }

              // write to addition file              
//              c1myfile4 << pbnum3 << "\n";
              if (test2 > 0)
              {
                   c1myfile4 << pbnum3 << "\n";
              } 

         } while(test2 > 0); 


         if (carry > 0)
         {
              // write to addition file              
              c1myfile4 << carry << "\n";
         }

         // close temp file
        c1myfile4.close();
        c1myfile4.clear();
        c1myfile4.flush();

         // close check-sumfile file
        c1myfile3.close();
        c1myfile3.clear();
        c1myfile3.flush();

        // close addition file
        c1myfile2.close();
        c1myfile2.clear();
        c1myfile2.flush();

        // delete addition file
        system("rm addition.txt");

        // delete pbchecksum.txt
        system("rm pbchecksum.txt");

        // rename temp.txt pbchecksum.txt
        system("mv temp.txt pbchecksum.txt");          

        // multiply power file by 256 <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 

        // open power file
        fstream c1myfile1("power.txt", ios::in);

        // create temp file to hold result
        // open temp file for multiplication (This file will be renamed).
        c1myfile4.open("temp.txt", ios::out); 

        // set carry to 0
        carry = 0;

        // multiple power file by 256
        do
        {    
             pbnum1 = 0;
             // Read power file
             if (!c1myfile1.eof( ))
             {
                  c1myfile1 >> pbnum1;
             }


             pbnum2 = 0;
             // multiply number * byte
             pbnum2 = (pbnum1 * 256) + carry;
             carry = 0;

             // convert to base and set carry
             if (pbnum2 >= numberbase)
             {
                pbnum3 = 0;

                // convert to numberbase
                carry = int(pbnum2 / numberbase);
                pbnum3 = pbnum2 - (int(pbnum2/numberbase) * numberbase);

             }

             if (pbnum2 < numberbase)
             {
                  pbnum3 = 0;
                  pbnum3 = pbnum2;
             }
            
              
             // Error out if carry greater
             if (carry > numberbase)
             {
                  cout << "Carry greater than number base." << "\n";
                  cin >> pause;
                  exit(0);
             }

             // write to temp file              
//             c1myfile4 << pbnum3 << "\n";
             if (!c1myfile1.eof( ))
             {
                  c1myfile4 << pbnum3 << "\n";
             }

        } while(!c1myfile1.eof( )); 

        if (carry > 0)
        {
             // write to addition file              
             c1myfile4 << carry << "\n";
        }

        // close temp file
       c1myfile4.close();
       c1myfile4.clear();
       c1myfile4.flush();

        // close power file
       c1myfile1.close();
       c1myfile1.clear();
       c1myfile1.flush();

        // delete power.txt
        system("rm power.txt");

        // rename temp.txt power.txt
        system("mv temp.txt power.txt");
    // repeat to end of binary file
   } while (count1 < filesize1 - 1);

   // Make sure binary file closed
   myfile1.close();
   myfile1.clear();
   myfile1.flush();

   // exit sub
   return(0);
}
// ======================================================================================================================
 int decodepbchecksum(string file1, long long filesize1, long long numberbase, int buffersize)
 {
    // declare variables
    long long begin1;
    long long end1;
    unsigned char buffer;
    char pause;
    int byte1;
    long long count1;
    long long count2;
    long long count3 = filesize1;
    long long pbnum1;
    long long pbnum2;
    long long pbnum3;
    long long carry;
    int test;
    int test2; // for testing and or conditions

    // open power file
    fstream c1myfile1("power.txt", ios::in);
    c1myfile1.close();
    c1myfile1.clear();
    c1myfile1.flush();

    // declare addition file
    fstream c1myfile2;

    // open check sum file
    fstream c1myfile3("pbchecksum.txt", ios::in);
    c1myfile3.close();
    c1myfile3.clear();
    c1myfile3.flush();

    // declare temp file
    fstream c1myfile4;

    // create binary file
    fstream myfile1(file1.c_str(), ios:: out | ios:: binary);
    if (!myfile1)
    {
         cout << "Error in line 1029.\n";
         cin >> pause;
         myfile1.close();
         myfile1.clear();
         myfile1.flush();
         exit(1); // terminate with error
    }

    // set count1
    count1 = -1;

    // set byte to 255
    byte1 = 255;

    // start do loop 
    do
    {
         // open base power file
         fstream c1myfile1("power.txt", ios::in);
    

         // multiply byte times base power file   
         // write to addition file
         // create temp file to hold result
         // open temp file for multiplication (This file will be renamed).
         c1myfile4.open("temp.txt", ios::out); 

         // set carry to 0
         carry = 0;

         // multiple power file by byte1
         do
         {    
              pbnum1 = 0;
              // Read power file
//              c1myfile1 >> pbnum1;              
              if (!c1myfile1.eof( ))
              {
                   c1myfile1 >> pbnum1;
              }

              // Initialize test2
              test2 = 1;
              if (pbnum1 == 0)
              {
                   test2 = 0;
              }

              pbnum2 = 0;
              // multiply number * byte
              pbnum2 = (pbnum1 * byte1) + carry;
              carry = 0;

              // convert to base and set carry
              if (pbnum2 >= numberbase)
              {
                 pbnum3 = 0;

                 // convert to numberbase
                 carry = int(pbnum2 / numberbase);
                 pbnum3 = pbnum2 - (int(pbnum2/numberbase) * numberbase);

              }

              if (pbnum2 < numberbase)
              {
                   pbnum3 = 0;
                   pbnum3 = pbnum2;
              }
             
              
              // Error out if carry greater
              if (carry > numberbase)
              {
                   cout << "Carry greater than number base." << "\n";
                   cin >> pause;
                   exit(0);
              }

              // write to temp file              
//              c1myfile4 << pbnum3 << "\n";
              if (test2 > 0)
              {
                   c1myfile4 << pbnum3 << "\n";
              }

         } while(test2 > 0); 

         if (carry > 0)
         {
              // write to addition file              
              c1myfile4 << carry << "\n";
              carry = 0;
         }

         // close temp file
         c1myfile4.close();
         c1myfile4.clear();
         c1myfile4.flush();

         // close power file
         c1myfile1.close();
         c1myfile1.clear();
         c1myfile1.flush();

         system("mv temp.txt addition.txt"); 


         // compare addition file to check-sum file
         // open addition file
         c1myfile2.open("addition.txt", ios::in);

         // open check sum file
         c1myfile3.open("pbchecksum.txt", ios::in);

         // set count1 and count2 to 0
         count1 = 0;
         count2 = 0;         
         // set pbnum1 to 0
         pbnum1 = 0;
         // set pbnum2 to 0
         pbnum2 = 0;

         // start do loop
         do
         {
              // read addition
              if (!c1myfile2.eof( ))
              {
                   c1myfile2 >> pbnum1;
              }
              // read check sum
              if (!c1myfile3.eof( ))
              {
                   c1myfile3 >> pbnum2;
              }
              // if addition > 0 get number and file pointer
              if (!c1myfile2.eof( ))
              {

                   if (pbnum1 > 0)
                   {
                        count1++;
                   }
              } 
              // if checksum > 0 get number and file pointer
              if (!c1myfile3.eof( ))
              {

                   if (pbnum2 > 0)
                   {
                        count2++;
                   }
             }

              // set test2 to 0
              test2 = 0;

              if (!c1myfile2.eof( ))
              {
                   test2 = 1;
              }

              if (!c1myfile3.eof( ))
              {
                   test2 = 2;
              }

         // end loop at end of file for addition and check sum file
         } while(test2 > 0); 

         // close addition and check-sum file
         // close temp file
         c1myfile2.close();
         c1myfile2.clear();
         c1myfile2.flush();

         // close power file
         c1myfile3.close();
         c1myfile3.clear();
         c1myfile3.flush();

         // initilize test
         test = 0;
         // if addition file point greater than check sum test = 1
         if (count1 > count2)
         {
              test = 1;
         } 
         // if check sum file point greater then addition test = 2
         if (count1 < count2)
         {
              test = 2;
         } 
         // if addition and checksum equal and addition number greater test = 1
         if (count1 == count2)
         {
              if (pbnum1 > pbnum2)
              {
                   test = 1;
              }  
         } 
         // if addition and checksum equal and checksum number greater test = 2
         if (count1 == count2)
         {
              if (pbnum1 < pbnum2)
              {
                   test = 2;
              }
         }  
         // if addition and checksum file pointer and number equal test = 0
         if (count1 == count2)
         {
              if (pbnum1 == pbnum2)
              {
                   test = 0;
              } 
         }

         // if addition file = or less than check-sum file write byte to binary file and decrement file pointer reset byte
         if (test == 2)
         {
               count3--;
               buffer = (unsigned char)byte1;
               myfile1.seekp(count3);
               myfile1.write( reinterpret_cast( &buffer ),buffersize);
               begin1 = myfile1.tellp();
         }

         if (test == 0)
         {
               count3--;
               buffer = (unsigned char)byte1;
               myfile1.seekp(count3);
               myfile1.write( reinterpret_cast( &buffer ),buffersize);
               begin1 = myfile1.tellp();
         }
// <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< I stopped debugging here >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
// ==========================================================================================================================================
        // if addition file = or less than check-sum file subtract addition file from check-sum file
         if (test == 2)
         {

              // open addition file
              c1myfile2.open("addition.txt", ios::in);

              // open check sum file
              c1myfile3.open("pbchecksum.txt", ios::in);

              // open temp file
              c1myfile4.open("temp.txt", ios::out); 

              // set carry to 0
              carry = 0;

              // start do loop
              do
              {
                   // set pbnum1 to 0
                   pbnum1 = 0;
                   // read addition
                   if (!c1myfile2.eof( ))
                   {
                        c1myfile2 >> pbnum1;
                   }

                   // set pbnum2 to 0
                   pbnum2 = 0;
                   // read check sum
                   if (!c1myfile3.eof( ))
                   {
                        c1myfile3 >> pbnum2;
                   }

                   // byte3 = byte1 - byte2 - carry;
                   pbnum3 = pbnum1 - pbnum2 - carry;

                   // initiliaze carry
                   carry = 0;

                   // if byte < 0 subtract from the base
                   if (pbnum3  < 0)
                   {
                        pbnum3 = pbnum3 + numberbase;
                        carry = 1;
                   }

                   // Check for error
                   if (pbnum3 > (numberbase - 1))
                   {
                        cout << "Houston we have a problem\n";
                        cout << "pbnum3 greater than the base - 1\n";
                        cin >> pause;
                        exit(0);
                   }

                   // set test2 to 0. Initilize test 2
                   test2 = 0;

                   if (!c1myfile2.eof( ))
                   {
                        test2 = 1;
                   }

                   if (!c1myfile3.eof( ))
                   {
                        test2 = 2;
                   }


                   // write remainder to temp file
                   if (test2 > 0)
                   {
                        c1myfile4 << pbnum3 << "\n";
                   }

              // End do loop for end of file
              } while(test2 > 0); 

              // if carry has value write it
              if (carry > 0)
              {
                   // write to addition file              
                   c1myfile4 << carry << "\n";
                   carry = 0;
              }

              // close files
              // close addition file
              c1myfile2.close();
              c1myfile2.clear();
              c1myfile2.flush();

              // close check-sum file
              c1myfile3.close();
              c1myfile3.clear();
              c1myfile3.flush();

              // close temp file
              c1myfile3.close();
              c1myfile3.clear();
              c1myfile3.flush();
              
              // delete pbchecksum.txt
              system("rm pbchecksum.txt");

              // move temp file to check-sum file
              system("mv temp.txt pbchecksum.txt");
         }  
// ==========================================================================================================================================  
         // if addition file = or less than check-sum file subtract addition file from check-sum file
         if (test == 0)
         {

              // open addition file
              c1myfile2.open("addition.txt", ios::in);

              // open check sum file
              c1myfile3.open("pbchecksum.txt", ios::in);

              // open temp file
              c1myfile4.open("temp.txt", ios::out); 

              // set carry to 0
              carry = 0;

              // start do loop
              do
              {
                   // set pbnum1 to 0
                   pbnum1 = 0;
                   // read addition
                   if (!c1myfile2.eof( ))
                   {
                        c1myfile2 >> pbnum1;
                   }
                   // set pbnum2 to 0
                   pbnum2 = 0;
                   // read check sum
                   if (!c1myfile3.eof( ))
                   {
                        c1myfile3 >> pbnum2;
                   }

                   // byte3 = byte1 - byte2 - carry;
                   pbnum3 = pbnum1 - pbnum2 - carry;
                   carry = 0;

                   // if byte < 0 subtract from the base
                   if (pbnum3  < 0)
                   {
                        pbnum3 = pbnum3 + numberbase;
                        carry = 1;
                   }

                   // Check for error
                   if (pbnum3 > (numberbase - 1))
                   {
                        cout << "Houston we have a problem\n";
                        cout << "pbnum3 greater than the base - 1\n";
                        cin >> pause;
                        exit(0);
                   }

                   // set test2 to 0. Initilize test2
                   test2 = 0;

                   if (!c1myfile2.eof( ))
                   {
                        test2 = 1;
                   }

                   if (!c1myfile3.eof( ))
                   {
                        test2 = 2;
                   }

                   // write remainder to temp file
                   if (test2 > 0)
                   {
                        c1myfile4 << pbnum3 << "\n";
                   }
             
              // End do loop for end of file
              } while(test2 > 0); 

              // if carry has value write it
              if (carry > 0)
              {
                   // write to addition file              
                   c1myfile4 << carry << "\n";
                   carry = 0;
              }

              // close files
              // close addition file
              c1myfile2.close();
              c1myfile2.clear();
              c1myfile2.flush();

              // close check-sum file
              c1myfile3.close();
              c1myfile3.clear();
              c1myfile3.flush();

              // close temp file
              c1myfile3.close();
              c1myfile3.clear();
              c1myfile3.flush();
              
              // delete pbchecksum.txt
              system("rm pbchecksum.txt");

              // move temp file to check-sum file
              system("mv temp.txt pbchecksum.txt");
         }  
//=====================================================================================================================
         // if addition file = or less than check-sum file set byte back to 255
         if (test == 0)
         {
              byte1 = 255;
         }
         if (test == 2)
         {
              byte1 = 255;
         }  

// ====================================================================================================================
         // Initilize count1
         count1 = 0;
         // rebuild power file if addition file is equal to or less than check-sum file
         if (test == 2) // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< The program never leaves this test <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
         {
              // delete power file
              system("rm power.txt");

              // open power file
              c1myfile1.open("power.txt", ios::out);

              // set power file to 256
              c1myfile1 << 256 << "\n";

              // close power file
              c1myfile1.close();
              c1myfile1.clear();
              c1myfile1.flush();

              do
              {
                   // open power file
                   fstream c1myfile1("power.txt", ios::in);

                   // create temp file to hold result
                   // open temp file for multiplication (This file will be renamed).
                   c1myfile4.open("temp.txt", ios::out); 

                   // set carry to 0
                   carry = 0;
                   // multiple power file by 256
                   do
                   {    
                        // set pbnum1 to 0
                        pbnum1 = 0;
                        // Read power file                        
                        if (!c1myfile1.eof( ))
                        {
                             c1myfile1 >> pbnum1;
                        }

                        test2 = 1;
                        if (pbnum1 == 0)
                        {
                             test2 = 0;
                        }

                        // set pbnum2 to 0
                        pbnum2 = 0;

                        // multiply number * byte
                        pbnum2 = (pbnum1 * 256) + carry;
                        carry = 0;

                        // convert to base and set carry
                        if (pbnum2 >= numberbase)
                        {
                             pbnum3 = 0;
                             // convert to numberbase
                             carry = int(pbnum2 / numberbase);
                             pbnum3 = pbnum2 - (int(pbnum2/numberbase) * numberbase);
                        }

                        if (pbnum2 < numberbase)
                        {
                             pbnum3 = 0;
                             pbnum3 = pbnum2;
                        }

                        // Error out if carry greater
                        if (carry > numberbase)
                        {
                             cout << "Carry greater than number base." << "\n";
                             cin >> pause;
                             exit(0);
                        }

                        // write to temp file              
                        if (!c1myfile1.eof( ))
                        {
                             c1myfile4 << pbnum3 << "\n";
                        }

                   } while(test2 > 0); 

                   if (carry > 0)
                   {
                        // write to addition file              
                        c1myfile4 << carry << "\n";
                        carry = 0;
                   }

                   // close temp file
                   c1myfile4.close();
                   c1myfile4.clear();
                   c1myfile4.flush();

                   // close power file
                   c1myfile1.close();
                   c1myfile1.clear();
                   c1myfile1.flush();

                   // delete power.txt
                   system("rm power.txt");

                   // rename temp.txt power.txt
                   system("mv temp.txt power.txt");

                   // repeat to end of binary file
                   count1++; 
              } while (count1 < count3);

         }  // End if statement
// ===================================================================================================================
         // initilize count1
         count1 = 0;
         // rebuild power file if addition file is equal to or less than check-sum file
         if (test == 0)
         {
              // delete power file
              system("rm power.txt");

              // open power file
              c1myfile1.open("power.txt", ios::out);

              // set power file to 256
              c1myfile1 << 256 << "\n";

              // close power file
              c1myfile1.close();
              c1myfile1.clear();
              c1myfile1.flush();

              do
              {
                   // open power file
                   fstream c1myfile1("power.txt", ios::in);

                   // create temp file to hold result
                   // open temp file for multiplication (This file will be renamed).
                   c1myfile4.open("temp.txt", ios::out); 

                   // set carry to 0
                   carry = 0;
                   // multiple power file by 256
                   do
                   {    
                        // set pbnum1 to 0
                        pbnum1 = 0;
                        // Read power file                        
                        if (!c1myfile1.eof( ))
                        {
                             c1myfile1 >> pbnum1;
                        }

                        test2 = 1;   
                        if (pbnum1 == 0)
                        {
                             test2 = 0;     
                        }


                        // set pbnum2 to 0
                        pbnum2 = 0;

                        // multiply number * byte
                        pbnum2 = (pbnum1 * 256) + carry;
                        carry = 0;

                        // convert to base and set carry
                        if (pbnum2 >= numberbase)
                        {
                             pbnum3 = 0;
                             // convert to numberbase
                             carry = int(pbnum2 / numberbase);
                             pbnum3 = pbnum2 - (int(pbnum2/numberbase) * numberbase);
                        }

                        if (pbnum2 < numberbase)
                        {
                             pbnum3 = 0;
                             pbnum3 = pbnum2;
                        }

                        // Error out if carry greater
                        if (carry > numberbase)
                        {
                             cout << "Carry greater than number base." << "\n";
                             cin >> pause;
                             exit(0);
                        }

                        // write to temp file              
                        if (!c1myfile1.eof( ))
                        {
                             c1myfile4 << pbnum3 << "\n";
                        }

                   } while(test2 > 0); 

                   if (carry > 0)
                   {
                        // write to addition file              
                        c1myfile4 << carry << "\n";
                   }

                   // close temp file
                   c1myfile4.close();
                   c1myfile4.clear();
                   c1myfile4.flush();

                   // close power file
                   c1myfile1.close();
                   c1myfile1.clear();
                   c1myfile1.flush();

                   // delete power.txt
                   system("rm power.txt");

                   // rename temp.txt power.txt
                   system("mv temp.txt power.txt");

                   // repeat to end of binary file
                   count1++;
              } while (count1 < count3);

         }  // End if statement
// ===================================================================================================================
         // if addition file > check sum file then decrement byte
         if (test == 1)
         {
              byte1--;
         }  

         // if byte < 0 stop program throw error
         if (byte1 < 0)
         {
              cout << "Failed to reconstruct file" << "\n";
              cin >> pause;
              exit(1);  
         }

         // if check-sum file zero break loop
         if (count3 == 0)
         {
              break;
         } 

    // repeat loop
    } while(count3 > 0);

    // Make sure binary file closed
    myfile1.close();
    myfile1.clear();
    myfile1.flush();

    // exit sub
     return(0);
 }
// ======================================================================================================================


#endif 

End of header file post. Here is the code for my regression line program.

// This file takes a directory of like computer files and plots a regression line
// of their for their weak,strong check sums.
// ALL YOU DO WITH THIS IS PUT IT IN A DIRECTORY OF LIKE FILES AND RUN THE PROGRAM. IT GENERATES A CONFIGURE FILE.
// THE CONFIG FILE WILL GO INTO THE NEXT PROGRAM THAT GENERATES A LIST OF UNKNOWN STRONG CHECK SUMS WHICH GET USED TO 
// GENERATE CONFIG FILES FOR FIRE CODES TO RECONSTRUCT!!!!!!!!!!!!!!! THEN WE WILL BE TIME TRAVELING WITH A COMPUTER!!!!!
// Here I am using weak check sums but you can use anything. It can be sum of differences of bytes or what ever.
// But for now here I am using weak check sums because I need two variables to predict my strong check sums.
// Copyright (C) 2016 http://time-travel.institute
// ============================================================================================
 // declare includes
     #include
     #include
     #include
     #include
     #include
     #include  
     #include
     #include
     #include
     #include
// ============================================================================================
    // Declare namespace
    using namespace std;
// ============================================================================================     
    // declare globals
// ============================================================================================     
// declare subs
// This is where all the work is done to make the program run.
// run command to make list of files
    int makelist()
    {
         char pause;
         system("ls test* > list.txt");
//         cin >> pause;
//         cout << "Check list.txt" << "\n";
//         exit(0);
         return(0);
    }
// open list of file. Get weak check sum for files and write then to weaksum.txt with file names
    int getweaksums(int buffersize)
    {
         // declare variables
         fstream c1myfile1("list.txt", ios::in);
         fstream c1myfile2("weaksums.txt", ios::out);
         string file1; 
         fstream myfile1;
         int x;
         long long checksum = 0;
         long long begin1;
         long long count1;
         long long count2;
         unsigned char buffer(buffersize);
         long long size1;
         long long size2;
         long long filesize;
         string pause;
         // open main loop
         do
         {
              // read list
              c1myfile1 >> file1;
//              cout << file1 << "\n";
              if (c1myfile1.eof())
              {
                   break;
              }

              // get weak check-sum of file
// ================================================================================================              
// Start getting weak check sum
              // open file1
              myfile1.open(file1.c_str(), ios:: in | ios:: binary);
              if (!myfile1)
              {
                   cout << "122608-12:02 am Unable to open file.\n";
                   cin >> pause;
                   exit(1); // terminate with error
              }
              // get file size
              myfile1.seekg(0, ios::beg);
              size1 = myfile1.tellg();
              myfile1.seekg(0, ios::end);
              size2 = myfile1.tellg();
              filesize = size2 - size1;
              // set checksum to 0
              checksum = 0;
              // set count1 to 0
              count1 = -1;
              // start first loop
              do
              {
                   // count1 = count1 + buffersize2
                   count1 = count1 + buffersize;
                   // read byte
                   begin1 = myfile1.tellg();
                   myfile1.seekg(count1);
                   if (!myfile1)
                   {
                        myfile1.close();
                        cout << "error in line 51.\n";
                        cin >> pause;
                        exit(1);
                   }
                   myfile1.read( reinterpret_cast( &buffer ),buffersize);
                   x = (int)buffer;
                   // calculate weak check sum
                   checksum = checksum + x;
              // end first loop while (count1 < ((filesize - 1) + buffersize2))
              } while (count1 <  filesize - 1);
              // close files
              myfile1.close();
              myfile1.clear();
              myfile1.flush();
// END GETTING WEAK CHECK STRONG
// ================================================================================================
              if (c1myfile1.eof())
              {
                   break;
              }
              // write weak check-sum to file
              c1myfile2 << checksum << "\n";
        // repeat main loop to end of file
         } while(!c1myfile1.eof());
        // close list.txt
         c1myfile1.close();
         c1myfile1.clear();
         c1myfile1.flush();
        // close weaksums.txt
         c1myfile2.close();
         c1myfile2.clear();
         c1myfile2.flush();
        // return(0);
        return(0);
    } 
// open list of files. Get strong check sum for files and write them to strongchecksum.txt with file names
    int getstrongsums(long long howmanyweightedsums, int buffersize)
    {
         // declare variables
         fstream c1myfile1("list.txt", ios::in);
         fstream c1myfile2("strongsums.txt", ios::out);
         // open file2 for weights
         fstream c1myfile3("weights.txt", ios::in);
         string file1; 
         fstream myfile1;
         long double x1;
         string x2;
         int byte1 = 0;
         long double schecksum = 0;
         long long begin1;
         long long count1;
         long long count2;
         unsigned char buffer(buffersize);
         long long size1;
         long long size2;
         long long filesize1;
         long long end1 = 0;
         string pause;
//         stringstream ss;
         
         // open main loop
         do
         {
              // read list
              c1myfile1 >> file1;
              if (c1myfile1.eof())
              {
                   break;
              }   
// ================================================================================================              
// get strong check sum

              // open file1 computer file1
              fstream myfile1(file1.c_str(), ios::in | ios::binary);
              if (!myfile1)
              {
                   myfile1.close();
                   cout << "Failed to read file one.\n";
                   cin >> pause;
                   exit(1);
              }

              // get filesize1
              begin1 = myfile1.tellg();
              if (!myfile1)
              {
                   myfile1.close();
                   cout << "Failed to read file one.\n";
                   cin >> pause;
                   exit(1);
              }
              myfile1.seekg (0, ios::end);
              end1 = myfile1.tellg();
              filesize1 = (end1-begin1);

              // Two loops that get the strong check-sum
              count1 = 0;
              schecksum = 0;
              // start loop 1
              do
              {
                   // read file1
                   byte1 = 0;
                   // read file1
                   myfile1.seekg(count1);
                   myfile1.read( reinterpret_cast( &buffer ),buffersize);
                   begin1 = myfile1.tellg();
                   // byte1 = read from file 1
                   byte1 = (int)buffer;

                   count2 = 0;
                   // start loop 2
                   do
                   {
                        // count2++;
                        count2++;
                        // read weight file. 
                        c1myfile3.precision(36);
                        c1myfile3 >> x1;
                        // schecksum = schecksum + (byte1 * x1);
                        schecksum = schecksum + (byte1 * x1);
                   // end loop 2 for how many weighted sums
                   } while(count2 < howmanyweightedsums);
                   // count1 = count1 + buffersize;
                   count1 = count1 + buffersize;
              // end loop 1 for count1 < filesize1 - 1
              } while (count1 <  filesize1 - 1);
              // close file1 for program
              myfile1.close();
              myfile1.clear();
              myfile1.flush();     
// ================================================================================================
              // write weak check-sum to file
              c1myfile2.precision(36);
              c1myfile2 << schecksum << "\n";
        // repeat main loop to end of file
         } while(!c1myfile1.eof());
        // close list.txt
         c1myfile1.close();
         c1myfile1.clear();
         c1myfile1.flush();
        // close strongsums.txt
         c1myfile2.close();
         c1myfile2.clear();
         c1myfile2.flush();
        // close file2 for weights
         c1myfile3.close();
         c1myfile3.clear();
         c1myfile3.flush();
    }
// open list and count how many samples
    long long countsamples()
    {
         // declare variables
         long long count1 = 0;
         long long count2 = 0;  
         long long x1 = 0;
         long double x2= 0;
         string pause;
         // open weak sums list
         fstream c1myfile1("weaksums.txt", ios::in);         
         // open strong sums list
         fstream c1myfile2("strongsums.txt", ios::in);
         // set count1 to 0
         count1 = 0;
         // start loop1
         do
         { 
              // read weak sum
              c1myfile1 >> x1;
              // if end of file break
              if (c1myfile1.eof())
              {
                   break;
              }
              // increment count1
              count1++;
         // end loop 1
         } while(!c1myfile1.eof());
         // set count2 to 0
         count2 = 0;
         // start loop1
         do
         { 
              // read weak sum
              c1myfile2 >> x2;
              // if end of file break
              if (c1myfile2.eof())
              {
                   break;
              }
              // increment count1
              count2++;
         // end loop 1
         } while(!c1myfile2.eof());
        // close list.txt
         c1myfile1.close();
         c1myfile1.clear();
         c1myfile1.flush();
        // close strongsums.txt
         c1myfile2.close();
         c1myfile2.clear();
         c1myfile2.flush();
         if (count1 != count2)
         {
              cout << "count1 " << count1 << " Not equal to " << "count2 " << count2 << "\n";
              cin >> pause;
         }   
         // return(count2);
         return(count2); 
    }
// ex =  Sum of X Get sum of strong check-sums
    long double getexstrongsums()
    {
         long double x2= 0;
         long double count2 = 0;         
         // open strong sums list
         fstream c1myfile2("strongsums.txt", ios::in);
         count2 = 0;
         // start loop1
         do
         { 
              // read weak sum
              c1myfile2 >> x2;
              count2 = count2 + x2;
              // if end of file break
              if (c1myfile2.eof())
              {
                   break;
              }
              // increment count1
         // end loop 1
         } while(!c1myfile2.eof());
        // close strongsums.txt
         c1myfile2.close();
         c1myfile2.clear();
         c1myfile2.flush();
         return(count2);
    }
// ey =  Sum of Y Get sum of weak check-sums
    long long geteyweaksums()
    {
         long long x2= 0;
         long long count2 = 0;         
         // open strong sums list
         fstream c1myfile2("weaksums.txt", ios::in);
         count2 = 0;
         // start loop1
         do
         { 
              // read weak sum
              c1myfile2 >> x2;
              count2 = count2 + x2;
              // if end of file break
              if (c1myfile2.eof())
              {
                   break;
              }
              // increment count1
         // end loop 1
         } while(!c1myfile2.eof());
        // close strongsums.txt
         c1myfile2.close();
         c1myfile2.clear();
         c1myfile2.flush();
         return(count2);

    }
// ex^2 = Sum of x^2 Get sum of squares of strong check-sums
    long double getexsquare2sumofsquaresstrongsums()
    {
         long double x2= 0;
         long double count2 = 0;         
         // open strong sums list
         fstream c1myfile2("strongsums.txt", ios::in);
         count2 = 0;
         // start loop1
         do
         { 
              // read weak sum
              c1myfile2 >> x2;
              x2 = pow(x2, 2);
              count2 = count2 + x2;
              // if end of file break
              if (c1myfile2.eof())
              {
                   break;
              }
              // increment count1
         // end loop 1
         } while(!c1myfile2.eof());
        // close strongsums.txt
         c1myfile2.close();
         c1myfile2.clear();
         c1myfile2.flush();
         return(count2);

    }
// ey^2 = Sum of y^2 Get sum of squares of weak check-sums
    long long geteysquare2sumofsquaresweaksums()
    {
         long long x2= 0;
         long long count2 = 0;         
         // open strong sums list
         fstream c1myfile2("weaksums.txt", ios::in);
         count2 = 0;
         // start loop1
         do
         { 
              // read weak sum
              c1myfile2 >> x2;
              x2 = pow(x2, 2);
              count2 = count2 + x2;
              // if end of file break
              if (c1myfile2.eof())
              {
                   break;
              }
              // increment count1
         // end loop 1
         } while(!c1myfile2.eof());
        // close strongsums.txt
         c1myfile2.close();
         c1myfile2.clear();
         c1myfile2.flush();
         return(count2);
    }
// exy = Sum of X times Y Sum of Strong check-sums times weak check sums
    long double getexysumofstrongsumstimesweaksums(long double ex, long long ey)
    {
         long double count2 = 0;
         count2 = 0;
         count2 = ex * ey;
         return(count2);
    }
// Get X average of strong check-sum
    long double getxaverageofstrongsums(long double ex,long long samples)
    {
         long double count2 = 0;
         count2 = ex/samples;
         return(count2); 
    }
// Get y average of weak check-sums
    long long getyaverageofweaksums(long long ey, long long samples)
    {
         long long count2 = 0;
         count2 = ey/samples;
         return(count2);
    }
//     (n times (exy))-((ex) times (ey))
// b = --------------------------------     =  CALCULATE B
//      (n times (ex^2)) - ((ex)^2)
    long double getB(long long samples, long double ex, long long ey, long double exsquared, long long eysquared, long double exy)
    {
         long double b = 0;
         b = ((samples * exy) - (ex * ey)) / ((samples * exsquared) - exsquared);
         return(b);  
    }
// a = y - (b times x) = WRITE EQUATION TO CONFIGURE FILE
    int writeequationconfigfile(long long y, long double b, long double x)
    {
         fstream c1myfile2("regressionconfig.txt", ios::out);
         c1myfile2 << " a = y - (b times x)" << "\n";         
         c1myfile2.precision(36);
         c1myfile2 << " a = " << y << " - " << " ( " << b << " times " << x << " ) " << "\n";
        // close strongsums.txt
         c1myfile2.close();
         c1myfile2.clear();
         c1myfile2.flush();
         return(0);
    }
// ============================================================================================
// declare main
    int main (int argc, char *argv[])
    { 
         // declare variables
         int dummyfile;
         int buffersize = 1;
         long long howmanyweightedsums = 100;
         long long samples = 0;
         long double ex = 0;
         long long ey = 0;
         long double exsquared = 0;
         long long eysquared = 0;
         long double exy = 0;
         long double x = 0;
         long long y = 0;
         long double b = 0;
         string pause;
// ============================================================================================
// test subs here

// ============================================================================================
         // Run program
// run command to make list of files
         dummyfile = makelist(); // list will be called list.txt (make sure there are no other folders in this direction.
// open list of file. Get weak check sum for files and write then to weaksum.txt with file names
         dummyfile = getweaksums(buffersize);
// open list of files. Get strong check sum for files and write them to strongchecksum.txt with file names
         dummyfile = getstrongsums(howmanyweightedsums, buffersize); 
// open list and count how many samples
         samples = countsamples();
// ex =  Sum of X Get sum of strong check-sums 
         ex = getexstrongsums();
// ey =  Sum of Y Get sum of weak check-sums 
         ey = geteyweaksums();
// ex^2 = Sum of x^2 Get sum of squares of strong check-sums
         exsquared = getexsquare2sumofsquaresstrongsums(); 
// ey^2 = Sum of y^2 Get sum of squares of weak check-sums 
         eysquared = geteysquare2sumofsquaresweaksums();
// exy = Sum of X times Y Sum of Strong check-sums times sum of weak check sums 
         exy = getexysumofstrongsumstimesweaksums(ex,ey);
// Get X average of strong check-sum 
         x = getxaverageofstrongsums(ex,samples);
// Get y average of weak check-sums 
         y = getyaverageofweaksums(ey,samples);

//     (n times (exy))-((ex) times (ey))
// b = --------------------------------     =  CALCULATE B // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< We are here writing program
//      (n times (ex^2)) - ((ex)^2)
         b = getB(samples, ex, ey, exsquared, eysquared, exy);

// a = y - (b times x) = WRITE EQUATION TO CONFIGURE FILE
         dummyfile = writeequationconfigfile(y, b, x);

// delete left over files
         system("rm list.txt");
         system("rm strongsums.txt");
         system("rm weaksums.txt");

// EXIT PROGRAM
         exit(0); 
    }     
// ============================================================================================         
// Example of how my software will use regression lines.
// =================================== Starting sample
// Example of Graphing a regression line by hand.
// When done write files with the x and y files and see if they get the same answers as this example.
// x  1| 3|10| 16| 26| 36
// -------------------------
// y 42|50|75|100|150|200

// Goal - Get equation y = a + bx where  a = y intercept and b = slop 

// 1. Count how many samples you have.
// 2. Get sum of X
// 3. Get sum of y

// Symbol Chart
// ---------------------------
// n = How many Samples I have = 6
// ex =  Sum of X
// ey =  Sum of Y
// ex^2 = Sum of x^2
// ey^2 = Sum of y^2
// exy = Sum of X times Y
// e = sum
// -
// y = average of y = 102.8333......
// -
// x = average of x = 15.3.....

//                                     divided
// average = sum of samples / how many samples

//     (n times (exy))-((ex) times (ey))
// b = --------------------------------     =  4.51
//      (n times (ex^2)) - ((ex)^2)
//     -            -
// a = y - (b times x) = 33.83

// Now plug values into regression line. THIS IS WHERE WE GET STRONG CHECK SUMS FOR TIME TRAVEL MEDIA FILES.

//   y = a + (b times x) 

//   y = 33.83 + (4.51 times x)
//   x = 12

//   so y = 33.83 + (4.51 times 12) = 87.95

//================================================= Ending sample   

End of my file regression program. Here is the code for a check-sum generator.

// ============================================================================================     
// Readme.txt
// This program loads a calculated equation for a regression line and then calculates strong check sums based on that line.
// This program is for Time Travel Project at sourceforge.net. It is part of a computer time travel project.
// This program loads a config file that looks like this:
// Starting config
// y  = 1472.04615445774715964954992841740022 + -6.69876019552389287623492103147890969e-05 times 689
// y = a + bx 
// 1472.04615445774715964954992841740022 = 1472 -  ( -6.69876019552389287623492103147890969e-05 times 689 ) 
//  a = y - (b times x)
// end config
// This program then makes a counter out of X and generates strong check-sums for y that can be reconstructed with check sum hacking software.
// Counter9.cpp will be used to construct this check-sums. I am still finishing up counter 9
// Copyright (C) 2016 http://time-travel.institute
// ============================================================================================
 // declare includes
     #include
     #include
     #include
     #include
     #include
     #include  
     #include
     #include
     #include
     #include
// ============================================================================================
    // Declare namespace
    using namespace std;
// ============================================================================================     
// declare globals
       long double y;
       long long x;
       long double a;
       long double b;
// ============================================================================================     
// declare subs
// ============================================================================================     
// load regression config file
int loadconfig()
{
//    long long globalfilesize = 0;

//    long double globalstrongchecksum = 0;

//    long long globalweakchecksum = 0;

    // declare variables
    string dummy;
    string pause;

    // Load configure file
    fstream c1myfile("regressionconfig.txt", ios::in);
    // read name of file
    c1myfile >> dummy >> dummy >> a >> dummy >> b >> dummy>> x;


    // close configure file
    c1myfile.close();
    c1myfile.clear();
    c1myfile.flush();

    // Print configure file to confirm loaded correctly
//    cout.precision(36);
    cout << "a = " << a << " b = " << b << " x = " << x << "\n";
    cout << "\n"; 
    cout << "Is the configuration file loaded properly?" << "\n";
    cin >> pause;
    return(0);
//        
}
// ============================================================================================

    // Generate strong sums and write them to file
         // X = weak check sum. This is generated by a counter
         // y = strong check sum. It is computed with an equation
         // then write strong check sums to numbered config files example sch1.txt, sch2.txt, sch3.txt and so forth.
         // This will run in a loop
    int genstrchksums(long long howmanystrongchecksums, long long filesize)
    {
         // declare variables
         long long count1 = 0;
         long long x = 0;
         stringstream ss;
         string file1 = "";
         string pause;
         ofstream c1myfile;     
         do
         {
              
              count1++;
              stringstream ss; 
              ss << count1;
              ss >> file1;
              file1 = file1 + ".txt";
              x = count1;
              y = a + (b * x); 
              c1myfile.open(file1.c_str(),ios::out); 
              if (!c1myfile)
              {
                   cout << "Unable to open file line 100\n";
                   cin >> pause;
                   exit(1); // terminate with error
              }
              c1myfile.precision(36);
              c1myfile << y << " : " << filesize << "\n";
              c1myfile.close();
              c1myfile.clear();
              c1myfile.flush();
              file1 = "";
         } while(count1 < howmanystrongchecksums);
         return(0);
    } 
// ============================================================================================     
// declare subs
// ============================================================================================     
// declare main
    int main (int argc, char *argv[])
    { 
         // declare variables
         int dummyfile = 0;
         long long howmanystrongchecksums;
         long long filesize;
// ============================================================================================     
         // initilize program
         cout << "How many strong check-sums do you want." << "\n";
         cin >> howmanystrongchecksums;
         cout << "What filesize to use for these strong check-sums" << "\n";
         cin >> filesize;
// ============================================================================================     
         // run program
         dummyfile = loadconfig();
         dummyfile = genstrchksums(howmanystrongchecksums, filesize);
// ============================================================================================     
         // end program
         exit(0);
    } // end of main

// ============================================================================================     

WELL FUCK I GOING TO POST A COUNTER PROGRAM FOR DECODING A STRONG CHECK SUM. I WILL LEAVE THIS CODE UP AND START A NEW POST. COCK-BREATH PAMELA SAYS MY BLOGS ARE TOO LONG. WELL, I GOT A LOT TO FUCKING SAY.

// COUNTER9.CPP CLIENT PROGRAM
// NOTE - I STILL HAVE A LOT TO DO WITH THIS. THE MAIN CHANGE HERE IS I AM LOSING THE RESTORE COUNTER AND ADDING ONLY.
// I HAVE TO ADD IN ANOTHER ALGORITHM FOR THE SPEED. I AM PLAYING 3 DECRYPT FUNCTIONS
// 1. RANDOM 2. LINEAR MOVING SECTIONS 3. PENDALUM 
// README
// THIS IS A PROGRAM THAT CAN TAKE A COMPUTER FILE AND CREATE A STRONG CHECK SUM FROM A COMPUTER FILE AND LOAD IT TO A CONFIG FILE.
// THIS PROGRAM CAN ALSO LOAD A CONFIG FILE AND RECREATE THAT CHECK SUM. 
// THIS PROGRAM CAN BE USED TO RECONSTRUCT A STRONG CHECK SUM IN LINEAR OR PARALLEL MODE AS PART OF ANOTHER PROGRAM.
// This program will be used by the Armageddon A.I. in the Armageddon project.

// Copyright (C) 2016 http://time-travel.institute
// ============================================================================================
 // declare includes
     #include
     #include
     #include
     #include
     #include
     #include  
     #include
     #include
     #include
     #include
     #include
// This is a dependancy. I MIGHT NOT USE THIS IN THE FINAL PROGRAM. ITS OUTDATED// ============================================================================================
    // Declare namespace
    using namespace std;
// ============================================================================================     
// declare globals
    // declare global array counter to max file size
    int counter[100]; // max file size
    // declare global array speed1 to max file size
    int speed1[100];
    // declare global array speed2 to max file size
    int speed2[100];
    // declare global array backup to max file size
    int backup[100];
    // declare global array weights to max file size
    long double weights[100];
    // declare global file name
    string globalfile = "";
    // declare global file size
    long long globalfilesize = 0;
    // declare global strong check sum;
    long double globalstrongchecksum = 0;
    // declare global how many weighted sums
    long long globalhowmanyweightedsums = 0;
    // declare global password for weights Constant
    long long globalpassword = 0;
    // declare global destination
    long double globaldestination = 0;
    // declare global target
    long double globaltarget = 0;
    // declare global count1
    long long count1 = 0;
    // declare globalcounterspeedmode
    int globalcounterspeedmode;
    // declare config
    int config;

    // Later use entropy here for Armageddon Will start new globals and new subs and new sections of main
// ============================================================================================     
// declare subs
// This is where all the work is done to make the program run.
// ============================================================================================
int tweak()
{
    // declare variables
    long long howmanybytestotweak = 0;
    long long byte1 = 0;
    long long count1;
    long long count2 = 1;
    long long count3 = -1;
    string pause;
// declaring variable to hold time in seconds from timer.
    time_t seconds;
// getting time in seconds from time.
    time(&seconds);
                  
    // converting time in seconds to unsigned interger and seeding the random number generator
    srand((unsigned int) seconds);
//    howmanybytestotweak = rand() % globalfilesize;  
//    count3 = -1;            
//    do
//    {
//         count3++;
         count1 = rand() % globalfilesize;
         if (count1 == globalfilesize)
         {
              cout << "Wrong position tweak" << "\n";
              cin >> pause;
              exit(1);
         } 
         byte1 = rand() % 256; 
         counter[count1] = byte1;
// converting time in seconds to unsigned interger and seeding the random number generator
         srand((unsigned int) seconds);
//    } while(count3 < howmanybytestotweak);
    return(0); 
}
// ============================================================================================
int subtractspeed2()
{

     // declare variables
     int carry = 0;
     int byte1 = 0;
     int byte2 = 0;
     int byte3 = 0;
     string pause;
     long long count1 = -1;

     do
     {

          // increment counter variable
          count1++;

          // read arrays
          byte1 = counter[count1];
          byte2 = speed2[count1];

          byte3 = byte1 - byte2 - carry;
          carry = 0;

          // if file1 + file2 + carry => base subtract the base and set carry to 1 else carry = 0
          if (byte3  < 0)
          {
               byte3 = byte3 + 256;
               carry = 1;
          }

          // write remainder to file 1
          if (byte3 > 255)
          {
               cout << "Houston we have a problem\n";
               cout << "Byte3 greater than the base - 1\n";
               cin >> pause;
               exit(1);
          }

          counter[count1] = byte3;
          
     } while (count1 < globalfilesize - 1) ;
     return(0);

}

// ============================================================================================
int subtractspeed1()
{

     // declare variables
     int carry = 0;
     int byte1 = 0;
     int byte2 = 0;
     int byte3 = 0;
     string pause;
     long long count1 = -1;

     do
     {

          // increment counter variable
          count1++;

          // read arrays
          byte1 = counter[count1];
          byte2 = speed1[count1];

          byte3 = byte1 - byte2 - carry;
          carry = 0;

          // if file1 + file2 + carry => base subtract the base and set carry to 1 else carry = 0
          if (byte3  < 0)
          {
               byte3 = byte3 + 256;
               carry = 1;
          }

          // write remainder to file 1
          if (byte3 > 255)
          {
               cout << "Houston we have a problem\n";
               cout << "Byte3 greater than the base - 1\n";
               cin >> pause;
               exit(1);
          }

          counter[count1] = byte3;
          
     } while (count1 < globalfilesize - 1) ;
     return(0);

}
// ============================================================================================
    // int setspeed2linear(long long globalfilesize) // Linear speed // Sets a linear speed of the counter
long long setspeedlinear2(long long globalfilesize, long long linear2count)

     int carry = 0;
     if (speed2[linear2count + 1] == 255) //WHAT EVER YOU ADD HERE.
     {
          linear2count++;
          if (linear2count == globalfilesize - 1) // YOU MUST SUBTRACT HERE. SO EXAMPLE PLUS 1 MINUES 1
          {
               linear2count = 0;
          }

          count1 = -1;
          do
          {
               count1++;
               speed2[count1] = 0;
          } while(count1 < globalfilesize - 1);
     }


     count1 = linear2count - 1;                       
     do
     {
          count1++;
          if (count1 == linear2count)
          {
               speed2[count1] = speed2[count1] + 1 + carry;
               carry = 0;
          }

          if (count1 > linear2count)
          {
               speed2[count1] = speed2[count1] + carry;
               carry = 0;
          }

          // speed[count1] = speed[count1] + speed[count1] + carry;              
          if (speed2[count1] > 255)
          {
               speed2[count1] = speed2[count1] - 256;
               carry = 1;
          }

    } while(count1 < globalfilesize - 1);
    return(linear2count);
}
// ============================================================================================
    // int initilizearrays(long long maxarraysize) // sets all arrays to zero.
    int initilizearrays(long long maxarraysize)
    {
         // declare variables
         long long count1 = -1; 
         do
         {
              count1++;
              counter[count1] = 0; // max file size
              speed1[count1] = 0; // max file size
              speed2[count1] = 0; // max file size
              backup[count1] = 0; // max file size
              weights[count1] = 0; // max file size
         } while(count1 < maxarraysize - 1);
         return(0);
    }
// ============================================================================================
    int addarraysspeed1(long long globalfilesize)
    {

         // declare variables
         long long count1 = 0;
         int carry = 0;
         char pause;
         
         // add speed array to counter array
         count1 = -1; 
         carry = 0;
         do
         {
              count1++;
              counter[count1] = counter[count1] + speed1[count1] + carry;
              carry = 0;
              if (counter[count1] > 255)
              {
                   counter[count1] = counter[count1] - 256;
                   carry = 1;
              }           
              
         } while(count1 < globalfilesize - 1);
         return(0);      
    }

// ============================================================================================
    // int addarraysspeed2(long long globalfilesize) // Linear speed // Adds counter to linear speed.
    int addarraysspeed2(long long globalfilesize)
    {

         // declare variables
         long long count1 = 0;
         int carry = 0;
         char pause;
         
         // add speed array to counter array
         count1 = -1; 
         carry = 0;
         do
         {
              count1++;
              counter[count1] = counter[count1] + speed2[count1] + carry;
              carry = 0;
              if (counter[count1] > 255)
              {
                   counter[count1] = counter[count1] - 256;
                   carry = 1;
              }           
              
         } while(count1 < globalfilesize - 1);
         return(0);      
    }
// ============================================================================================
    // int setspeed1random(long long globalfilesize) // Random speed1 // Sets a random throttled speed of the counter.
    int setspeed1random(long long globalfilesize) // when running in parallel wait one second before starting another application
    {
         long long a = 3;
         long long c = 2361;
         long long m = 999999;
         long long k = 0;
         long long r = 0;
         char pause;
         long long count2 = 0;
         long long filesize2 = 0;
         int byte1 = 0;
         filesize2 = globalfilesize; 
//    Declare variable to hold seconds on clock.
         time_t seconds;
         count2 = -1;
         do
         {
              count2++;
              speed1[count2] = 0;
         } while(count2 < 100); // set this for max array size!!!!!!!!!!!!!!!!!!!!!!!!!!!!

         count1 = count1 + 1;
         time(&seconds);
         k = count1 + seconds;         
         srand((unsigned int) seconds);
         filesize2 = (rand() % globalfilesize);
         if (filesize2 == globalfilesize)
         {
              cout << "Wrong position setspeed1random" << "\n";
              cin >> pause;
              exit(1);
         } 


//         filesize2 = (a * k + c) % globalfilesize + 1;

// cout << filesize2 << " " << k << "\n";
// cin >> pause;

         count2 = -1;
         do
         {
              count1 = count1 + 1;
              if (count1 == 999999)
              {
                    count1 = 1;
              }  
 //             k = count1;
              time(&seconds);
              k = count1 + seconds; 
              byte1 = (a * k + c) % (int)256;
              count2++;
              speed1[count2] = byte1;
              if (count2 == filesize2)
              {
                   break;
              }
          } while(count2 < filesize2); 
//         } while(count2 < globalfilesize - 1);
         return(0);
    } 
// ============================================================================================
    // int setspeed2linear(long long globalfilesize) // Linear speed // Sets a linear speed of the counter
int setspeedlinear1(long long globalfilesize, long long bytesadded, int linearmode)
{ // Come back and rewrite this Using distance = speed * time
         // declare variables 
         int carry;
         long long count1;
         string pause;
  
         if (linearmode == 1) // speed increases some # of bytes. Variable
         {
        // add speed array to speed array (Put do loop around this to magnify it if needed)
//         counterspeed++;
              carry = 0;
              count1 = -1;                       
              do
              {
                   count1++;
                   if (count1 < bytesadded)
                   {
                        speed2[count1] = speed2[count1] + 1 + carry;
                        carry = 0;
                   }

                   if (count1 >= bytesadded)
                   {
                        speed2[count1] = speed2[count1] + carry;
                        carry = 0;
                   }

              // speed[count1] = speed[count1] + speed[count1] + carry;              
                   if (speed2[count1] > 255)
                   {
                        speed2[count1] = speed2[count1] - 256;
                        carry = 1;
                   }

              } while(count1 < globalfilesize - 1);
         }
         
         if (linearmode == 0) // speed stays at specific number of bytes. Constant
         {

              count1 = -1;
              do
              {
                   count1++;
                   speed2[count1] = 0;

              } while(count1 < globalfilesize - 1);

              count1 = -1;
              do
              {
                   count1++;
                   speed2[count1] = 1;

              } while(count1 < bytesadded - 1);
         }

         return(0);
}
// ============================================================================================
    // Add more decrypt functions here as needed <<<<<<<<<<<<<<<<<<< // Adds more functions to program as needed.
// ============================================================================================
    // long long filesize(string globalfile) // Gets the file size of a computer file.
long long filesize(string globalfile)
{
// declare variables
    long long begin1;
    long long end1;
    long long filesize1;
    string pause;  
    string file1 = globalfile;
      
    // open file1
     fstream myfile1(file1.c_str(), ios::in | ios::binary);
     if (!myfile1)
     {
          myfile1.close();
          cout << "Failed to read file one line 134.\n";
          cin >> pause;
          exit(1);
     }

// get filesize1
     begin1 = myfile1.tellg();
     if (!myfile1)
     {
          myfile1.close();
          cout << "Failed to read file one line 316.\n";
          cin >> pause;
          exit(1);
     }
     myfile1.seekg (0, ios::end);
     end1 = myfile1.tellg();
     filesize1 = (end1-begin1);     

// close file 1
     myfile1.close();
     myfile1.clear();
     myfile1.flush();

// return filesize
     return(filesize1);
// end sub
}
// ============================================================================================
    // long long strongchecksum(string globalfile, globalfilesize) // Gets a strong checksum of a computer file
long double getstrongchecksumfile(string globalfile, long long globalpassword , int globalhowmanyweightedsums)
{
//     cout << "Getting weighted check sum\n";
     long double schecksum;
     int byte1 = 0;
     long long count = -1;
     long long count2 = 0;
     long long filesize1 = 0;
     long long begin1 = 0;
     long long end1 = 0;
     long long seednumber = 0;
     int buffersize = 1;
     unsigned char buffer(buffersize);
     long double x1 = 0;
     long long x2 = 0;
     string pause;
     string file1 = globalfile;
     long long password = globalpassword;
     MTRand mtrand1a( password );
     
     // open file1
     fstream myfile1(file1.c_str(), ios::in | ios::binary);
     if (!myfile1)
     {
          myfile1.close();
          cout << "Failed to read file one.\n";
          cin >> pause;
          exit(1);
     }

// get filesize1
     begin1 = myfile1.tellg();
     if (!myfile1)
     {
          myfile1.close();
          cout << "Failed to read file one.\n";
          cin >> pause;
          exit(1);
     }
     myfile1.seekg (0, ios::end);
     end1 = myfile1.tellg();
     filesize1 = (end1-begin1);

     mtrand1a.seed(password);
     count = 0;
     schecksum = 0;
do
     {

          byte1 = 0;
// read file1
          myfile1.seekg(count);
          myfile1.read( reinterpret_cast( &buffer ),buffersize);
          begin1 = myfile1.tellg();
          byte1 = (int)buffer;
          count2 = 0;
     do
          {
               count2++;
      x1 = mtrand1a.randExc(.9999999);
                       // Change the password (It has to be different to get different results)
                       password++;
                       mtrand1a.seed(password);
//               weightedsumarray2[count] = weightedsumarray2[count] + (byte1 * x1);
               schecksum = schecksum + (byte1 * x1);
          } while(count2 < globalhowmanyweightedsums);
//           schecksum = schecksum + weightedsumarray2[count];
      count = count + buffersize;
     } while (count < globalfilesize - 1);
     myfile1.close();
     myfile1.clear();
     myfile1.flush();
     return(schecksum);

}
// ============================================================================================
    // Used for running the program without user input.
    // int loadconfig file // Will use only 5 variables 1. File name 2. File size 3. Strong checksum 4. How many weights 5. password
    // Load project from config file
// check if test = 1
int loadconfig()
{
//    long long globalfilesize = 0;

//    long double globalstrongchecksum = 0;

//    long long globalweakchecksum = 0;

//    string globalfile = "";
    // declare variables
    string dummy;
    string pause;


// Load configure file
          fstream c1myfile("filechecksumconfig.txt", ios::in);
          // read name of file
          c1myfile >>  dummy >> dummy >> dummy >> globalfile;
          // read weak check sum
//          c1myfile >>  dummy >> dummy >> globalweakchecksum;
          // read strong check sum 
          c1myfile >>  dummy >> dummy >> globalstrongchecksum;
          // read file size
          c1myfile >>  dummy >> dummy >> dummy >> globalfilesize;
          // read how many weights
          c1myfile >>  dummy >> dummy >> dummy>> dummy >> dummy >> globalhowmanyweightedsums;
          // read mode for counter speed for linear or random or none
//          c1myfile >>  dummy >> dummy >> dummy>> dummy >> globalcounterspeedmode;
          // read mode for tweak counter for linear or random or none
//          c1myfile >>  dummy >> dummy >> dummy>> dummy >> globaltweakcountermode;
          // read password for weights
          c1myfile >> dummy >> dummy >> dummy >> globalpassword;

         // close configure file
          c1myfile.close();
          c1myfile.clear();
          c1myfile.flush();

         // Print configure file to confirm loaded correctly
          cout << "File name > " << globalfile << "\n";
//          cout.precision(36);
//          cout << "Weak check-sum > " << globalweakchecksum << "\n";
          cout.precision(36);
          cout << "Strong check-sum > " << globalstrongchecksum << "\n";
          cout.precision(36);
          cout << "File size > " << globalfilesize << "\n";
          cout.precision(36);
          cout << "How many weighted check-sums > " << globalhowmanyweightedsums << "\n";
//          cout << "Global counter mode > " << globalcounterspeedmode << "\n";    
//          cout << "Global tweak counter mode > " << globaltweakcountermode << "\n";
          cout << "Global password for weights > " << globalpassword << "\n";
          cout << "\n"; 
          cout << "Is the configuration file loaded properly?" << "\n";
          cin >> pause;
          return(0);
//        
}
// ============================================================================================
    // int restorecounter(long long globalfilesize) // Restores backed up counter.
int restorecounter(long long globalfilesize)
{
     
     // declare variables
     long long count1;

     // declare variables
     count1 = -1;
     do
     {
          count1++;
          counter[count1] = backup[count1];
     } while(count1 < globalfilesize - 1); 
     return(0);
}
// ============================================================================================
    // int backupcounter(long long globalfilesize) // Backups counter.
int backupcounter(long long globalfilesize)
{
     // declare variables
     long long count1 = -1;
     do
     {
          count1++;
          backup[count1] = counter[count1];
     } while(count1 < globalfilesize - 1);
     return(0);     
}
// ============================================================================================
    // int generateweights(long long globalpassword, long long globalfilesize) // weights for getting weighted sum
// Generate weights
int generateweights(long long globalpassword, long long globalfilesize)
{
// declare variables
    long long password = globalpassword;
    MTRand mtrand1a(password);
    mtrand1a.seed(password);
    long long count2;
    long double x1;
    long double x2;
    int test;
    string pause;

// Generate weights
    count2 = -1;
    do
    {
         count2++;
         x1 = mtrand1a.randExc(.9999999);
         // Change the password (It has to be different to get different results)
         password++;
         mtrand1a.seed(password);
         weights[count2] = x1;
    } while (count2 < (globalhowmanyweightedsums * globalfilesize));
    
    // do bubble sort of weights
    do
    {
         count2 = -1;
         test = 0;
         do
         { 
              count2++;
              if (weights[count2] > weights[count2 + 1])
              {
                   x1 = weights[count2];
                   x2 = weights[count2 + 1];
                   test = 1;
                   weights[count2] = x2;
                   weights[count2 + 1] = x1;
              }
         } while(count2 < (globalhowmanyweightedsums * globalfilesize));         
    } while(test > 0);
    return(0);
}
// ============================================================================================
    // int displayoutput(long double globaldestination, long double globaltarget) // Displays output of program for testing
    int displayoutput(long double diff3, long double globaldestination, long double globalstrongchecksum, long double destinationstrongsum, long long linear2count) // Displays output of program for testing
    {
         // cout << diff3 << " ";
//         long long count1 = -1;
//         string pause;
//         do
//         {
//              count1++;
//              cout.precision(36);
//              cout << speed2[count1] << " ";
//         } while (count1 < globalfilesize);
//         cout << "\n";
//         cin >> pause;
//-----------------------------------------------
//     cout << diff3 << " ";
//     count1 = -1;
//     do
//     {
//          count1++;
//          cout.precision(36);
//          cout << backup[count1] << " ";
//     } while (count1 < globalfilesize - 1);
//     cout << "\n";
//     count1 = -1;
//     do
//     {
//          count1++;
//          cout.precision(36);
//          cout << speed1[count1] << " ";
//     } while (count1 < globalfilesize - 1);  
// -------------------------------------------------  
//     cout.precision(36);
//      cout << "Diff3 " << diff3 << " Destination sum " << destinationstrongsum << " Target sum "<< globalstrongchecksum << " linear2count " << linear2count << "\n";
// -----------------------------------------------------------------------------
      cout << "Diff3 " << diff3 << " Destination sum " << destinationstrongsum << " Target sum "<< globalstrongchecksum << "\n";
//      count1 = -1;
//     do
//     {
//          count1++;
//          cout.precision(36);
//          cout << speed2[count1] << " ";
//     } while (count1 < globalfilesize - 1);
//     cout << "\n";  
     return(0);
    }
// ============================================================================================
    // int writecountertofile(long long globalfilesize, string globalfile) // writes counter in memory to file.
// Write counter to file.
int writecountertofile(long long globalfilesize, string globalfile)
{
     long long count1 = -1;
     string file1 = globalfile;
     unsigned char buffer;
     int buffersize = 1;
     long long begin1;
     char pause;
     int byte1;

    // open counter file
     fstream myfile1(file1.c_str(), ios:: out | ios:: binary);
     if (!myfile1)
     {
          cout << "Error in line 841.\n";
          cin >> pause;
          myfile1.close();
          myfile1.clear();
          myfile1.flush();
          exit(1); // terminate with error
     }
     
     do
     {

         count1++;
         byte1 = counter[count1];
         buffer = (unsigned char)byte1;
         myfile1.seekp(count1);
         myfile1.write( reinterpret_cast( &buffer ),buffersize);
         begin1 = myfile1.tellp();

     } while(count1 < globalfilesize-1);
     return(0);         


}
// ============================================================================================
long double getstrongchecksumarray(long long globalpassword, int globalhowmanyweightedsums, long long globalfilesize)
{
     long double schecksum;
     int byte1 = 0;
     long long count = -1;
     long long count2 = 0;
     long double x1 = 0;
     long long x2 = 0;      
     long long password = globalpassword;
     MTRand mtrand1a(password);
     string pause;
     mtrand1a.seed(password);
     count = 0;
     schecksum = 0;
do
     {

          byte1 = 0;
// read array
          byte1 = counter[count];
          count2 = 0;
     do
          {
               count2++;
      x1 = mtrand1a.randExc(.9999999);
                       // Change the password (It has to be different to get different results)
                       password++;
                       mtrand1a.seed(password);
               schecksum = schecksum + (byte1 * x1);
          } while(count2 < globalhowmanyweightedsums);
          count = count + 1;
     } while (count < globalfilesize - 1);
     return(schecksum);

}
// ============================================================================================
// declare main
    int main (int argc, char *argv[])
    { 
         // declare variables
         int dummyfile = 0;
         int count1 = 0;
         string pause;
         long double diff3 = 0;
         long long bytesadded = 0;
         int linearmode = 0;
         stringstream ss;
         long long maxarraysize = 0;
         long double destinationstrongsum = 0;
         long long linear2count = 0;
// ============================================================================================         
         // pass arguments to program. If no arguments run menu. If Arguments run program
         if (argc == 1) 
         {
              goto jump1;
         }
// passing command line arguments to program
//    test = strtoull(argv[11],NULL,10);



     // WE GET SEGMENTATION FAULT WHEN NO VALUES PASSED
    // passing command line arguments to program
    globalfile = argv[1];


    if (globalfile == "help")
    {
         cout << "Order of command line arguments." << "\n";
         cout << "1 file" << "\n";
//         cout << "2 weak check sum" << "\n";
         cout << "2 strong check sum" << "\n";
         cout << "3 file size" << "\n";
         cout << "4 How many weighted sums" << "\n";
//         cout << "6 speed mode - 2=Random 1=linear 0=none" << "\n";
//         cout << "7 tweak mode - 2=Random 1=linear 0=none" << "\n";
         cout << "5 menu choice 1 only right now. So use 1" << "\n";
         cout << "6 config file - 1 = yes 0 = no" << "\n";
         cout << "7 password" << "\n";
//         cout << "11 test 1 = yes 0 = no" << "\n";
         cin >> pause;
         exit(0);
    }    

    // passing command line arguments to program
//    globalweakchecksum = strtoull(argv[2],NULL,10);

    // passing command line arguments to program
    ss << argv[2];
    ss >> globalstrongchecksum;


    // passing command line arguments to program 
    globalfilesize = strtoull(argv[3],NULL,10); // NEVER MORE THAN 4 BYTES. I USE THIS FOR COUNTERS LESS THAN 2 BYTES


   // passing command line arguments to program
   globalhowmanyweightedsums = strtoull(argv[4],NULL,10);


    // passing command line arguments to program
    globalcounterspeedmode = strtoull(argv[5],NULL,10);


// passing command line arguments to program
//    globaltweakcountermode = strtoull(argv[7],NULL,10);



// passing command line arguments to program
    config = strtoull(argv[6],NULL,10);


// passing command line arguments to program
    globalpassword = strtoull(argv[7],NULL,10); // constant

// getting globalpassword2 non-constant
//    globalpassword2 = globalpassword;


   // passing command line arguments to program 
//   choice2 = argv[8];

    
//    if (choice2 == "1")
//    {
//         choice = '1';
//         goto jump2;
//    }    
 // ============================================================================================         
         // if arguments load config file
         if (config == 1)
         {
              dummyfile = loadconfig();
              goto jump3;

         }
// ============================================================================================
         // if no arguments go here
jump1:
         // Menu
         // if no arguments get user input (Later this will create config file for backup) This will be used to run in parallel. 
    // ask user if this is a config file yes or no
    cout << "If you have a config file type 1 and enter. Else type 0 and enter." << "\n";
    cin >> config;

// if config file goto jump
         if (config == 1)
         {
              dummyfile = loadconfig();
              goto jump3;
         }

    // ask user file name
         cout << "Please enter the name of your target file." << "\n";
         cin >> globalfile;


         cout << "What is your max array size?" << "\n";
         cin >> maxarraysize;


// ask how many weights to use for strong check sum
         cout << "How many weighted sums are we using?" << "\n";
         cin >> globalhowmanyweightedsums;


    // ask seed number for random number generator
         cout << "What is the seed number for your weights?" << "\n";
         cin >> globalpassword;


         // setting non-constant password for seeding random number generator.
//         globalpassword2 = globalpassword;

// ============================================================================================
jump3:
    // initiliaze all arrays   
         dummyfile = initilizearrays(maxarraysize);

cout << " Initilize arrays " << "\n";   

     // get file size of file (do from sub)
         globalfilesize =  filesize(globalfile); 

//globalfilesize = 3;

cout << " Get file size " << "\n"; 

    // Generate weights in array // Bubble sort weights
         dummyfile = generateweights(globalpassword, globalfilesize);

cout << " Generate weights " << "\n";
        
    
    // get strong check sum of file (do from sub)
         globalstrongchecksum = getstrongchecksumfile(globalfile, globalpassword , globalhowmanyweightedsums);

cout << " Get strong check sum " << "\n";         

    // get strong checksum of array (do from sub)
//    strongchecksumarray1 = getstrongchecksumarray(globalpassword, globalhowmanyweightedsums, globalfilesize);

    if (config == 0)
    {
         cout << "Please move or delete your file. It may get over written." << "\n";
         cin >> pause;
    }

    destinationstrongsum = getstrongchecksumarray(globalpassword, globalhowmanyweightedsums, globalfilesize);
    
   // diff3 = 9999999999999999999999999999999999
   diff3 = abs(globalstrongchecksum - destinationstrongsum);


// ============================================================================================         
         // run main loop for file construction
         do
         {
// ============================================================================================
// Test subs here
         // Test subs
//         count1 = 0;
//         do
//         {
//              dummyfile = setspeed1random(globalfilesize);
//                bytesadded = 2;
//                linearmode = 0;
//                dummyfile = setspeedlinear(globalfilesize, bytesadded, linearmode);


//              dummyfile = displayoutput(diff3, globaldestination, globaltarget); // Displays output of program for testing

//         } while(count1 != -1);

// ============================================================================================
// Decrypt
// Function1  // Running in Random
              // set speed
              dummyfile = setspeed1random(globalfilesize);

              // add arrays
              dummyfile = addarraysspeed1(globalfilesize);

              // get destination strong check sum of counter array 
              destinationstrongsum = getstrongchecksumarray(globalpassword, globalhowmanyweightedsums, globalfilesize);

              // break loop if destination strong sum = target strong check sum
              if (abs(globalstrongchecksum - destinationstrongsum) == 0)
              {
                   if (globalstrongchecksum == destinationstrongsum)
                   {
                        break;
                   }
              }

              // if abs(destination - target) < diff3 then backup counter 
              if (abs(globalstrongchecksum - destinationstrongsum) < diff3)
              {
                   dummyfile = backupcounter(globalfilesize);
              // if abs(destination - target) < diff3 then diff3 = abs(destination - target)
                   diff3 = abs(globalstrongchecksum - destinationstrongsum); 
              }

              // IF abs(destination - target) < diff3 then pass counter to server program
              
              // if abs(diff2 - diff1) > diff3 restore backup
              if (abs(globalstrongchecksum - destinationstrongsum) > diff3)
              {
//                   dummyfile = restorecounter(globalfilesize);
              }

              // Display output (FOR TESTING ONLY)
//              dummyfile = displayoutput(diff3, globaldestination, globalstrongchecksum, destinationstrongsum, linear2count);
// ============================================================================================
// Decrypt
// Function2  // Running in Linear mode
              // set speed
//                linear2count = setspeedlinear2(globalfilesize, linear2count);

              // add arrays
//              dummyfile = addarraysspeed2(globalfilesize);

              // get destination strong check sum of counter array 
              destinationstrongsum = getstrongchecksumarray(globalpassword, globalhowmanyweightedsums, globalfilesize);

              // break loop if destination strong sum = target strong check sum
              if (abs(globalstrongchecksum - destinationstrongsum) == 0)
              {
                   if (globalstrongchecksum == destinationstrongsum)
                   {
                        break;
                   }
              }

              // if abs(destination - target) < diff3 then backup counter 
              if (abs(globalstrongchecksum - destinationstrongsum) < diff3)
              {
                   dummyfile = backupcounter(globalfilesize);
              // if abs(destination - target) < diff3 then diff3 = abs(destination - target)
                   diff3 = abs(globalstrongchecksum - destinationstrongsum); 
              }

              // IF abs(destination - target) < diff3 then pass counter to server program
              
              // if abs(diff2 - diff1) > diff3 restore backup
              if (abs(globalstrongchecksum - destinationstrongsum) > diff3)
              {
//                   dummyfile = restorecounter(globalfilesize);
              }

              // Display output (FOR TESTING ONLY)
//              dummyfile = displayoutput(diff3, globaldestination, globalstrongchecksum, destinationstrongsum, linear2count);
// ============================================================================================
// Decrypt
// Function 5 tweak()

//               dummyfile = tweak(); // This needs looked at for errors!!!!!!!!!!!!!!!!!!!!

              // get destination strong check sum of counter array 
              destinationstrongsum = getstrongchecksumarray(globalpassword, globalhowmanyweightedsums, globalfilesize);

              // break loop if destination strong sum = target strong check sum
              if (abs(globalstrongchecksum - destinationstrongsum) == 0)
              {
                   if (globalstrongchecksum == destinationstrongsum)
                   {
                        break;
                   }
              }

              // if abs(destination - target) < diff3 then backup counter 
              if (abs(globalstrongchecksum - destinationstrongsum) < diff3)
              {
                   dummyfile = backupcounter(globalfilesize);
              // if abs(destination - target) < diff3 then diff3 = abs(destination - target)
                   diff3 = abs(globalstrongchecksum - destinationstrongsum); 
              }

              // IF abs(destination - target) < diff3 then pass counter to server program
              
              // if abs(diff2 - diff1) > diff3 restore backup
              if (abs(globalstrongchecksum - destinationstrongsum) > diff3)
              {
//                   dummyfile = restorecounter(globalfilesize);
              }

              // Display output (FOR TESTING ONLY)
//              dummyfile = displayoutput(diff3, globaldestination, globalstrongchecksum, destinationstrongsum, linear2count);
// ============================================================================================
// Decrypt
// Function# // Put more decrypt functions in program as needed.
// ============================================================================================
// Display output
              // Display output (FOR TESTING ONLY)
              dummyfile = displayoutput(diff3, globaldestination, globalstrongchecksum, destinationstrongsum, linear2count);
// ============================================================================================
         // end main loop for file construction
         } while(globalstrongchecksum != destinationstrongsum);
// ============================================================================================
         // write counter to file
         dummyfile = writecountertofile(globalfilesize, globalfile);
// ============================================================================================
         if (argc == 1) 
         {
 // Display output 
              dummyfile = displayoutput(diff3, globaldestination, globalstrongchecksum, destinationstrongsum, linear2count);

              cout << "FILE RECONSTRUCTED!!!" << "\n";
              cin >> pause;
         }
         // end program
         exit(0);
    }

// BYE ========================================================================================

RAY HUDSON AND DARBY PHILLIPS I AM POSTING MY TIME TRAVEL CODE AND TALKING ABOUT TIME TRAVEL. YOU SEE EVERYONE DARBY PHILLIPS TOLD ME TO "CHANGE THE TOPIC". RAY HUDSON TOLD ME TO "STOP POSTING MY TIME TRAVEL CODE".

BAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAHAHAHAHAHAHAAHAHAHAHAHAHA!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

BAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAHAHAHAHAHAHAAHAHAHAHAHAHA!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

BAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAHAHAHAHAHAHAAHAHAHAHAHAHA!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

THEY WILL NEVER STOP ME. NEVER!!!!!!!!

NANA NANA BOO BOO I AM ON THE INTERNET NANA NANA BOO BOO I AM ON THE INTERNET NANA NANA BOO BOO I AM ON THE INTERNET. IM NOT AT HOME. IM NOT USING MY HOTSPOT!!!!!!!!!

BAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAHAHAHAHAHAHAAHAHAHAHAHAHA!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

THE CONSPIRACY AGAINST TIME TRAVEL CAN'T TOUCH THIS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!