Skip to main content

Posts

Showing posts from January, 2012

Select all checkbox in Javascript

In programming we must design our site User-friendly. So for that this thing is very useful We can select multiple checkbox in a page with single click with the use of javascript Here is the code for javascript On which input you want to genrate this action just put the function on onclick event. <inpt type="button" onclick="selectall()">                         then genrate selectall function in javascript                <script type="text/javascript">                 function selectall()                 {                         var chks = document.getElementsByName('del[]');                         // here del[] is array name of your checkboxes                                                 for(i=0;i<chks.length;i++)                         {                             chks[i].checked=true;                         }                                     }             </script>                      

Difference Between $ and $$ in php

Difference Between $ and $$ Difference Between $ and $$ As you all know how can we declare simple kind of variable in php . $sign + name of your variable =  value that you want to assign to that variable . For example : $test = "testing continue"; $create = "world"; But now lets look at the use of $$ sign in php First lets take an example  : $create = "world"; $$create = "India"; This variables are same as $create = "world"; $world = "india"; In short  echo   $create  $($create); and  echo  $create $world; are same .. Enjoy…...

Number Format In Javascript

Number.toFixed() :                                 Formats any number for "x" number of trailing decimals. The number is rounded up, and "0"s are used after the decimal point if needed to create the desired decimal length.   var profits=2489.8237 profits.toFixed(3) //returns 2489.824 (round up) profits.toFixed(2) //returns 2489.82 profits.toFixed(7) //returns 2489.8237000 (padding)   Number.toPrecision() :                                   Formats any number so it is of "x" length. Also called significant digits. A decimal point and "0"s are used if needed to create the desired length.   var anumber=123.45 anumber.toPrecision(6) //returns 123.450 (padding) anumber.toPrecision(4) //returns 123.5 (round up) anumber.toPrecision(2) //returns 1.2e+2 (you figure it out!) Round to a certain number of places For rounding decimals y

Html tags

HTML Basic Document <html> <head> <title>Title of document goes here</title> </head> <body> Visible text goes here... </body> </html> Heading Elements <h1>Largest Heading</h1> <h2> . . . </h2> <h3> . . . </h3> <h4> . . . </h4> <h5> . . . </h5> <h6>Smallest Heading</h6> Text Elements <p>This is a paragraph</p> <br /> (line break) <hr /> (horizontal rule) <pre>This text is preformatted</pre> Logical Styles <em>This text is emphasized</em> <strong>This text is strong</strong> <code>This is some computer code</code> Physical Styles <b>This text is bold</b> <i>This text is italic</i> Links Ordinary link: <a href="http://www.example.com/">Link-text goes here</a> Image-link: <a href="http://ww

Difference between get and post and request

Fundamental Difference is probably the Visibility  - GET request is sent via the URL string (appended to the URI with a question-mark as separator), which is visible whereas POST request is encapsulated in the body of the HTTP request and can't be seen. Length  - Since, GET request goes via URL, so it has a limitation for its length. It can't be more than 255 characters long (though this is browser dependent, but usually the max is 255 characters only). Whereas no such maximum length limitation holds for the POST request for the obvious reason that it becomes a part of the body of the HTTP request and there is no size limitation for the body of an HTTP request/response. Performance  - GET request is comparatively faster as it's relatively simpler to create a GET request and the time spent in the encapsulation of the POST request in the HTTP body is saved in this case. In addition, the maximum length restriction facilitates better optimization of GET implemen

Difference between Echo and Print in php

Difference Between $ and $$   print  and  echo  are commands used to output information to the visitors screen (on the web page). Both do the same job, so it usually comes down to a matter of personal preference on which one you like to use.  <?php print  "Hello World! <br />"; echo  "Hello World!"; ?> The output : Hello World! Hello World! The above example shows both outputs are the same. It also shows that regular HTML tags may be placed within the value areas as well as regular text.  There is a slight difference between print and echo which would depend on how you want to use the outcome. Using the print method can return a true/false value. This may be helpful during a script execution of somesort. Echo does not return a value, but has been considered as a faster executed command. All this can get into a rather complicated discussion, so for now, you can just use whichever one you prefer.  Some resources will state that

Acer unveils ‘world's thinnest’ ultrabook, Aspire S5

LAS VEGAS:  Acer  unveiled the world's thinnest laptop computer as an array of "ultrabook" rivals prepared to debut this week at the Consumer Electronics Show in  Las Vegas .  The Taiwan-based computer titan will begin shipping Acer Aspire 5 models in the second quarter of this year, with prices to be disclosed in coming weeks.  "That S5 is quite significant," analyst Tim Bajarin of Creative Strategies said after the Acer press event.  "It looks like the thinnest and lightest, and it sets the bar for the rest of the ultrabook vendors," he continued.  The  Aspire S5  has a 34-cm (13.3-inch) screen and is 15 mm at its thickest point. The ultrabook weighs slightly less than 1.35 kg (three pounds).  "We are committed to evolving this technology," said Acer chief executive J.T. Wang. "By the second quarter of this year we will have four models of ultrabook and more to come."  Ultrabooks powered by  Windows 8  will be released by Acer

Facebook boosts security after worm siphons 45,000 logins

LONDON: Social networking giant  Facebook has acted to stop the spread of a new computer worm  that has stolen over 45,000 login credentials.  According to computer  security  experts, the Ramnit worm  has been spreading since April 2010, but was only recently adapted to target Facebook details.  A "worm" is distinct from a normal  computer virus  in that it can reproduce itself without needing to attach itself to an existing program.  The new threat to Facebook  users  was highlighted recently by Seculert, an Israeli computer security firm. It said most of the users affected so far are British or French, The Telegraph reports.  "Our research lab identified a completely new 'financial' Ramnit variant aimed at stealing Facebook login credentials," the firm said in a blog post.  "It was fairly straightforward to detect that over 45,000 Facebook  login credentials  have been stolen worldwide, mostly from users in the  United Kingdom  and France,

Bajaj launches India's latest ultra-low-cost car RE60

Bajaj Auto unveiled India's latest ultra-low-cost car on Tuesday, a 200cc four-seater that looks set to compete with the Tata Nano for the title of the world's cheapest auto.  The group gave no price for the low-emission vehicle which will have a top speed of 70 kilometres an hour   (43 miles an hour), but the build quality indicated it was pitched firmly at the bottom of the market. The "RE60" is the first foray into the passenger car market by Bajaj, a motorbike and rickshaw specialist which entered into an ultimately aborted alliance with Nissan and Renault in 2009 to develop the vehicle. Group managing director Rajiv Bajaj said the core market for the RE60 would be owners of three-wheeled motorised rickshaws who wanted to upgrade to four wheels, but it was also for anyone who "wanted to take it home." One of the models on display was fitted with a taxi meter, an indication that Bajaj hopes the snub-nosed car with small wheels might replace In