Random thoughts about using computers to do things. Presently using an Alienware Aurora Desktop (Windows 10) , a Dell XPS 13 developer edition (Ubuntu 19.04) a Dell Precision M2800 laptop (Windows 10), a Mac Mini, an Apple iPhone 7, an Apple iPad 6, a Samsung Galaxy S8, a Samsung Tab A (2018), an iPod Classic 160GB plus CD's, DVD's, USB keys, and zip disks everywhere. Enjoy learning computing with me.

## Saturday, August 28, 2004

I am getting 5000 sheets of recycled paper for my printers. I am also getting a few ink cartridges for my Mac Epson Colour Stylus Photo 820 printer. Also I am getting some photo paper and some more filing supplies and crates. All these supplies are going to be ordered on-line from Staples.

## Friday, August 27, 2004

## Tuesday, August 24, 2004

//

// A C++ program for integrating a continuous random variable (1-x^2)^(3/2) between 0-1 and finding its expected value or mean.//

#include <iostream>

int Kvalue;

float Svalue;

int Seed;

float x;

int countK;

float Expected;

int main()

{

std::cout << "Enter integer for random seed: ";

std::cin >> Seed;

void srand(unsigned int Seed);

std::cout << "Enter integer for length of Simulation: ";

std::cin >> Kvalue;

countK=0;

Svalue = 0;

while (Kvalue >= countK){

x= (float) ( rand() / (RAND_MAX + 1 ) );

Svalue= Svalue + pow((1-x*x),(3/2));

countK++;

}

Expected= Svalue/Kvalue;

std::cout << "Expected Value = ";

std::cout << Expected;

std::cout << "Svalue = ";

std::cout << Svalue;

std::cout << "Kvalue = ";

std::cout << Kvalue;

return 0;

}

## Monday, August 23, 2004

## Sunday, August 22, 2004

//

// A C++ program For integrating a continous random variable exp(exp(X)) between 0-1 and finding its expected value or mean.//

#include

int Kvalue;

float Svalue;

int Seed;

float U;

int countK;

float Expected;

int main()

{

std::cout << "Enter integer for random seed: ";

std::cin >> Seed;

void srand(unsigned int Seed);

std::cout << "Enter integer for length of Simulation: ";

std::cin >> Kvalue;

countK=0;

Svalue = 0;

while (Kvalue >= countK)

{

U= (float) ( rand() / (RAND_MAX + 1 ) );

Svalue= Svalue + exp(exp(U));

countK++;

}

Expected= Svalue/Kvalue;

std::cout << "Expected Value = ";

std::cout << Expected;

std::cout << "Svalue = ";

std::cout << Svalue;

std::cout << "Kvalue = ";

std::cout << Kvalue;

return 0;

}

## Saturday, August 21, 2004

## Wednesday, August 18, 2004

*Interactive Markov Chains: And the Quest for Quantified Quality*(Berlin: Springer, 2002). This statistics book describes a method for modeling the performance of complex systems in particular this could apply to computer systems.

I was able to download a copy of Windows XP professional with SP1 because the mathematics and statistics department has an agreement with the MSDN Academic Alliance. I needed this because the WinXP laptop I have did not come with a WinXP CD. I can now maybe try to make this laptop dual boot. The WinXP CD will be for a system recovery if the installation fails. I am now going to burn the ISO image.

## Tuesday, August 17, 2004

*Simulation*2d (San Diego: Academic, 1997) will calculate the average value of X^2 between x=1-10 for a discrete version of x squared.

//

// A C++ program For Integrating a random variable (X^2) and finding its expected value or mean.//

#include

int Kvalue;

int Svalue;

int Seed;

int U;

int countK;

float Expected;

int main()

{

std::cout << "Enter integer for random seed: ";

std::cin >> Seed;

void srand(unsigned int Seed);

std::cout << "Enter integer for length of Integral: ";

std::cin >> Kvalue;

countK=0;

Svalue = 0;

while (Kvalue >= countK)

{

U= 1 + (int) ( 10.0 * rand() / (RAND_MAX + 1.0) );

Svalue= Svalue + U * U;

countK++;

}

Expected= Svalue/Kvalue;

std::cout << "Expected Value = ";

std::cout << Expected;

std::cout << "Svalue = ";

std::cout << Svalue;

std::cout << "Kvalue = ";

std::cout << Kvalue;

return 0;

}

Although I did not do any programming I did set up some music gear and record my wife and myself playing music using Audacity. So far this is trouble free software and I am having some good newbie experiences with this recording software.

## Sunday, August 15, 2004

*Simulation*2d (San Diego: Academic, 1997). I am trying to make the computer program from chapter 3 for integrating a random variable run a number of times in a loop using a psuedorandom number generator. The book has an example in BASIC. I am trying to write a similar program in C++. I have been searching the web for C++ syntax and so forth. It is not complete yet. I have the below code done so far but I am not returning a random number the right way yet.

Here is my code adopted from a simple C++ IO program from a basic learning C++ book using Quincy as my developer environment and of course gcc.

//

// A Simple C++ program For Integrating a random variable (X^2) and finding its expected value or mean.//

#include

int main()

{

int Kvalue;

float Svalue;

int Seed;

float U;

int countK;

float Expected;

std::cout << "Enter integer for random seed: ";

std::cin >> Seed;

void srand(unsigned int Seed);

std::cout << "Enter integer for length of Integral: ";

std::cin >> Kvalue;

countK=0;

Svalue = 0;

while (Kvalue >= countK)

{

float rand(U);

Svalue= Svalue + U*U;

countK++;

}

Expected= Svalue/Kvalue;

std::cout << "Expected Value = ";

std::cout << Expected;

std::cout << "Svalue = ";

std::cout << Svalue;

std::cout << "Kvalue = ";

std::cout << Kvalue;

return 0;

}

## Sunday, August 08, 2004

*Data Munging with Perl*(Greenwich, CT: Manning, 2001) that Unix measures time elapsed since Thursday, January 1st 1970. It measures it in seconds. Try this command on a Unix box or Macintosh running OSX.

**perl -e "print time";**

for user friendly time

**perl -e "print scalar localtime";**

When was a billion seconds?

**perl -e "print scalar localtime(1_000_000_000)";**

that's all btw this date is very close to September 11, 2001. Does this mean that Unix is involved in terrorism?