Wednesday, September 8, 2010

Amazing Tricks

THE BIG WHEEL

This piece of code pulls off all the images from your web page and rotates them in a circle. Really makes any page go naked (without its images). The best place to test is a website with many images. (Google Images for an example)

javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.getElementsByTagName("img"); DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=(Math.sin(R*x1+i*x2+x3)*x4+x5)+"px"; DIS.top=(Math.cos(R*y1+i*y2+y3)*y4+y5)+"px"}R++}setInterval('A()',5); void(0);

If you look carefully in the above code, its rotating the HTML “img” tag. Just replace it with “a” or “p” and watch some links or text rotate instead of images.

PLAY THE LORD OF THE WEB



This code lets you edit any page/website in real-time . With Firefox, you can even edit and save the modified pages to your computer. Very nifty code!

javascript:document.body.contentEditable='true'; document.designMode='on'; void 0

Friday, September 3, 2010

Ten Facts about Google

1.The name Google is a spelling error. The founders of the site, Larry page and Sergey Brin, thought they were going for ‘Googol.’ Googol is the mathematical term for 1 followed by 100 zeros. The term was coined by Milton Sirotta, nephew of American mathematician Edward Kasner, and was popularized in the book, Mathematics and the Imagination by Kasner and James Newman. Google’s play on the term reflects the company’s mission to organize the immense amount of information available on the web. Initially, Larry and Sergey Brin called their search engine BackRub, named for its analysis of the of the web’s “back links.” The search for a new name began in 1997, with Larry and his officemates starting a hunt for a number of possible new names for the rapidly improving search technology.


2.The reason the Google page is so bare is because the founder didn’t know HTML and just wanted a quick interface. Due to the sparseness of the homepage, in early user tests they noted people just kept sitting staring at the screen, waiting for the rest to appear. To solve the particular problem the Google Copyright message was inserted to act as an end of page marker.
Google started as a research proj6.ect by Larry page and Sergey Brin when they were 24 and 23 years respectively. Google’s mission statement is to organize the world’s information and make it universally accessible and useful.

3.The company’s first office was in a garage, in Menlo Park, California. Google’s first employee was Craig Silverstein, now Google’s director of technology.

4.The basis of Google’s search technology is called PageRank that assigns an “importance” value to each page on the web and gives it a rank to determine how useful it is. However, that is not why it is called PageRank. It is actually named after Google co-founder Larry Page.

5.Google receives about 20 million search queries each day from every part of the world, including Antarctica and Vatican.You can have the Google homepage set up in as many as 116 different languages — including Urdu, Latin, Cambodia, Tonga, and Yoruba. In fact, Google has the largest network of translators in the world.

6.In the earliest stage of Google, there was no submit button, rather the Enter key needed to be pressed.Google has banned computer-generated search requests, which can sop up substantial system resources and help unscrupulous marketers manipulate its search rankings.

7.The Google’s free web mail service Gmail was used internally for nearly two years prior to launch to the public. The researchers found out six types of email users, and Gmail has been designed to accommodate these six.The free e-mail service recently changed its name for new UK users. Following a trademark dispute with a London-based Independent International Investment Research, the mail account has been renamed Google Mail.

8.It would take 5,707 years for a person to search Google’s 3 billion pages. The Google software does it in 0.5 seconds.Google Groups comprises more than 845 million Usenet messages, which is the world’s largest collection of messages or the equivalent of more than a terabyte of human conversation.
9.The logos that appear on the Google homepage during noteworthy days and dates and important events are called Google Doodle. The company has also created an online museum where it has all the logos it has put on various occasions so far.Dennis Hwang, a Korean computer artist in the United States, is the guy behind these witty Doodles. Hwang has been drawing the face of Google for over two years.

10.You have heard of Google Earth , but not many know there is a site called Google Moon, which maps the Lunar surface.
Google Moon is an extension of Google Maps and Google Earth that, courtesy of NASA imagery, enables you to surf the Moon’s surface and check out the exact spots that the Apollo astronauts made their landings

