Tuesday, September 3, 2013

Open info becomes completely open!

WikiMedia gives you the opportunity to download the whole content of all its projects such as WikiPedia, Here is the link:

Now you have a massive amount of data that you can use offline under your hands. One idea comes to my mind: I think it is a good practice for utilizing BigData approaches.

One last thing, if you have access to a reliable storage and want to help WikiMedia, offer them a mirror!

Thursday, May 3, 2012

Awareness

Context Awareness is a term used frequently within Ubiquitous Computing targeting end-user to identify the surrounding environment and may automate intelligent actions according to the environment "a luxury purpose".

In the other side, Situational awareness which is an industry based term that can be used to identify the environment and provide proper responses in critical real-time applications through industrial sensors (e.g. Aerospace and defence applications)

Context vs Situational...

Friday, June 24, 2011

Unix Load Average

When you issue one of these commands "w, top, or uptime", you would find a parameter called Load Average with 3 fields; I thought it has sth related to a CPU utilization but after got asked about it in a Google interview, it seems to have more than that.

Here is uptime output:
14:34:03 up 10:43, 4 users, load average: 0.06, 1.11, 0.09

This means that the CPU is 6% underloaded in the last minute and overloaded by 11% in the last 5 minutes and is underloaded with 9% in the last 15 minutes.

For multiple CPUs architecture, it means that this number of processes can be scheduled on these CPUs.

This is useful for capacity planning and performance monitoring of CPU and the running processes.

It has been considered that 3 is a good threshold value (From O'Reilly UNIX Power Tools) .

Friday, June 3, 2011

DataTypes in Programming Languages

-statically typed language:
A language in which types are fixed at compile time. Most statically typed languages enforce this by requiring you to declare all variables with their datatypes before using them. Java and C are statically typed languages.

-dynamically typed language:
A language in which types are discovered at execution time; the opposite of statically typed. VBScript and Python are dynamically typed, because they figure out what type a variable is when you first assign it a value.

-strongly typed language:
A language in which types are always enforced. Java and Python are strongly typed. If you have an integer, you can't treat it like a string without explicitly converting it.

-weakly typed language:
A language in which types may be ignored; the opposite of strongly typed. VBScript is weakly typed. In VBScript, you can concatenate the string '12' and the integer 3 to get the string '123', then treat that as the integer 123, all without any explicit conversion.

So Python is both dynamically typed (because it doesn't use explicit datatype declarations) and strongly typed (because once a variable has a datatype, it actually matters).

* from DiveintoPython.org

Wednesday, December 15, 2010

Processor Revolution



Fig. Nvidia Tegra SoC second generation " Tegra 2"
The revolution of Smart Mobile Phone Processors.
More than 1GHz Dual Core Processor

Wednesday, November 10, 2010

Combination and Integration

-CORBA "Common Object Request Broker Architecture": briefly, is a standard to make objects of different programming languages and make them communicate together if they are in the same machine or many machines.

-MPI "Message Passing Interface": is an API that would allow distributed apps to run as a single app.

-SWIG: is a tool used to interface and generate bindings of C/C++ to variety of programming languages such as Java and Python. A special tool for python is called SPI.

Tuesday, November 2, 2010

How to remove extra menu items in grub boot loader

When I have installed updates for my ubuntu linux, the kernel image also updated so I found several images of linux kernel at my machine and also many menu items at the boot loader depending on the number of versions linux kernels in my machine. This was annoying for me.
Then I prefer to have only two menu items at boot loader: one for the current version of linux and the other for windows.

Procedure:
--Write down the menu items you do not like to see in grub. At my case "Ubuntu, with Linux 2.6.32-25-generic (recovery mode)" and "Ubuntu, with Linux 2.6.32-25-generic".
--Delete the following from file /boot/grub/grub.cfg

menuentry 'Ubuntu, with Linux 2.6.32-25-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,2)'
search --no-floppy --fs-uuid --set 039c3fcd-6448-4da2-9a2c-4ce29e4f7926
linux /boot/vmlinuz-2.6.32-25-generic root=UUID=039c3fcd-6448-4da2-9a2c-4ce29e4f7926 ro quiet splash
initrd /boot/initrd.img-2.6.32-25-generic
echo Abuselim
}
menuentry 'Ubuntu, with Linux 2.6.32-25-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,2)'
search --no-floppy --fs-uuid --set 039c3fcd-6448-4da2-9a2c-4ce29e4f7926
echo 'Loading Linux 2.6.32-25-generic ...'
linux /boot/vmlinuz-2.6.32-25-generic root=UUID=039c3fcd-6448-4da2-9a2c-4ce29e4f7926 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-25-generic
}

3. Go to /boot and delete files with "2.6.32-25" string
4. reboot and find results ;-)

By aselims