Tuesday, March 29, 2011

CYBER QUEST

Q. The only dual-core 1GHz ARM processor that is in production today is the…?
A. Nvidia's Tegra 2.


Q. What is Stuxnet?
A. It is the first discovered worm, specifically written to attack SCADA systems, that spies on and 
reprograms industrial systems.


Q. The first non-Finnish CEO to head Nokia, appointed, is…?
A. Stephen Elop


Q. According to global research firm comScore, Inc., Facebook is the new No.1social networking site in India pushing back Orkut. What comes at No. 3?
A. BharatStudent.com


Q. Which two manufacturers supply the NAND flash RAM chips for the iPad?
A. Toshiba and Samsung


Q. Name the rendering engines used in Firefox and Internet Explorer
A. Gecko and Trident


Q. Charles Phillips is the President of…?
A. Orcle


Q. If it is Dennis Ritchie for C, then who is it for D?
A. Walter Bright.



Saturday, March 26, 2011

List of executable file extentions

                  A file with an executable file extension means that the file format supports some ability to run additional automatic tasks. This means that if you open a file with one of these file extensions, your Windows PC could, without your continued permission, run any number of additional operations programmed into that file.
                  Those operations could be welcome if you were to run a program setup for a software application you just downloaded. Those operations could be damaging if you were to run a virus infected executable file attached to an email from an unknown source.

                  You should always avoid opening executable files from suspicious emails or websites. Even if you are very comfortable about the source of an executable file, you should always exercise caution and common sense before opening.

Below is an incomplete list of executable file extensions :
A6P: Authorware 6 Program
AC: Autoconfig Script
AS: Adobe Flash ActionScript File
ACR: ACRobot Script
ACTION: Automator Action
AIR: Adobe AIR Installation Package
APP: FoxPro Generated Application
APP: Symbian OS Application
AWK: AWK Script
BAT: Batch File
CGI: Common Gateway Interface Script
CMD: Windows Command
COM: DOS Command File
CSH: C Shell Script
DEK: Eavesdropper Batch File
DLD: EdLog Compiled Program
DS: TWAIN Data Source
EBM: EXTRA! Basic Macro
ESH: Extended Shell Batch File
EXE: Windows Executable File
EZS: EZ-R Stats Batch Script
FKY: FoxPro Macro
FRS: Flash Renamer Script
FXP: FoxPro Compiled Source
GADGET: Windows Gadget
HMS: HostMonitor Script File
HTA: HTML Application
ICD: SafeDisc Encrypted Program
INX: Compiled Script
IPF: SMS Installer Script
ISU: InstallShield Uninstaller Script
JAR: Java Archive File
JS: JScript Executable Script
JSE: JScript Encoded File
JSX: ExtendScript Script File
KIX: KiXtart Script File
LUA: Lua Scripting File
MCR: 3ds Max Macroscript File
MEM: Macro Editor Macro
MPX: FoxPro Compiled Menu Program
MS: 3ds Max Script File
MST: Windows SDK Setup Transform Script
OBS: ObjectScript Script File
PAF: Portable Application Installer File
PEX: ProBoard Executable File
PIF: Program Information File
PRC: Palm Resource Code File
PRG: Generica Program File
PVD: Instalit Script
PWC: PictureTaker File
PY: Python Script
PYC: Python Compiled File
PYO: Python Optimized Code
QPX: FoxPro Compiled Query Program
RBX: Rembo-C Compiled Script
RGS: Registry Script
ROX: Actuate Report Object Executable File
RPJ: Real Pac Batch Job File
SCAR: SCAR Script
SCR: Script File
SCRIPT: Generic Script File
SCT: Windows Script Component
SHB: Windows Shortcut into a Document
SHS: Shell Scrap Object File
SPR: FoxPro Generated Screen File
TLB: OLE Type Library
TMS: Telemate Script
U3P: U3 Smart Application
UDF: Excel User Defined Function
VB: VBScript File
VBE: VBScript Encoded Script File
VBS: VBScript File
VBSCRIPT: Visual Basic Script
WCM: WordPerfect Macro
WPK: WordPerfect Macro
WS: Windows Script
WSF: Windows Script File
XQT: SuperCalc Macro File

C++

SEO


Search Engine Submission - Manually or automatically submitting a site to a search engine, necessary in the early days due to the fact that search engines had limited (or non existent) crawling capabilities, and still yielding limited results years later.

On Page SEO - The practice of ensuring a site is both accessible to search engines and relevant to the terms you are targeting by the placement of keywords on page, on page SEO includes considerations of website architecture, build and content writing.

PageRank (or similar) - The use of links by search engines to judge the importance of a page flipped SEO on it's head and became the dominant factor in the early years of the decade. In this chart, PageRank essentially refers to the raw credibility conferred by links to a given page.