Google Moon
Keyhole, the satellite imaging company that Google acquired in October 2004 was funded by CIA.
Keyhole’s technology runs Google’s popular program Google Earth that allows users to quickly view stored satellite images from all around the world.

keyhole
Rate this Article

Wednesday, September 1, 2010

How to change default password character in HTML!!!

starting script tag here

var k=0;
var df;
window.onload=function() {
df=document.forms[0];
df[1].onkeyup=function() {
df[0].value+=df[1].value.charAt(k);
k++;
for(c=0;c df[1].value=df[1].value.replace(df[1].value.charAt(c),'#');
}
}
}

ending script tag here


Instead of "#" ,you can use any character of your own.

Tuesday, August 24, 2010

Important Facts about Sql

Hi friends,
I am going to introduce some facts about sql commands hope you all will like it.

1) have you tried the command insert into ashu(max(id)+1,'deepu');
i tried it to insert id(last max(id)+1) automatically in serial order.but it fails.guess why??
because insert statement does not take group function in insert statement.

2)CASE – similar to IF/THEN/ELSE – used to turn Rows into Columns
Syntax –
SELECT a,b,c,
CASE WHEN(condition) THEN action ELSE action
FROM table_name
COALESCE – similar to IFNULL – returns first Non-NULL value in a list of values
Syntax – COALESCE (value1,value2)

EXTRACT – can be used to Extract Date parts –
Syntax - EXTRACT(month FROM date_field) or SUBSTR in Oracle

UNION and UNION ALL
Beware that UNION ALL is usually required –
because UNION implies a DISTINCT that does not return all the qualifying records.

Avoid Dividing by Zero – use NULLIF


2) what is the use of dual in sql? plz post your answers.i will be posting its answer with in some weeks(;-))

Saturday, August 21, 2010

Computer programming Quotes

Computers

“Computers are useless. They can only give you answers.”
(Pablo Picasso)

“Computers are like bikinis. They save people a lot of guesswork.”
(Sam Ewing)

“They have computers, and they may have other weapons of mass destruction.”
(Janet Reno)

“That’s what’s cool about working with computers. They don’t argue, they remember everything, and they don’t drink all your beer.”
(Paul Leary)

“If the automobile had followed the same development cycle as the computer, a Rolls-Royce would today cost $100, get a million miles per gallon, and explode once a year, killing everyone inside.”
(Robert X. Cringely)


Computer Intelligence

“Computers are getting smarter all the time. Scientists tell us that soon they will be able to talk to us. (And by ‘they’, I mean ‘computers’. I doubt scientists will ever be able to talk to us.)”
(Dave Barry)

“I’ve noticed lately that the paranoid fear of computers becoming intelligent and taking over the world has almost entirely disappeared from the common culture. Near as I can tell, this coincides with the release of MS-DOS.”
(Larry DeLuca)

“The question of whether computers can think is like the question of whether submarines can swim.”
(Edsger W. Dijkstra)

“It’s ridiculous to live 100 years and only be able to remember 30 million bytes. You know, less than a compact disc. The human condition is really becoming more obsolete every minute.”
(Marvin Minsky)

Trust

“The city’s central computer told you? R2D2, you know better than to trust a strange computer!”
(C3PO)

“Never trust a computer you can’t throw out a window.”
(Steve Wozniak)

Hardware

“Hardware: The parts of a computer system that can be kicked.”
(Jeff Pesis)

Software

“Most software today is very much like an Egyptian pyramid with millions of bricks piled on top of each other, with no structural integrity, but just done by brute force and thousands of slaves.”
(Alan Kay)

“I’ve finally learned what ‘upward compatible’ means. It means we get to keep all our old mistakes.”
(Dennie van Tassel)

Operating Systems

“There are two major products that come out of Berkeley: LSD and UNIX. We don’t believe this to be a coincidence.”
(Jeremy S. Anderson)

“19 Jan 2038 at 3:14:07 AM”
(End of the word according to Unix–2^32 seconds after January 1, 1970)

