Thursday, November 5, 2009

Meaning

A great deal of fuss over nothing of importance.

Origin

This phrase is sometimes shortened just to 'much ado'. It is of course from Shakespeare's play - Much Ado About Nothing, 1599. He had used the word ado, which means business or activity, in an earlier play - Romeo and Juliet, 1592:

"Weele keepe no great adoe, a Friend or two."

Wednesday, November 4, 2009

And the winner is
INDIAN National Highway Department (Painting Division)



One summer day in France in 1826, Joseph Niepce took the world's first photograph. It's a photo of some farm buildings and the sky. It took an exposure time of 8 hours. Voila! It had to feel pretty incredible, like magic.

No one's exactly sure how he did this or what chemicals were used. All that's known for sure is that the photo is on an 8"x 6.5" pewter plate. It's so faint it has to be tilted in order for the light to catch it just right, to see it. The Getty Museum in California did two weeks of tests in 2003 in a joint project involving the Rochester Institute of Technology and France's Centre de Recherches sur la Conservation des Documents Graphiques (try saying thatthree times fast). Then it went back on display at the University of Texas in a new air tight case, where it's been on display since 1964. I'm not sure why we have it and the French don't, but "hah".

The current theory about how the photograph was taken is that Niepce coated the pewter plate with bitumen, a petroleum derivative sensitive to light. After it spent those 8 hours hardening, he washed the plate with a mixture of oil of lavender and white petroleum. This dissolved the portions of the bitumen that didn't 'see' direct light, so didn't harden. Pretty damn clever. Niepce called his work a "heliograph," in a tribute to the power of the sun.

Article Source:World’s First Photo. Really?!!!!

Monday, November 2, 2009



The My Recent Documents folder on the Windows XP Start menu displays a list of files and documents that you most recently used.

Removing the Recent Documents link from XP Start Menu

To remove the My Recent Documents folder from XP Start Menu, try this:

  • Right-click Start, and then click Properties
  • Click Customize
  • Click the Advanced tab
  • Under Recent documents, uncheck List my most recently opened documents
  • Click OK, and then OK.

Equivalent registry value

  • Open Registry Editor and navigate to:

HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Explorer \ Advanced

  • Backup the key to a file. See Backing up.. article
  • Set the value of Start_ShowRecentDocs accordingly.

Value of 0 - List my most recently opened documents is disabled
Value of 2 - List my most recently opened documents is enabled

Automate the above with REG file

Download this REG file sets Start_ShowRecentDocs registry value to 0
Undo REG file which sets Start_ShowRecentDocs registry value to 2 (default)
Different setting for the Windows Classic Start Menu

For the Classic Start Menu, set NoRecentDocsMenu to 1 in this key:

HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ Explorer

NoRecentDocsMenu value may not exist by default. If so, create a new value of type REG_DWORD and set it's data to 1

Sunday, October 25, 2009

Software bug

A software bug is the common term used to describe an error, flaw, mistake, failure, or fault in a computer program or system that produces an incorrect or unexpected result, or causes it to behave in unintended ways. Most bugs arise from mistakes and errors made by people in either a program's source code or its design, and a few are caused by compilers producing incorrect code. A program that contains a large number of bugs, and/or bugs that seriously interfere with its functionality, is said to be buggy.

Common types of computer bugs

Conceptual error (code is syntactically correct, but the programmer or designer intended it to do something else)

Maths bugs

  • Division by zero
  • Arithmetic overflow or underflow
  • Loss of arithmetic precision due to rounding or numerically unstable algorithms

Logic bugs

  • Infinite loops and infinite recursion
  • Off by one error, counting one too many or too few when looping

Syntax bugs

Use of the wrong operator, such as performing assignment instead of equality test. In simple cases often warned by the compiler; in many languages, deliberately guarded against by language syntax

Resource bugs

  • Null pointer dereference
  • Using an uninitialized variable
  • Access violations
  • Resource leaks, where a finite system resource such as memory or file handles are exhausted by repeated allocation without release.
  • Buffer overflow, in which a program tries to store data past the end of allocated storage. This may or may not lead to an access violation. These bugs can form a security vulnerability.
  • Excessive recursion which though logically valid causes stack overflow

