Take the decimal expression and repeat-
edly multiply it by 2. At each step, keep track of the integer part of the
result but do not carry it along in subsequent multiplications.
For example, convert decimal 0.7 to binary:
0.7 * 2 = 1.4
0.4 * 2 = 0.8
0.8 * 2 = 1.6
0.6 * 2 = 1.2
0.2 * 2 = 0.4
0.4 * 2 = 0.8
0.8 * 2 = 1.6
0.6 * 2 = 1.2 etc.
The binary representation of decimal 0.7 is 0.1011001100...
where the "1100" repeats forever.
Wednesday, April 30, 2008
Convert numbers between 0 and 1 to Binary
Monday, April 28, 2008
Installing DAO 3.6 (Data Access Objects)
- download dao360.zip and unzip it into a temporary directory.
- Copy the Dao360.dll file to System32 Directory (inside the Windows Derectory)
- Add new Reference (Project ->References) .
- Show the DAO360.dll by browsing the System32 Directory
- Now you can use DAO3.6 Facility
Sunday, April 27, 2008
GANTT CHARTS
A Gantt chart is a graphical representation of the duration of tasks against the progression of time. A Gantt chart is a useful tool for planning and scheduling projects. A Gantt chart is helpful when monitoring a project's progress.
Planning and Scheduling
A Gantt chart allows you to assess how long a project should take. A Gantt chart lays out the order in which tasks need to be carried out. A Gantt chart helps manage the dependencies between tasks.
What is CAT 5 Cable ?
CAT 5 cable is available with the wire pairs having either a solid or stranded core. The stranded core is typically used for patch cables that are used to connect the computer network card to the network jack terminus. The solid core wire is typically used for runs from the wall termination back to the network patch panel. Solid core CAT 5 cable is also available in standard sheathing or plenum.
Plenum CAT 5 is the same internally, but features a special outer sheath that puts off no toxic fumes when it burns
Thursday, April 24, 2008
Batch Processing
Each piece of work for a batch processing system is called a job. A job usually consists of a program and the data to be run.
Jobs are stored in job queues until the computer is ready to process them.
There is no interaction between the user and the computer while the program is being run. Computers which do batch processing often operate at night.
Example : Payroll - when a company calculates the wages for its workforce and prints payslips.
Wednesday, April 23, 2008
MySQL Update Example using PHP
- UPDATE - Performs an update MySQL query
- SET - The new values to be placed into the table follow SET
- WHERE - Limits which rows are affected
PHP & MySQL Code:
// Connect to MySQL
// Get Sandy's record from the "example" table
$result = mysql_query("UPDATE example SET age='22' WHERE age='21'")
or die(mysql_error());
$result = mysql_query("SELECT * FROM example WHERE age='22'")
or die(mysql_error());
// get the first (and hopefully only) entry from the result
$row = mysql_fetch_array( $result );
echo $row['name']." - ".$row['age']. "
";
?>
A Simple Database Backup:
You can use mysqldump to create a simple backup of your database using the following syntax.
mysqldump -u [username] -p [password] [databasename] > [backupfile.sql]
- [username] - this is your database username
- [password] - this is the password for your database
- [databasename] - the name of your database
- [backupfile.sql] - the file to which the backup should be written.
The resultant dump file will contain all the SQL statements needed to create the table and populate the table in a new database server. To backup your database 'Customers' with the username 'sadmin' and password 'pass21' to a file custback.sql, you would issue the command:
mysqldump -u sadmin -p pass21 Customers > custback.sql
You can also ask mysqldump to add a drop table command before every create command by using the option --add-drop-table. This option is useful if you would like to create a backup file which can rewrite an existing database without having to delete the older database manually first.
mysqldump --add-drop-table -u sadmin -p pass21 Customers > custback.sql
Tuesday, April 22, 2008
Ranking - ICC Test and ODI Championships
ICC Test Championship
13 Apr 2008
Team | Matches | Points | Rating |
---|---|---|---|
Australia | 33 | 4650 | 141 |
India | 42 | 4242 | 111 |
South Africa | 44 | 4789 | 109 |
England | 44 | 4771 | 108 |
Sri Lanka | 35 | 3709 | 106 |
Pakistan | 33 | 3107 | 94 |
New Zealand | 25 | 2277 | 91 |
West Indies | 31 | 2380 | 77 |
Bangladesh | 24 | 23 | 1 |
ICC ODI Championship
19 Apr 2008
Team | Matches | Points | Rating |
---|---|---|---|
South Africa | 43 | 5478 | 127 |
Australia | 44 | 5597 | 127 |
New Zealand | 38 | 4312 | 113 |
India | 56 | 6330 | 113 |
Pakistan | 37 | 4073 | 110 |
England | 40 | 4200 | 105 |
Sri Lanka | 46 | 4810 | 105 |
West Indies | 39 | 3880 | 99 |
Bangladesh | 39 | 1835 | 47 |
Ireland | 11 | 217 | 20 |
Zimbabwe | 31 | 552 | 18 |
Kenya | 6 | 0 | 0 |
Monday, April 21, 2008
Fifth-generation programming language
is a programming language based around solving problems using constraints given to the program, rather than using an algorithm written by a programmer. Most constraint-based and logic programming languages and some declarative languages are fifth-generation languages.
While fourth-generation programming languages are designed to build specific programs, fifth-generation languages are designed to make the computer solve the problem for you. This way, the programmer only needs to worry about what problems need to be solved and what conditions need to be met, without worrying about how to implement a routine or algorithm to solve them. Fifth-generation languages are used mainly in artificial intelligence research. Prolog, OPS5, and Mercury are the best known fifth-generation languages.
These types of languages were also built upon Lisp, many originating on the Lisp machine. ICAD is a good example. Then, there are many frame languages, such as KL-ONE.
In the 1990s, fifth-generation languages were considered to be the wave of the future, and some predicted that they would replace all other languages for system development, with the exception of low-level languages. Most notably, from 1982 to 1993 Japan [1] [2] put much research and money into their fifth generation computer systems project, hoping to design a massive computer network of machines using these tools.
However, as larger programs were built, the flaws of the approach became more apparent. It turns out that, starting from a set of constraints defining a particular problem, deriving an efficient algorithm to solve it is a very difficult problem in itself. This crucial step cannot yet be automated and still requires the insight of a human programmer.
Today, fifth-generation languages have lost part of their initial appeal and are mostly used in academic circles.
Generation languages
- The first generation languages, or 1GL, are low-level languages that are machine language.
- The second generation languages, or 2GL, are also low-level languages that generally consist of assembly languages.
- The third generation languages, or 3GL, are high-level languages such as C.
- The fourth generation languages, or 4GL, are languages that consist of statements similar to statements in a human language. Fourth generation languages are commonly used in database programming and scripts.
- The fifth generation languages, or 5GL, are programming languages that contain visual tools to help develop a program. A good example of a fifth generation language is Visual Basic.