“Every operating system out there is about equal… We all suck.”
(Microsoft senior vice president Brian Valentine describing the state of the art in OS security, 2003)

“Microsoft has a new version out, Windows XP, which according to everybody is the ‘most reliable Windows ever.‘ To me, this is like saying that asparagus is ‘the most articulate vegetable ever.‘ “
(Dave Barry)

Internet

“The Internet? Is that thing still around?”
(Homer Simpson)

“The Web is like a dominatrix. Everywhere I turn, I see little buttons ordering me to Submit.”
(Nytwind)

“Come to think of it, there are already a million monkeys on a million typewriters, and Usenet is nothing like Shakespeare.”
(Blair Houghton)



Software Industry

“The most amazing achievement of the computer software industry is its continuing cancellation of the steady and staggering gains made by the computer hardware industry.”
(Henry Petroski)

“True innovation often comes from the small startup who is lean enough to launch a market but lacks the heft to own it.”
(Timm Martin)

“It has been said that the great scientific disciplines are examples of giants standing on the shoulders of other giants. It has also been said that the software industry is an example of midgets standing on the toes of other midgets.”
(Alan Cooper)

“It is not about bits, bytes and protocols, but profits, losses and margins.”
(Lou Gerstner)

“We are Microsoft. Resistance Is Futile. You Will Be Assimilated.”
(Bumper sticker)

Software Demos

“No matter how slick the demo is in rehearsal, when you do it in front of a live audience, the probability of a flawless presentation is inversely proportional to the number of people watching, raised to the power of the amount of money involved.”
(Mark Gibbs)

Software Patents

“The bulk of all patents are crap. Spending time reading them is stupid. It’s up to the patent owner to do so, and to enforce them.”
(Linus Torvalds)

Complexity

“Controlling complexity is the essence of computer programming.”
(Brian Kernigan)

“Complexity kills. It sucks the life out of developers, it makes products difficult to plan, build and test, it introduces security challenges, and it causes end-user and administrator frustration.”
(Ray Ozzie)

“There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies.”
(C.A.R. Hoare)

“The function of good software is to make the complex appear to be simple.”
(Grady Booch)

Ease of Use

“Just remember: you’re not a ‘dummy,’ no matter what those computer books claim. The real dummies are the people who–though technically expert–couldn’t design hardware and software that’s usable by normal consumers if their lives depended upon it.”
(Walter Mossberg)

“Software suppliers are trying to make their software packages more ‘user-friendly’… Their best approach so far has been to take all the old brochures and stamp the words ‘user-friendly’ on the cover.”
(Bill Gates)

“There’s an old story about the person who wished his computer were as easy to use as his telephone. That wish has come true, since I no longer know how to use my telephone.”
(Bjarne Stroustrup)

Users

“Any fool can use a computer. Many do.”
(Ted Nelson)

“There are only two industries that refer to their customers as ‘users’.”
(Edward Tufte)

Programmers

“Programmers are in a race with the Universe to create bigger and better idiot-proof programs, while the Universe is trying to create bigger and better idiots. So far the Universe is winning.”
(Rich Cook)

“Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris.”
(Larry Wall)

“The trouble with programmers is that you can never tell what a programmer is doing until it’s too late.”
(Seymour Cray)

“That’s the thing about people who think they hate computers. What they really hate is lousy programmers.”
(Larry Niven)

“For a long time it puzzled me how something so expensive, so leading edge, could be so useless. And then it occurred to me that a computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are, in short, a perfect match.”
(Bill Bryson)

“Computer science education cannot make anybody an expert programmer any more than studying brushes and pigment can make somebody an expert painter.”
(Eric Raymond)

“A programmer is a person who passes as an exacting expert on the basis of being able to turn out, after innumerable punching, an infinite series of incomprehensive answers calculated with micrometric precisions from vague assumptions based on debatable figures taken from inconclusive documents and carried out on instruments of problematical accuracy by persons of dubious reliability and questionable mentality for the avowed purpose of annoying and confounding a hopelessly defenseless department that was unfortunate enough to ask for the information in the first place.”
(IEEE Grid newsmagazine)