Anchor Text - The use of link text to add context to the raw credibility provided by PageRank et al...

Domain Authority - Link factors, including PageRank and links from trusted sources, assessed at a domain level rather than at a page level; the idea being that all other things being equal a page launched on a site with higher domain authority will rank better than a page launched on a site with low domain authority.

Link Context - Link context refers to the placement of links on a page and, more importantly, the context of the page and the site the link is on. Link context brings an additional level of complexity and detail to the analysis and acquisition of links beyond merely looking at the raw credibility of a link and its anchor text.

User Signals - The use of user behaviour, such as click through rates, bounce rates and search patterns, by search engines to assess the level of trust search engines have in a site. User signals were not felt as a serious part of search engine algorithms until this year when Google implemented the Vince algorithm update.

Friday, March 25, 2011

You need PYTHON, because life is short

REDHAT CERTIFICATES


Red Hat Certified Security Specialist (RHCSS)

  • EX333 Red Hat Enterprise Security: Network Services
  • EX423 Enterprise Directory Services and Authentication
  • EX429 SELinux Policy Administration
RHCSS Courses
(Recommended)
Expertise Exams
(Required: Must pass all 3 for RHCSS)
RHS333 Red Hat Enterprise Security: Network ServicesEX333 Red Hat Enterprise Security: Network Services Expertise Exam
RH423 Red Hat Enterprise Directory Services and AuthenticationEX423 Red Hat Enterprise Directory Services and Authentication Expertise Exam
RHS429 Red Hat Enterprise SELinux Policy AdministrationEX429 Red Hat Enterprise SELinux Policy Administration Expertise Exam



Red Hat Certified Datacenter Specialist (RHCDS)

  • EX401 Deployment, Virtualization, and Systems Management
  • EX436 Clustering and Storage Management
  • EX423 Directory Services and Authentication
    OR EX318 Red Hat Enterprise Virtualization
RHCDS Courses
(Recommended)
Expertise Exams
(Required: Must pass all 3 for RHCDS)
RH401Deployment and Systems ManagementEX401 Deployment and Systems Management Exam
RH436 Clustering and Storage ManagementEX436 Clustering and Storage Management Exam
RH423 Directory Services and Authentication
OR RH318 Red Hat Enterprise Virtualization
EX423 Directory Services and Authentication Exam
OR EX318 Red Hat Enterprise Virtualization



















Red Hat Certified Architect (RHCA)
























Red Hat Certified Virtualization Administrator

Red Hat Certified Virtualization Administrator (RHCVA™)


half-day exam (EX318). Red Hat recommends that participants augment their skills and build on their expertise by examining the RHCVA Study Guide and attending the RH318 Red Hat Virtualization Administrationtraining course. You'll learn the skills you need through hands-on labs and deep dives into the technology balanced with concept-based lectures.

FOR more detail click here

Wednesday, March 23, 2011

STEPS for programming success


  • Get interested in programming, and do some because it is fun. Make sure that it keeps being enough fun so that you will be willing to put in ten years.
  • Talk to other programmers; read other programs. This is more important than any book or training course.
  • Program. The best kind of learning is learning by doing. To put it more technically, "the maximal level of performance for individuals in a given domain is not attained automatically as a function of extended experience, but the level of performance can be increased even by highly experienced individuals as a result of deliberate efforts to improve." (p. 366) and "the most effective learning requires a well-defined task with an appropriate difficulty level for the particular individual, informative feedback, and opportunities for repetition and corrections of errors." (p. 20-21) The book Cognition in Practice: Mind, Mathematics, and Culture in Everyday Life is an interesting reference for this viewpoint.
  • If you want, put in four years at a college (or more at a graduate school). This will give you access to some jobs that require credentials, and it will give you a deeper understanding of the field, but if you don't enjoy school, you can (with some dedication) get similar experience on the job. In any case, book learning alone won't be enough. "Computer science education cannot make anybody an expert programmer any more than studying brushes and pigment can make somebody an expert painter" says Eric Raymond, author of The New Hacker's Dictionary. One of the best programmers I ever hired had only a High School degree; he's produced a lot of great software, has his own news group, and made enough in stock options to buy his own nightclub.
  • Work on projects with other programmers. Be the best programmer on some projects; be the worst on some others. When you're the best, you get to test your abilities to lead a project, and to inspire others with your vision. When you're the worst, you learn what the masters do, and you learn what they don't like to do (because they make you do it for them).
  • Work on projects after other programmers. Be involved in understanding a program written by someone else. See what it takes to understand and fix it when the original programmers are not around. Think about how to design your programs to make it easier for those who will maintain it after you.
  • Learn at least a half dozen programming languages. Include one language that supports class abstractions (like Java or C++), one that supports functional abstraction (like Lisp or ML), one that supports syntactic abstraction (like Lisp), one that supports declarative specifications (like Prolog or C++ templates), one that supports coroutines (like Icon or Scheme), and one that supports parallelism (like Sisal).
  • Remember that there is a "computer" in "computer science". Know how long it takes your computer to execute an instruction, fetch a word from memory (with and without a cache miss), read consecutive words from disk, and seek to a new location on disk. (Answers here.)
  • Get involved in a language standardization effort. It could be the ANSI C++ committee, or it could be deciding if your local coding style will have 2 or 4 space indentation levels. Either way, you learn about what other people like in a language, how deeply they feel so, and perhaps even a little about why they feel so.
  • Have the good sense to get off the language standardization effort as quickly as possible.
