AND
A bitwise AND takes two binary representations of equal length and performs the logical AND operation on each pair of corresponding bits. In each pair, the result is 1 if the first bit is 1 AND the second bit is 1. Otherwise, the result is 0. For example:
0101
AND 0011
= 0001
XOR
A bitwise exclusive or takes two bit patterns of equal length and performs the logical XOR operation on each pair of corresponding bits. The result in each position is 1 if the two bits are different, and 0 if they are the same. For example:
0101
XOR 0011
= 0110
In Java, all integer types are signed, and the “<<” and “>>” operators perform arithmetic shifts. Java adds the operator “>>>” to perform logical right shifts, but since the logical and arithmetic left-shift operations are identical, there is no “<<<” operator in Java. These general rules are affected in several ways by the default type promotions; for example, since the eight-bit type byte is promoted to int in shift-expressions,[2] the expression “b >>> 2” effectively performs an arithmetic shift of the byte value b instead of a logical shift. Such effects can be mitigated by judicious use of casts or bitmasks; for example, “(b & 0xFF) >>> 2” effectively results in a logical shift.
<TAG\b[^>]*>(.*?)</TAG> matches the opening and closing pair of a specific HTML tag. Anything between the tags is captured into the first backreference. The question mark in the regex makes the star lazy, to make sure it stops before the first closing tag rather than before the last, like a greedy star would do.
It looks like the beta version of Google’s new browser is available starting today. Haven’t spotted the beta download yet, but Google has attempted to explain the project in an online comic.
The browser’s called “Chrome.” The download page is supposedly here, but at the moment that just redirects to the main Google search page.
As performance engineer I come across various problems.� Here is one when the server crashed due to lack of free memory. See the error here.
Read more…
To get a list of all running processes, enter the command “ps auxw”. You might also want to try using “ps auxf” (or “ps auxfw” if the lines get truncated) – this prints everything in a nice tree format that may give you a better understanding of how and why things are running.
To get a complete listing of all listening network services using netstat, enter: netstat -altpu
You can also get similar information using lsof by entering: lsof -i | egrep -i ‘LISTEN|UDP’
Pattern matching example:
1
| awk '/foo1/ && /foo2/ { print $1 }' |
To use shell variables simply do the following:
1
2
3
4
| foo1={pattern1}
foo2={pattern2}
awk "/$foo1/ && /$foo2/"'{ print $1 }' |
Crontab syntax :
A crontab file has five fields for specifying day , date and time followed by the command to be run at that interval.

* in the value field above means all legal values as in braces for that column.
The value column can have a * or a list of elements separated by commas. An element is either a number in the ranges shown above or two numbers in the range separated by a hyphen (meaning an inclusive range).
Example:
55 23 * * * $HOME/automation/getStats.sh > $HOME/automation/logs/cron.logs 2>&1
* to avoid getting emails on Linux from cron, you can disable by appending ’>/dev/null 2>&1′ .
There are times when you may have to recover the MySQL root password because it was either forgotten or misplaced. The steps you need are:
1. Stop MySQL
[root@idoumo tmp]# service mysqld stop
Stopping MySQL: [ OK ]
2. Start MySQL in Safe mode with the safe_mysqld command and tell it not to read the grant tables with all the MySQL database passwords.
[root@idoumo tmp]# safe_mysqld –skip-grant-tables &
[root@idoumo tmp]# Starting mysqld daemon with databases from /var/lib/mysql
3. Use the mysqladmin command to reset the root password. In this case, you are setting it to ack33nsaltf1sh.
[root@idoumo tmp]# mysqladmin -u root flush-privileges password “ack33nsaltf1sh”
4. Restart MySQL normally.
[root@idoumo tmp]# service mysqld restart
Stopping MySQL: 040517 09:39:38 mysqld ended [ OK ]
Starting MySQL: [ OK ]
[1]+ Done safe_mysqld –skip-grant-tables
The MySQL root user will now be able to manage MySQL using this new password.
Logical Volume Management provides benefits in the areas of disk management and scalability. It is not intended to provide fault-tolerance or extraordinary performance. For this reason, it is often run in conjunction with RAID, which can provide both of these. Read more…