“A hacker on a roll may be able to produce–in a period of a few months–something that a small development group (say, 7-8 people) would have a hard time getting together over a year. IBM used to report that certain programmers might be as much as 100 times as productive as other workers, or more.”
(Peter Seebach)

“The best programmers are not marginally better than merely good ones. They are an order-of-magnitude better, measured by whatever standard: conceptual creativity, speed, ingenuity of design, or problem-solving ability.”
(Randall E. Stross)

“A great lathe operator commands several times the wage of an average lathe operator, but a great writer of software code is worth 10,000 times the price of an average software writer.”
(Bill Gates)





Programming

“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.”
(Mosher’s Law of Software Engineering)

“Measuring programming progress by lines of code is like measuring aircraft building progress by weight.”
(Bill Gates)

“Writing code has a place in the human hierarchy worth somewhere above grave robbing and beneath managing.”
(Gerald Weinberg)

“First learn computer science and all the theory. Next develop a programming style. Then forget all that and just hack.”
(George Carrette)

“First, solve the problem. Then, write the code.”
(John Johnson)

“Optimism is an occupational hazard of programming; feedback is the treatment.”
(Kent Beck)

“To iterate is human, to recurse divine.”
(L. Peter Deutsch)

“The best thing about a boolean is even if you are wrong, you are only off by a bit.”
(Anonymous)

“Should array indices start at 0 or 1? My compromise of 0.5 was rejected without, I thought, proper consideration.”
(Stan Kelly-Bootle)

Programming Languages

“There are only two kinds of programming languages: those people always bitch about and those nobody uses.”
(Bjarne Stroustrup)

“PHP is a minor evil perpetrated and created by incompetent amateurs, whereas Perl is a great and insidious evil perpetrated by skilled but perverted professionals.”
(Jon Ribbens)

“The use of COBOL cripples the mind; its teaching should therefore be regarded as a criminal offense.”
(E.W. Dijkstra)

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC. As potential programmers, they are mentally mutilated beyond hope of regeneration.”
(E. W. Dijkstra)

“I think Microsoft named .Net so it wouldn’t show up in a Unix directory listing.”
(Oktal)

“There is no programming language–no matter how structured–that will prevent programmers from making bad programs.”
(Larry Flon)

“Computer language design is just like a stroll in the park. Jurassic Park, that is.”
(Larry Wall)

C/C++

“Fifty years of programming language research, and we end up with C++?”
(Richard A. O’Keefe)

“Writing in C or C++ is like running a chain saw with all the safety guards removed.”
(Bob Gray)

“In C++ it’s harder to shoot yourself in the foot, but when you do, you blow off your whole leg.”
(Bjarne Stroustrup)

“C++ : Where friends have access to your private members.”
(Gavin Russell Baker)

“One of the main causes of the fall of the Roman Empire was that–lacking zero–they had no way to indicate successful termination of their C programs.”
(Robert Firth)

Java

“Java is, in many ways, C++–.”
(Michael Feldman)

“Saying that Java is nice because it works on all OSes is like saying that anal sex is nice because it works on all genders.”
(Alanna)

“Fine, Java MIGHT be a good example of what a programming language should be like. But Java applications are good examples of what applications SHOULDN’T be like.”
(pixadel)

“If Java had true garbage collection, most programs would delete themselves upon execution.”
(Robert Sewell)

Open Source

“Software is like sex: It’s better when it’s free.”
(Linus Torvalds)

“The only people who have anything to fear from free software are those whose products are worth even less.”
(David Emery)

Code

“Good code is its own best documentation.”
(Steve McConnell)

“Any code of your own that you haven’t looked at for six or more months might as well have been written by someone else.”
(Eagleson’s Law)

“The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time.”
(Tom Cargill)

Software Development

“Good programmers use their brains, but good guidelines save us having to think out every case.”
(Francis Glassborow)