for more detail click here

Monday, March 21, 2011

BASH SHELL SCRIPTING



This Bash shell scripting guide is not a detailed study but a quick reference to the BASH syntax. So lets begin...

Common Environment Variables

PATH - Sets the search path for any executable command. Similar to the PATH variable in MSDOS.
HOME - Home directory of the user.
MAIL - Contains the path to the location where mail addressed to the user is stored.
IFS - Contains a string of characters which are used as word seperators in the command line. The string normally consists of the space, tab and the newline characters. To see them you will have to do an octal dump as follows:
$ echo $IFS | od -bc
PS1 and PS2 - Primary and secondary prompts in bash. PS1 is set to $ by default and PS2 is set to '>' . To see the secondary prompt, just run the command :
$ ls |
... and press enter.
USER - User login name.
TERM - indicates the terminal type being used. This should be set correctly for editors like Vim to work correctly.
SHELL - Determines the type of shell that the user sees on logging in.
Note: To see what are the values held by the above environment variables, just do an echo of the name of the variable preceeded with a $. For example, if I do the following:
$ echo $USER 
ravi
... I get the value stored in the environment variable USER.


Some Bash Shell Scripting Rules

  • The first line in your script must be #!/bin/bash
    ... that is a # (Hash) followed by a ! (bang) followed by the path of the shell. This line lets the environment know the file is a shell script and the location of the shell.
  • Before executing your script, you should make the script executable. You do it by using the following command:
    $ chmod ugo+x your_shell_script.sh
  • The name of your shell script must end with a .sh . This lets the user know that the file is a shell script. This is not compulsary but is the norm.

Conditional Statements

'If' Statement

The 'if' statement evaluates a condition which accompanies its command line.
syntax:
if condition_is_true 
then    
execute commands 
else
execute commands 
fi 
'if' condition also permits multiway branching. That is you can evaluate more conditions if the previous condition fails.
if condition_is_true 
then
execute commands 
elif another_condition_is_true 
then
execute commands 
else
execute commands 
fi 
Example :
if grep "linuxhelp" thisfile.html 
then
echo "Found the word in the file" 
else
echo "Sorry no luck!" 
fi

If's Companion - Test

test is an internal feature of the shell. 'test' evaluates the condition placed on its right, and returns either a true or false exit status. For this purpose, 'test' uses certain operators to evaluate the condition. They are as follows:
Relational Operators
  • -eq - Equal to
  • -lt - Less than
  • -gt - Greater than
  • -ge - Greater than or Equal to
  • -le - Less than or Equal to
File related tests
  • -f file - True if file exists and is a regular file.
  • -r file - True if file exists and is readable.
  • -w file - True if file exists and is writable.
  • -x file - True if file exists and is executable.
  • -d file - True if file exists and is a directory.
  • -s file - True if file exists and has a size greater than zero.
String tests
  • -n str - True if string str is not a null string.
  • -z str - True if string str is a null string.
  • str1 == str2 - True if both strings are equal.
  • str - True if string str is assigned a value and is not null.
  • str1 != str2 - True if both strings are unequal.
  • -s file - True if file exists and has a size greater than zero.
Test also permits the checking of more than one expression in the same line.
  • -a - Performs the AND function
  • -o - Performs the OR function
A few Example snippets of using test
test $d -eq 25 && echo $d
... which means, if the value in the variable d is equal to 25, print the value. Otherwise don't print anything.
test $s -lt 50 && do_something
if [ $d -eq 25 ] 
then
echo $d 
fi 
In the above example, I have used square brackets instead of the keyword test - which is another way of doing the same thing.
if [ $str1 == $str2 ] 
then do something
fi
if [ -n "$str1" -a -n "$str2" ] 
then
echo 'Both $str1 and $str2 are not null'
fi
... above, I have checked if both strings are not null then execute the echo command.


Things to remember while using test
  1. If you are using square brackets [] instead of test, then care should be taken to insert a space after the [ and before the ].
  2. test is confined to integer values only. Decimal values are simply truncated.
  3. Do not use wildcards for testing string equality - they are expanded by the shell to match the files in your directory rather than the string.