Co-programming bugs

  • Deadlock
  • Race condition
  • Concurrency errors in Critical sections, Mutual exclusions and other features of concurrent processing. Time-of-check-to-time-of-use (TOCTOU) is a form of unprotected critical section.

Teamworking bugs

  • Unpropagated updates; e.g. programmer changes "myAdd" but forgets to change "mySubtract", which uses the same algorithm. These errors are mitigated by the Don't Repeat Yourself philosophy.
  • Comments out of date or incorrect: many programmers assume the comments accurately describe the code
  • Differences between documentation and the actual product
How about some bugs for snacks?

Thursday, October 22, 2009

#include<stdio.h>
void main()
{
int a;
clrscr();
a=(scanf("%d",&a)+a-1)+(scanf("%d",&a)+a-1);
printf("%d",a);
getch();
}

Wednesday, October 21, 2009

#include<stdio.h>
void main()
{
int a=3,b=2,c;
c=printf("%*d%*d",a,1,b,1);
clrscr();
printf("%d",c);
getch();
}

To understand more about this printf, Click here

Monday, October 19, 2009

Kakuro puzzles resemble crosswords which use numbers instead of words. The aim of the game is to fill all the blank squares in the grid with only the numbers 1-9 so that the numbers you enter add up to the corresponding clues. When the grid is filled, the puzzle is complete. Sometimes called "Cross-sums" or "Kakro", Kakuro is Sudoku's bigger (and harder) brother.

Kakuro puzzle grids can be any size, though usually the squares within them have to be arranged symmetrically. As a rule of thumb, the more blank squares a puzzle contains, the harder it is, however this isn't always true, especially if it is a good quality puzzle.

NOTE: It is very important to note that a proper Kakuro puzzle has only 1 unique solution, and it will always have a logical way of reaching it, there should be no guesswork needed.



An easy Kakuro puzzle




Solution for the above puzzle

In discussing Kakuro puzzles and tactics, the typical shorthand for referring to an entry is "(clue, in numerals)-in-(number of cells in entry, spelled out)", such as "16-in-two" and "25-in-five". The exception is what would otherwise be called the "45-in-nine" — simply "45" is used, since the "-in-nine" is mathematically implied (nine cells is the longest possible entry, and since it cannot duplicate a digit it must consist of all the digits from 1 to 9 once). Curiously, "3-in-two", "4-in-two", "5-in-two", "43-in-eight", and "44-in-eight" are still frequently called as such, despite the "-in-two" and "-in-eight" being equally implied.

Solving techniques

Although brute-force guessing is of course possible, a better weapon is the understanding of the various combinatorial forms that entries can take for various pairings of clues and entry lengths. Those entries with sufficiently large or small clues for their length will have fewer possible combinations to consider, and by comparing them with entries that cross them, the proper permutation — or part of it — can be derived. The simplest example is where a 3-in-two crosses a 4-in-two: the 3-in-two must consist of '1' and '2' in some order; the 4-in-two (since '2' cannot be duplicated) must consist of '1' and '3' in some order. Therefore, their intersection must be '1', the only digit they have in common.

It is common practice to mark potential values for cells in the cell corners until all but one have been proven impossible; for particularly challenging puzzles, sometimes entire ranges of values for cells are noted by solvers in the hope of eventually finding sufficient constraints to those ranges from crossing entries to be able to narrow the ranges to single values. Because of space constraints, instead of digits some solvers use a positional notation, where a potential numerical value is represented by a mark in a particular part of the cell, which makes it easy to place several potential values into a single cell. This also makes it easier to distinguish potential values from solution values.

I find this game to be more interesting than Su-do-ku. I had never been interested in Su-do-ku though I like number puzzles in general! This game is a perfect replacement to Su-do-ku!

You can play this game online at http://www.kakuro.com/playonline.php



My First Kakuro puzzle (Took 19 minutes 32 seconds to solve this puzzle!)



Proud moment for me. So soon, it has become two years since this blog has been started. This blog was the first useful thing I did after turning 18 and it is growing old along with me! This is the 279th post in my blog. I planned to touch VVS Lakshman's magical figure of 281 to make this post memorable. But couldn't do it. Because I can't post in my blog just for the sake of posting. One kind request to my readers is that, if you want to comment on a post of mine, comment it here rather than mailing me or scrapping me in Orkut. Anyway, thank you for your support without which this milestone would have never been reached.