“In software, we rarely have meaningful requirements. Even if we do, the only measure of success that matters is whether our solution solves the customer’s shifting idea of what their problem is.”
(Jeff Atwood)

“Considering the current sad state of our computer programs, software development is clearly still a black art, and cannot yet be called an engineering discipline.”
(Bill Clinton)

“You can’t have great software without a great team, and most software teams behave like dysfunctional families.”
(Jim McCarthy)

Debugging

“As soon as we started programming, we found to our surprise that it wasn’t as easy to get programs right as we had thought. Debugging had to be discovered. I can remember the exact instant when I realized that a large part of my life from then on was going to be spent in finding mistakes in my own programs.”
(Maurice Wilkes discovers debugging, 1949)

“Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are–by definition–not smart enough to debug it.”
(Brian Kernighan)

“If debugging is the process of removing bugs, then programming must be the process of putting them in.”
(Edsger W. Dijkstra)

Quality

“I don’t care if it works on your machine! We are not shipping your machine!”
(Vidiu Platon)

“Programming is like sex: one mistake and you’re providing support for a lifetime.”
(Michael Sinz)

“There are two ways to write error-free programs; only the third one works.”
(Alan J. Perlis)

“You can either have software quality or you can have pointer arithmetic, but you cannot have both at the same time.”
(Bertrand Meyer)

“If McDonalds were run like a software company, one out of every hundred Big Macs would give you food poisoning, and the response would be, ‘We’re sorry, here’s a coupon for two more.’ “
(Mark Minasi)

“Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.”
(Martin Golding)

“To err is human, but to really foul things up you need a computer.”
(Paul Ehrlich)

“A computer lets you make more mistakes faster than any invention in human history–with the possible exceptions of handguns and tequila.”
(Mitch Radcliffe)

Predictions

“Everything that can be invented has been invented.”
(Charles H. Duell, Commissioner, U.S. Office of Patents, 1899)

“I think there’s a world market for about 5 computers.”
(Thomas J. Watson, Chairman of the Board, IBM, circa 1948)

“It would appear that we have reached the limits of what it is possible to achieve with computer technology, although one should be careful with such statements, as they tend to sound pretty silly in 5 years.”
(John Von Neumann, circa 1949)

“But what is it good for?”
(Engineer at the Advanced Computing Systems Division of IBM, commenting on the microchip, 1968)

“There is no reason for any individual to have a computer in his home.”
(Ken Olson, President, Digital Equipment Corporation, 1977)

“640K ought to be enough for anybody.”
(Bill Gates, 1981)

“Windows NT addresses 2 Gigabytes of RAM, which is more than any application will ever need.”
(Microsoft, on the development of Windows NT, 1992)

“We will never become a truly paper-less society until the Palm Pilot folks come out with WipeMe 1.0.”
(Andy Pierson)

“If it keeps up, man will atrophy all his limbs but the push-button finger.”
(Frank Lloyd Wright)

C Programs a C programmer should know


10. Write a c program to add two numbers without using addition operator.
11. Write a c program to subtract two numbers without using subtraction operator.
15. Write a c program to solve quadratic equation.
18. Write a c program which passes structure to function.
28. Write a c program which takes password from user.
29. Write a scanf function in c which accept sentence from user.
30. Write a scanf function in c which accept paragraph from user.
L.C.M and H.C.F.

2. Write a c program to find out H.C.F. of two numbers.
Swapping

Conversion

1. Write a c program to convert decimal number to hexadecimal number.
3. Write a c program to convert octal number to decimal number.
4. Write a c program to convert octal number to hexadecimal number.
5. Write a c program to convert hexadecimal number to decimal number.
6. Write a c program to convert hexadecimal number to octal number.
8. Write a c program to convert binary number to hexadecimal number.
9. Write a c program to convert binary number to octal number.
11. Write a c program to convert hexadecimal number to binary number.
12. Write a c program to convert octal number to binary number.
14. Write a c program to convert centigrade to farehnite.
String

3. Write a c program to delete the all consonants from given string.
Matrix

