Sunday, May 27, 2007

Latex for blogger

If you need to type mathematics, Latex will help you (pronounced Latek, source: Wikipedia).
The formula shown above is written in Latex as:

$$\pi = \int_{0}^{1} \frac{4}{1+x^{2}}$$

Compiled on the fly using the link "http://www.forkosh.dreamhost.com/mimetex.cgi?" concatenated with the formula in Latex.

The professional tool for writing scientific documents: LaTeX NOT Microsoft Word. By Waleed Youssef Ph.D (FCI Helwan)
A reference to Latex here.

Thursday, May 24, 2007

STL Clips 1

Guess the output of that program:


#include <iostream>
#include <algorithm>
using namespace std;

int main()
{
string str = "<F";
transform(str.begin(),str.end(),str.begin(),bind2nd(plus<char>(),-2));
cout << str;
return 0;
}


Output (highlight to see):
:D

Saturday, May 19, 2007

A piece of code

Well, the title says it :D. I was bored so I did this image from a screen shot of the memory management module in ArOS. El mafrood en dah granite :D and don't ask elly gab 3aleeh code :D. I imagine it like a piece of paper that got wet and the ink was flushed. I've seen a similar black and white effect in "The code, Linux" documentary (which I am searching for the original English version, because the one I have is in Finnish)

Thursday, May 17, 2007

Electromagnetic shields - can SciFi be realized ?

First, those who will search for the term on Wikipedia, they are speaking about another thing. They mean shielding components against electromagnetic interference. But what I am talking about is making a physical shield from an electromagnetic field ( yup, a one that can prevent bullets from hitting you ).
It all began when I watched the "Elegant Universe" documentary on the theory of everything. Usually these theories aim to unify theories about weak and strong nuclear force, electromagnetic force, and gravity.
There was an example in it showing the gravity is much weaker than electromagnetic force that when an object falls to the ground, it is met by a resistance/repulsion between the electromagnetic field of it's electrons with the electromagnetic field of the ground's electrons. ( That's why electrons don't just mix up and object blend into each others mysteriously. )
So I thought if we can generate such an electromagnetic field to imitate that resistance, we can imitate that a physical shield does exist, and it will generate a repulsive force that prevent a moving entity from moving further using a collision.
The question is how we can generate such a thin layer of electromagnetic field without generating a big interference with the surrounding systems, especially the human body, which is sensitive to such field.
I don't actually have the exact knowledge to answer that. It is especially that I don't recall the exact relation between electromagnetic waves and electromagnetic fields. I don't also know the exact shield power needed to actually prevent something from going through, but I think it might be gigantic ( something related to "Energy = Mass X C2", where C = light speed in vacuum ). I need to revise electromagnetic shields and remember how they are calculated and if their direction might affect the total result or not. ( I might revise our freshmen year physics course ).
Anyone out there can help by suggesting topics or even telling me if this is possible or not ?