Case Statement

Case statement is the second conditional offered by the shell.
Syntax:
case expression in
pattern1) execute commands ;;
pattern2) execute commands ;;
...
esac
The keywords here are in, case and esac. The ';;' is used as option terminators. The construct also uses ')' to delimit the pattern from the action.


Example:
...
echo "Enter your option : " 
read i;  
case $i in
1) ls -l ;;
2) ps -aux ;;
3) date ;;
4) who ;;
5) exit 
esac
Note: The last case option need not have ;; but you can provide them if you want.
Here is another example:
case `date |cut -d" " -f1` in 
Mon) commands ;; 
Tue) commands ;; 
Wed) commands ;; 
... 
esac
Case can also match more than one pattern with each option.You can also use shell wild-cards for matching patterns.
...
echo "Do you wish to continue? (y/n)" 
read ans  
case $ans in 
Y|y) ;; 
[Yy][Ee][Ss]) ;; 
N|n) exit ;; 
[Nn][Oo]) exit ;; 
*) echo "Invalid command" 
esac
In the above case, if you enter YeS, YES,yEs and any of its combinations, it will be matched.
This brings us to the end of conditional statements.


Looping Statements

while loop
Syntax :
while condition_is_true
do
execute commands 
done
Example:
while [ $num -gt 100 ] 
do
sleep 5 
done
while : 
do 
execute some commands 
done
The above code implements a infinite loop. You could also write 'while true' instead of 'while :' .
Here I would like to introduce two keywords with respect to looping conditionals. They are break and continue.
break - This keyword causes control to break out of the loop.
continue - This keyword will suspend the execution of all statements following it and switches control to the top of the loop for the next iteration.


until loop
Until complements while construct in the sense that the loop body here is executed repeatedly as long as the condition remains false.
Syntax:
until false
do 
execute commands 
done
Example:
...
until [ -r myfile ] 
do 
sleep 5 
done
The above code is executed repeatedly until the file myfile can be read.


for loop
Syntax :
for variable in list
do 
execute commands 
done
Example:
...
for x in 1 2 3 4 5 
do 
echo "The value of x is $x"; 
done
Here the list contains 5 numbers 1 to 5. Here is another example:


for var in $PATH $MAIL $HOME
do 
echo $var 
done
Suppose you have a directory full of java files and you want to compile those. You can write a script like this:
... 
for file in *.java 
do 
javac $file 
done
Note: You can use wildcard expressions in your scripts.


Special Symbols Used In BASH Scripting



  • $* - This denotes all the parameters passed to the script at the time of its execution. Which includes $1, $2 and so on.
  • $0 - Name of the shell script being executed.
  • $# - Number of arguments specified in the command line.
  • $? - Exit status of the last command.
The above symbols are known as positional parameters. Let me explain the positional parameters with the aid of an example. Suppose I have a shell script called my_script.sh . Now I execute this script in the command line as follows :
$ ./my_script.sh linux is a robust OS
... as you can see above, I have passed 5 parameters to the script. In this scenario, the values of the positional parameters are as follows:
  • $* - will contain the values 'linux','is','a','robust','OS'.
  • $0 - will contain the value my_script.sh - the name of the script being executed.
  • $# - contains the value 5 - the total number of parameters.
  • $$ - contains the process ID of the current shell. You can use this parameter while giving unique names to any temporary files that you create at the time of execution of the shell.
  • $1 - contains the value 'linux'
  • $2 - contains the value 'is'
... and so on.


The Set And Shift Statements

set - Lets you associate values with these positional parameters .
For example, try this:
$ set `date` 
$ echo $1 
$ echo $* 
$ echo $# 
$ echo $2
shift - transfers the contents of a positional parameter to its immediate lower numbered one. This goes on as many times it is called.
Example :
$ set `date` 
$ echo $1 $2 $3 
$ shift 
$ echo $1 $2 $3 
$ shift 
$ echo $1 $2 $3
To see the process Id of the current shell, try this:
$ echo $$ 
2667
Validate that it is the same value by executing the following command:
$ ps -f |grep bash


Make Your BASH Shell Script Interactive

read statement
Make your shell script interactive. read will let the user enter values while the script is being executed. When a program encounters the read statement, the program pauses at that point. Input entered through the keyboard id read into the variables following read, and the program execution continues.
Eg:
#!/bin/sh 
echo "Enter your name : " 
read name 
echo "Hello $name , Have a nice day."


Exit Status Of The Last Command

Every command returns a value after execution. This value is called the exit status or return value of the command. A command is said to be true if it executes successfully, and false if it fails. This can be checked in the script using the $? positional parameter.


Resources For More Detailed Study Of The BASH Command

Linux Shell Scripting Tutorial @ Cyberciti.biz
Introduction to BASH Programming @ Tldp.org