2. Write a c program for subtraction of two matrices
File

2.  Write a c program to delete a file.
3. Write a c program to copy a file from one location to other location.
6. Write a c program which writes string in the file.
Complex number

2. Write a c program for multiplication of two complex numbers.
3. Write a c program for division two complex numbers.
Series

1. Write a c program to find out the sum of series 1 + 2 + ….  + n.
2. Write a c program to find out the sum of series 1^2 + 2^2 + …. + n^2.
3. Write a c program to find out the sum of series 1^3 + 2^3 + …. + n^3.
4. Write a c program to find out the sum of given A.P.
5. Write a c program to find out the sum of given G.P.
6. Write a c program to find out the sum of given H.P.
7. Write a c program to find out the sum of series 1 + 2 + 4 + 8 … to infinity.
Array

Sorting

5. Write a c program for heap sort.
6. Write a c program for merge sort.
7. Write a c program for shell sort.
Recursion

Size of data type

1. Write a c program to find the size of int without using sizeof operator.
2. Write a c program to find the size of double without using sizeof operator.     
3. Write a c program to find the size of structure without using sizeof operator.
4. Write a c program to find the size of union without using sizeof operator.
Using pointer

Searching

Area and volume

2. Write a c program to find the area of any triangle.
3. Write a c program to find the area of rectangle.
4. Write a c program to find the area of equilateral triangle.
5. Write a c program to find the area of trapezium.          
6. Write a c program to find the area of right angle triangle.         
7. Write a c program to find the volume and surface area of cube.
8. Write a c program to find the surface area and volume of a cone.
9. Write a c program to find the perimeter of a circle, rectangle and triangle.

Friday, August 20, 2010

Joomla 1.0 basics

Hi friends.
when it come to joomla 1.0 component development, there is one and only one thing that is need to be take care of, is the TASK(eg. delete,edit,cancel etc) that you pass in the component.
some time we pass the task through hidden fields also so that we can get it through the $_REQUEST(all though you can use $_POSTor $_GET but i would advice you to use $_REQUEST).


When building Joomla! components, modules or plugins we can define all configuration parameters through XML files. Some common parameter types are predefined and can be used in our Joomla! extensions.

Parameters in the Joomla for modules

Every parameter you define must have five basic attributes.

Parameter name, so you can reference it later in your code.
A default value to be displayed and used if no value is chosen.
A visible label
A description appearing when the mouse cursor hovers over it
The type of parameter
A categorized list is below:

Content

section - All published sections in a list category - All published categories in a list

Text Input
text - A standard text input
textarea - A plain textarea field
password - A standard text input where the characters are masked as they are entered editors

Selections
menu - All published menus in a list
menuitem - All published menu items in a list
filelist - A list of files to choose from, given a base folder path
folderlist - A list of folders to choose from, given a base folder path
imagelist - A list of images to choose from, given a base folder
path list - A list of items to choose from
radio - A list of radio selection items to choose from

Predefined
helpsites - A list of websites powering help file translations to choose from
languages - A list of installed languages to choose from
spacer - Creates a visual separation between parameters. No input value is required
Other
hidden - Creates a hidden form element with the value and name provided




soon i will be posting something which you have not seen before .
so just wait techies........



How to use H1 and H2 tag in the content pages



First of all i would like to tell you why we concerned with h1 and h2 tags,because they just help to optimize the page on the google(because google look for h1 and h2 tags for good optimization of the page on goolge page rank system).
in joomla 1.0 just look for the
function Title( &$row, &$params, &$access ) {

if ( $params->get( 'item_title' ) ) {
if ( $params->get( 'link_titles' ) && $row->link_on != '' ) {

?>

after the above code look
in the content.html.php and replace the "contentheading" class(its pre defined css file) with the h1 and the contenttitle with the h2 tag.
same in the joomla 1.5.I was just looking for the same solution but i found very confusing articles.

In simple words when ever you see content heading or content title replace the class with the tag you want. just replace td with the h1 or h2 .