Notes

C++ learning notes

in

Don't forget to assign a value to a variable before using it.

To declare a vector inside a vector
std::vector<std::vector<int> >
there is a space between the two ">"s

There is no "=" operator for arrays, so arrays are not copyable, so it's not possible to have a vector contain arrays.

in C++ struct is just like a class, it have constructors and destructor. This can make my life much easier. Finally I don't have to create a temporary variable just to create a struct.

struct segment{
       int x1,x2;
       segment(){
                 x1 = 0;
                 x2 = 0;
       }
       segment(int a, int b)
         { 
         if(a>b){
             x1 = b;
             x2 = a;
         }else{
             x1 = a; 
             x2 = b;
         }
         }
};

Learning Notes

in

To find how many CPU clocks have been run from the start of the program to now:

#include <time.h>
clock_t clockcycle;
clockcycle = clock();

CLOCKS_PER_SEC is a constant that shows how many CPU clocks per second. Divide the clock_t by CLOCKS_PER_SEC you get how many seconds the program runs.

Notes for May 24

in

Sensitive people... they must have soft skins.

Geeks have small group of friends, it's great to have geeks around because you don't have to remember a lot names.

Christmas 365 a year could screw everyone.

People have perfect diets, so when they get one more hydrogen ion, they become fat.

Spanish test are retarded.

People get hurt from playing badminton and stay in hospital for years.

Guys have 3 brains.
I always have to consult my balls first.
It's bad when the right ball don't agree with the left ball and get into intense argument.

milk + rice = Milkice

How much would you pay to see me cut off my finger?
$5000? you cold blooded bastard! Usually people would not pay to see that happen.

I eat pig liver. Not the one I dissected, that would be weird

My parents are realistic, once I asked why do I have to learn stuff, they conclude everything in 5 words:
Get people to fuck you!
THAT WHY i BECOME A PIMP AT 4.

People get offended by "good morning"
so...
screw those bitches!

Messing with Sasquatch.

When I was young, a puppy bite me.
"you son of a bitch!"
I love puns.

Chao is the ultimate Asian, rapping rich farmers.

skrbl pad

skrbl pad logo
skrbl pad is the scratch pad for users to share ideas with friends. Currently it only allows some basic text objects.

skrbl pad

Editor Comment:

If skrbl pad can use HTML then I can show my friends my techniques and impress people...and feel smug about it...

Syndicate content
Honey Pot that kill bots