Basic Math

It took me so long time because that I was doing all of this on an IPAD!
This basic math program takes advantages of the object oriented programming and is built based on git source managing system and all commit histories are stored on GitHub.

GitHub-BasicMath

Although our dear professor H did not cover the arguments in C++ on the last lecture, we, who are good at self studying, worked out the exercise.

This project takes advantages of the following new stuffs covered in OOP344:
Preprocessor macro
GitHub
Arguments
Object Oriented Programming

Fortunately my iPad does compatible with all stuffs needed. XD

Source Code:
Coming Soon. Please check GitHub while it is unavailable.

How integers in VC++ 2012 are stored in memory on windows

This article is written by Luke(Parthas.Menethil.Sun). All rights reserved.

When we assign an integer to a variable, in fact, we store that number in some standard format into our memory somewhere. I have always been curious about how they are stored into our memory. Let’s check it out here.

Based on different languages, compilers, compiling configurations and systems, the answer may be various. My environment is using Visual Studio 2012 with the CL 17.00.51106.1 for x86 complier on Windows 7.

My testing code is simple:

#include
int main(){
	int i = 0x12ABCDEF;   // Assign a hexadecimal number
	printf("%x", &i);     // Get the memory address of that variable
	return 0;
}

First I assign a number to fill all bytes of the integer and output its memory address.

While running, we can use hex editors like WinHex to monitor what’s going on in the memory.

We can see at the specific offset, the variable in each byte is stored in the reverse order.

How to change the password on you INT322 website

As you guys who have a zenit account, your website should be:https://zenit.senecac.on.ca/~username/

But when you visit that webpage there’s a prompt pops up asking  username and password and you cannot see the website without providing them.

How to make your own password without removing them?

The htpasswd can add a username for you:

 

htpasswd -b ~/.htpasswd username password

The command will generate a token string based on provided username and password and attach the token string to the .htpasswd file in your home directory.

NOTE: Do NOT overwrite or delete any previous things from that file or your professor cannot access your website.

FAQ for geeks:

1. I found that there are some other information in the .htpasswd file and they seem to be our professor’s username and password. Could we take advantage of that to see my classmates’ web pages?

Technically and ethically NO. Those passwords are generated by some hash arithmetic which is irreversible.

2. There are some online Apache password file generater. Should I use them?

NO. Not every site is using HTTPS protocol to protect your data during the transmission, your username and password can be sniffed by others. Even though they use the safe protocol, your username and password might be recorded by their website which creates potential threats for you.

This article is written by Luke(Parthas.Menethil.Sun). All rights reserved.