Have you ever thought about the absence of girls as Linux users? Have you seen any girl struggling with failed dependencies of a rpm package? Can’t they struggle? or this is just a result of their lack of interest in computation in general?
I found the point discussed here and they have pointed out few reasons for their lack of interest(with results based on few researches) .
Women are less confident
Women have fewer opportunities for friendship or mentoring
Women are discouraged from an early age
Computing perceived as non-social
Lack of female role models
Life-work balance more important to women
Do you agree? How can we promote Linux to women ? LinuxChix is a community for Linux-women.
One hundred programmers are lined up one in front of the
other by an evil human resources person such that
programmers can see only the programmers in front of
them.The HR person puts a red hat or a blue hat on every
programmer.The programmers cannot see their own hats,
nor can they see the hats of those behind them,but they can
see the hats of the people in front of them.The HR person
starts with the last programmer in the back and says,
“What color is your hat?”
Programmers can answer with only one of two words,red
or blue.If the answer does not match the color of the hat on
the person’s head,the candidate is dismissed.Then the evil
HR person moves on to the next programmer,going from the
rear to the front of the row.Programmers in front get to hear
the answers of the programmers behind them,but not whether
they are dismissed or not.They can consult and agree on a
strategy before being lined up,but after being lined up and
having the hats put on,they can’t communicate in any way
other than by what has been specified.
What strategy should the programmers select to guarantee
the maximum number of surviving programmers?
Solution:
Is the best strategy for every programmer to say the same color, let’s
say “red” ? Assuming the hats were randomly distributed, half of them
would survive. Another strategy calls for every programmer to identify
the color of the hat on the head of the programmer immediately in front
of him or her. This guarantees the survival of that programmer, but does
nothing to promote the programmer’s own chances for survival. This
strategy also guarantees that at least half survive, plus a little more since
chance predicts that some of the programmers would have hats of the
same color as the person in front of them, thus sparing them both. In
fact, assuming random distribution of hats, this strategy yields a survival
rate of 75 percent. Getting better.
Some candidates might try to game the puzzle by suggesting that the people
in the puzzle could agree to give clues to each other by using a certain tone
of voice or drawing out the words. One candidate suggested that they could
agree that if they said their hat color in a soft voice, it means the hat in front
of them is the same color, and if they say it in a loud voice, it means the
hat in front is a different color. Recruiters think this is definitely good and
on the correct track. Another option is they could say “reeeeeeeeeeed” for
x number of seconds, where x represented the distribution of hats where a
hat was a bit in a binary number (red = 1, blue = 0).
But the ideal solution, that the programmers can say only red or blue and cannot alter their
voice in such a convincing way as to signal any information other than
the word they said. A good way to get this point across is simply to
change the problem slightly by saying ìthe evil HR person gets to hear
their plan beforehand and will thwart it if it is not to the rules.î
But even with the HR person hearing their plan in advance, there is
still a way to save almost everyone. We know that the first programmer
is never going to have any information about the color of his or her hat,
so this person cannot be guaranteed to survive. But every other person can
be saved with certainty. The programmers simply agree that if the number
of red hats that the rear-most person can see is even, then the programmer
will say “red” If the number of red hats that the rear-most person can see
is odd, the programmer will say “blue” This way, programmer number
99 can look ahead and count the red hats. If the sum of red hats is an
even number and number 100 said “red” then 99 must be wearing a blue
hat. If they add up to an even number and number 100 said “blue” signal-
ing an odd number of red hats, number 99 must also be wearing a red hat.
Number 98 knows that 99 said the correct hat, and so uses that information along with the 97 hats in front to figure out what color hat is on
the head of programmer 98.
Even if the evil HR person knows the plan, the person can’t thwart
it. The plan doesn’t rely on any specific ordering of the hats. The worst
outcome is that the evil HR person will ensure that programmer number
100 is dismissed.
Of all the satellites, Titan is the most fascinating because it may be possible that Titan contains living organisms. The reason is that Titan has an atmosphere and is believed to contain organic molecules. The atmosphere is 80% nitrogen and contains common gasses found on earth such as methane, ethane, argon, and hydrogen. It is believed that the surface of Titan is filled with liquid hydrocarbons that can react with the nitrogen in the atmosphere and form organic substances. Such substances are found on Earth and are believed to be the “primordial ooze” of early life.
Saturn from Titan orbit
Saturn and Titan
Landing on Titan( click on the video to watch it @ youtube)
You have ten jars of pills.One jar of pills is contaminated.The
only way to tell which pills are contaminated is by weight.A
regular pill weighs 10 grams; a contaminated pill weighs 1.1 grams.
You are given a scale and allowed to make just one measurement
with it.How do you tell which jar is contaminated?
Solution:
1- Take 1 pill from 1st jar,2 pills from 2nd jar and so on. .. …
It can be coded as: int height(struct tnode *p)
{
struct tnode *temp=p;
int h1=0,h2=0;
if(p==NULL)return(0);
if(p->left){h1=height(p->left);}
if(p->right){h2=height(p->right);}
return(max(h1,h2)+1);
}
The number of the nodes in the binary tree can be found as:
A file as it appears somewhere on a Linux file system is actually just a link to an inode, which contains all of the file’s properties, such as permissions and ownership, as well as the addresses of the data blocks where the file’s content is stored on disk. When you rm a file, you’re removing the link that points to its inode, but not the inode itself; other processes (such as your audio player) might still have it open. It’s only after they’re through and all links are removed that an inode and the data blocks it pointed to are made available for writing.
This is where the Linux process pseudo-filesystem, the /proc directory, comes into play. Every process on the system has a directory here with its name on it, inside of which lies many things — including an fd (“file descriptor”) subdirectory containing links to all files that the process has open. Even if a file has been removed from the file system, a copy of the data will be right here:
/proc/process id/fd/file descriptor
Here is a live example:
create a file which you can delete.
[root@DeathStar mystuff] man lsof > myfile
[root@DeathStar mystuff]less myfile and press Ctrl+Z so that it maintains fd open.
[root@DeathStar mystuff]# rm myfile
rm: remove regular file `myfile'? y
removed `myfile'
[root@DeathStar mystuff]# lsof |grep myfile
less 23772 root 4r REG 8,2 113086 523412 /home/pankaj/mystuff/myfile (deleted)
[root@DeathStar mystuff]# ls -l /proc/23772/fd/4
lr-x------ 1 root root 64 Jun 14 12:57 /proc/23772/fd/4 -> /home/pankaj/mystuff/myfile (deleted)
[root@DeathStar mystuff]# cp -a /proc/23772/fd/4 myfile.wrong
`/proc/23772/fd/4' -> `myfile.wrong'
[root@DeathStar mystuff]# ls -l myfile.wrong
lrwxrwxrwx 1 root root 37 Jun 14 13:00 myfile.wrong -> /home/pankaj/mystuff/myfile (deleted)
[root@DeathStar mystuff]# cp /proc/23772/fd/4 myfile.saved
`/proc/23772/fd/4' -> `myfile.saved'
[root@DeathStar mystuff]# vi myfile.saved
and here is an obvious way to know which all files you can recover!
There are various parameters which can be passed to Linux kernel at the boot time. There parameters inform kernel about different hardware parameters.You may need the parameter passing to kernel in the following cases:
1-If you think your Linux box can be made more effective in terms of performance by overriding few default hardware parameters.
2-Very helpful in troubleshooting the Linux box.
3-Some hardware parameter that can not be determined by the kernel by its own.
4-Ooopss! forgot your root password?? no problem !
The kernel command line syntax
parameter_name=value1,value2,value3…
Where,
* parameter_name : Keyword name, for example, init, ro, boot etc
Ten common Boot time parameters
init
This sets the initial command to be executed by the kernel. Default is to use /sbin/init, which is the parent of all processes.
To boot system without password pass /bin/bash or /bin/sh as argument to init init=/bin/bash
single
The most common argument that is passed to the init process is the word ’single’ which instructs init to boot the computer in single user mode, and not launch all the usual daemons root=/dev/device
This argument tells the kernel what device (hard disk, floppy disk) to be used as the root filesystem while booting. For example following boot parameter use /dev/sda1 as the root file system: root=/dev/sda1
If you copy entire partition from /dev/sda1 to /dev/sdb1 then use
root=/dev/sdb1 ro
This argument tells the kernel to mount root file system as read-only. This is done so that fsck program can check and repair a Linux file system. Please note that you should never ever run fsck on read/write file system. rw
This argument tells the kernel to mount root file system as read and write mode. panic=SECOND
Specify kernel behavior on panic. By default, the kernel will not reboot after a panic, but this option will cause a kernel reboot after N seconds. For example following boot parameter will force to reboot Linux after 10 seconds panic=10
maxcpus=NUMBER
Specify maximum number of processors that an SMP kernel should make use of. For example if you have four cpus and would like to use 2 CPU then pass 2 as a number to maxcpus (useful to test different software performances and configurations). maxcpus=2
debug
Enable kernel debugging. This option is useful for kernel hackers and developers who wish to troubleshoot problem selinux [0|1]
Disable or enable SELinux at boot time.
* Value 0 : Disable selinux
* Value 1 : Enable selinux
raid=/dev/mdN
assembly of RAID arrays at boot time. When md is compiled into the kernel (not as module), partitions of type 0xfd are scanned and automatically assembled into RAID arrays. This autodetection may be suppressed with the kernel parameter “raid=noautodetect”.
As of kernel 2.6.9, only drives with a type 0 superblock can be autodetected and run at boot time.
mem=MEMEORY_SIZE
Force usage of a specific amount of memory to be used when the kernel is not able to see the whole system memory or for test. For example:
mem=1024M