<style>
strong { border-right-style: groove }
</style>
<strong style=”border-right-style: groove”>this is a test</strong>
<table>
<tr>
<td style=”border-right: solid;”>
nilesh </td>
<td style=”border: 1 px;border-color:green;border-style:solid;”>
nilesh1 </td>
<td style=”border-right-style: solid;border-right-width: thin;”> <!– border-style: solid; border-right-width: 0.5cm –> nilesh2 </td>
<td style=”border-right-style: solid;border-right-width: 0.001cm;border-right-color:red;”>
nilesh3 </td>
</tr>
</table>
Table – td – css class
Posted in Css
Notepad Diary….Really useful !!!
Hi All,
There is a simple feature in Notepad that can make it work like a personal diary for you. Here is how to go about it:
1. Firstly open a blank Notepad file.
2. Now write .LOG as the first line in the file, and then press enter. Now save the file and close it.
3. Open the notepad file now and you will find that the current date and time has been appended (put) at the end and the cursor is in the next line.
4. Type your notes and then save and close the file.
5. Each time you open the file, Notepad repeats the process that is it appends the date and time to the end of the file and places the cursor below it.
This way you can keep track of all your entries, you can easily maintain what you wrote when. This can work very much like a personal diary.
Its working ! ! !
Thanks,
Nilesh
Posted in other
“Sir” Sachin Tendulkar
Dear all
I didnt have words to say his achievements,but Just have look at the records held by Sachin Tendulkar. No wonder why British Prime Minister is suggesting him for the honor of ’Sir’.
New Records…………….
1. Highest Run scorer in the Test Cricket
2. First Cricketer to pass 12000 run in the Test Cricket
Records Held by Sachin Tendulkar
1. Highest Run scorer in the ODI
2. Most number of hundreds in the ODI 41
3. Most number of nineties in the ODI
4. Most number of man of the matches(56) in the ODI’s
5. Most number of man of the series(14) in ODI’s
6. Best average for man of the matches in ODI’s
7. First Cricketer to pass 10000 run in the ODI
8. First Cricketer to pass 15000 run in the ODI
9. He is the highest run scorer in the world cup (1,796 at an average of 59.87 as on 20 March 2007)
10. Most number of the man of the matches in the world cup
11. Most number of runs 1996 world cup 523 runs in the 1996 Cricket World Cup at an average of 87.16
12. Most number of runs in the 2003 world cup 673 runs in 2003 Cricket World Cup, highest by any player in a single Cricket World Cup
13. He was Player of the World Cup Tournament in the 2003 Cricket World Cup.
14. Most number of Fifties in ODI’s 87
15. Appeared in Most Number of ODI’s 407
16. He is the only player to be in top 10 ICC ranking for 10 years.
17. Most number of 100’s in test’s 40
18. He is one of the three batsmen to surpass 11,000 runs in Test cricket, and the first Indian to do so
19. He is thus far the only cricketer to receive the Rajiv Gandhi Khel Ratna, India’s highest sporting honor
20. In 2003, Wisden rated Tendulkar as d No. 1 and Richards at No. 2 in all time Greatest ODI player
21. In 2002, Wisden rated him as the second greatest Test batsman after Sir Donald Bradman.
22. he was involved in unbroken 664-run partnership in a Harris Shield game in 1988 with friend and team mate Vinod Kambli,
23. Tendulkar is the only player to score a century in all three of his Ranji Trophy, Duleep Trophy and Irani Trophy debuts
24. In 1992, at the age of 19, Tendulkar became the first overseas born player to represent Yorkshire
25. Tendulkar has been granted the Rajiv Gandhi Khel Ratna, Arjuna Award and Padma Shri by Indian government. He is the only Indian cricketer to get all of them.
26. Tendulkar has scored over 1000 runs in a calendar year in ODI’s 7 times
27. Tendulkar has scored 1894 runs in calendar year in ODI’s most by any batsman
28. He is the highest earning cricketer in the world
29. He has the least percentage of the man of the matches awards won when team looses a match.. Out of his 56 man of the match awards only 5 times India has lost.
30. Tendulkar most number man of match awards(10) against Australia
31. In August of 2003, Sachin Tendulkar was voted as the “Greatest Sportsman” of the country in the sport personalities category in the Best of India poll conducted by Zee News.
32. In November 2006, Time magazine named Tendulkar as one of the Asian Heroes.
33. In December 2006, he was named “Sports person of the Year
34. The current India Poised campaign run by The Times of India has nominated him as the Face of New India next to the likes of Amartya Sen and Mahatma Gandhi among others.
35. Tendulkar was the first batsman in history to score over 50 centuries in international cricket
36. Tendulkar was the first batsman in history to score over 75 centuries in international cricket:79 centuries
37. Has the most overall runs in cricket, (ODIs+Tests+Twenty20s), as of 30 June 2007 he had accumulated almost 26,000 runs overall.
38. Is second on the most number of runs in test cricket just after Brian Lara
39. Sachin Tendulkar with Sourav Ganguly hold the world record for the maximum number of runs scored by the opening partnership. They have put together 6,271 runs in 128 matches
40. The 20 century partnerships for opening pair with Sourav Ganguly is a world record
41. Sachin Tendulkar and Rahul Dravid hold the world record for the highest partnership in ODI matches when they scored 331 runs against New Zealand in 1999
42. Sachin Tendulkar has been involved in six 200 run partnerships in ODI matches – a record that he shares with Sourav Ganguly and Rahul Dravid
43. Most Centuries in a calendar year: 9 ODI centuries in 1998
44. Only player to have over 100 innings of 50+ runs (41 Centuries and 87 Fifties)(as of 18th Nov, 2007)
45. the only player ever to cross the 13,000-14,000 and 15,000 run marks IN ODI.
46. Highest individual score among Indian batsmen (186* against New Zealand at Hyderabad in 1999).
47. The score of 186* is listed the fifth highest score recorded in ODI matches
48. Tendulkar has scored over 1000 ODI runs against all major Cricketing nations.
49. Sachin was the fastest to reach 10,000 runs taking 259 innings and has the highest batting average among batsmen with over 10,000 ODI runs
50. Most number of Stadium Appearances: 90 different Grounds
51. Consecutive ODI Appearances: 185
52. On his debut, Sachin Tendulkar was the second youngest debutant in the world
53. When Tendulkar scored his maiden century in 1990, he was the second youngest to score a century
54. Tendulkar’s record of five test centuries before he turned 20 is a current world record
55. Tendulkar holds the current record (217 against NZ in 1999/00 Season) for the highest score in Test cricket by an Indian when captaining the side
56. Tendulkar has scored centuries against all test playing nations.[7] He was the third batman to achieve the distinction after Steve Waugh and Gary Kirsten
57. Tendulkar has 4 seasons in test cricket with 1000 or more runs – 2002 (1392 runs), 1999 (1088 runs), 2001 (1003 runs) and 1997 (1000 runs).[6] Gavaskar is the only other Indian with four seasons of 1000+ runs
58. He is second most number of seasons with over 1000 runs in world.
59. On 3 January 2007 Sachin Tendulkar (5751) edged past Brian Lara’s (5736) world record of runs scored in Tests away from home
60. Tendulkar and Brian Lara are the fastest to score 10,000 runs in Test cricket history. Both of them achieved this in 195 innings
61. Second Indian after Sunil Gavaskar to make over 10,000 runs in Test matches
62. Became the first Indian to surpass the 11,000 Test run mark and the third International player behind Allan Border and Brian Lara.
63. Tendulkar is fourth on the list of players with most Test caps. Steve Waugh (168 Tests), Allan Border (158 Tests), Shane Warne (145 Tests) have appeared in more games than Tendulkar
64. Tendulkar has played the most number of Test Matches(144) for India (Kapil Dev is second with 131 Test appearances).
65. First to 25,000 international runs
66. Tendulkar’s 25,016 runs in international cricket include 14,537 runs in ODI’s, 10,469 Tests runs and 10 runs in the lone Twenty20 that India has played.
67. On December 10, 2005, Tendulkar made his 35th century in Tests at Delhi against Sri Lanka. He surpassed Sunil Gavaskar’s record of 34 centuries to become the man with the most number of hundreds in Test cricket.
68. Tendulkar is the only player who has 150 wkts and more than 15000 runs in ODI
69. Tendulkar is the only player who has 40 wkts and more than 11000 runs in Tests
70. Only batsman to have 100 hundreds in the first class cricket .
Posted in other
Google search criteria…..
1) It is working on “AND” operator. eg. you enter -> new reader
Google searches -> news AND reader OR readers
2) Does not search as exact phrase unless quotes present!
e.g. “Nilesh Prajapati”
3) Expend search with synonym? Use a “tilde”
e.g. ~infosys -> finds IT companies similar to infosys
4) Search by file type (pdf, ppt, xls, doc)
e.g. “.NET Framework” filetype:ppt
5) Negative Search Terms
e.g. nano -car -> will return the results with word nano but not Tata Nano car
6)Limit your search results to a particular web site
e.g. sparsh site:infosys.com -> will get the pages from infosys.com where the word ’sparsh’ is referred.
7) Search for sites that link to a particular website
e.g. link:infosys.com
You’vd found a useful website & want to find other site like it
e.g. related:www.infosys.com
9) Google is a Dictionary — find definition of a word or a pharse?
e.g. define: scruples
10) Google is a Calculator as well
e.g. 10+2
11)
Posted in other
Microsoft Windows crazy facts
MAGIC #1
An Indian discovered that nobody can create a FOLDER anywhere on the computer which can be named as “CON”. This is something pretty cool…and unbelievable. .. At Microsoft the whole Team, couldn’t answer why this happened!
TRY IT NOW ,IT WILL NOT CREATE ” CON ” FOLDER
———— ——— ——— ——— ——— ——— ——— ——— —–
MAGIC #2
For those of you using Windows, do the following:
1.) Open an empty notepad file
2.) Type “Bush hid the facts” (without the quotes)
3.) Save it as whatever you want.
4.) Close it, and re-open it.
is it just a really weird bug? Confused?
———— ——— ——— ——— ——— ——— ——— ——— —–
MAGIC #3
This is something pretty cool and neat…and unbelievable. .. At Microsoft the whole Team,
including Bill Gates, couldn’t answer why this happened! It was discovered by a Brazilian.. Try it out
yourself…
Open Microsoft Word and type
=rand (200, 99)
And then press ENTER
Posted in other
sort textbox validation javascript
<script language=”javascript”>
//Function to trim the space in the left side of the string
function ltrim ( s ){
return s.replace( /^\s*/, “” );
}
//Function to trim the space in the right side of the string
function rtrim ( s ){
return s.replace( /\s*$/, “” );
}
//Function to trim the space in the string
function trim(s) {
var temp = s;
return temp.replace(/^\s+/,”).replace(/\s+$/, “” );
}
function checkSortOrderValue() {
inputEleArr = document.getElementsByTagName(‘input’);
isFillupSortText = false;
if (inputEleArr && inputEleArr != ‘undefined’) {
for (eltIndex = inputEleArr.length – 1; eltIndex >= 0; eltIndex–) {
currentElt = inputEleArr[eltIndex];
if (currentElt && currentElt != ‘undefined’) {
var eltTag = currentElt.tagName;
var eltType = currentElt.type;
var eltId = currentElt.id;
eltTag = (eltTag) ? eltTag.toLowerCase() : ”;
eltType = (eltType) ? eltType.toLowerCase() : ”;
//for sortbox only
if (eltType == ‘text’ && eltId) {
//sort text box have following id — sortText[uniqueIdVal here][sortOrder]
if (eltId.search(/sortText/) >= 0 ) {
eltValue = currentElt.value;
if (trim(eltValue)) { //trim is user defined function of javascript
isFillupSortText = true;
var anum=/(^\d+$)|(^\d+$)/ //only interger value allowed
if (anum.test(eltValue)) {
sortVal = parseInt(eltValue);
if (sortVal < 0 || sortVal > 32767 ) {
alert(“Sort number must be less than 32767.”);
return false;
}
}
else {
alert(“Invalid sort number. Please insert a valid sort number.”);
return false;
}
}//End of if (trim(eltValue))
}
}//End of if (eltType == ‘text’ && eltId)
}//End of if (currentElt && currentElt != ‘undefined’)
}//End of for (eltIndex = inputEleArr.length – 1; eltIndex >= 0; eltIndex–)
}
if (!isFillupSortText) {
alert(‘Please fillup one sort box value before pressing sort button.’);
return false;
}
return true;
}//End of funciton checkSortOrderValue
</script>
//html code like below….
<input type=”image” name=”sortBtn” id=”sortBtn” src=”sort.gif” width=”60″ height=”20″ onclick=”return checkSortOrderValue();”>
<?
//here $dataArr is the array values getting from the database.
foreach ($dataArr as $key => $valArr) {
$uniqueId = $valArr['id'];
$sortOrder = $valArr['sortOrder'];
?>
<input type=”text” name=”sortText[<?= $uniqueId ?>][sortOrder]” id=”sortText[<?= $uniqueId ?>][sortOrder]” value=”<?= $sortOrder ?>” size=”3″>
<? } ?>
Posted in javascript
Split() by newline and return using PHP
I was having a problem trying to split a string of multiple lines from an online form using the flowing code:
<?php
$namesArr = split(“\n”, $names);
?>
This was producing an unexpected line break. later i found that I needed to check for “returns” (r) also. So now when I’m splitting data by lines, I used the following code:
<?php
$namesArr = split(“[\n|\r]“, $names);
?>
This is also very good function of php (inbuilt function)
<?php
$text = "The quick brown fox jumped over the lazy dog.";
$newtext = wordwrap($text, 20, "<br />\n");
echo $newtext;
?>
Or – last argument passed as 1.
<?php
$text = "A very long woooooooooooord.";
$newtext = wordwrap($text, 8, "\n", 1);
echo "$newtext\n";
?>
Posted in php
MySQL Table Fields Data Types
In addition to int (Integer data type), MySQL also has provision for floating-point and double precision numbers. Each integer type can take also be UNSIGNED and/or AUTO_INCREMENT.
Numeric Data Types
Learn the three main basic data types used in MySQL and how to utilize them to build a more effective dynamic web site. Lots of web developers use MySQL but not all of them harness the power of these features.
The three main types of data types used in MySQL are
1) Numeric (Integer/Numbers/Money)
2) String (Text)
3) Date (Dates and Time)
It’s very important to pick the right data to achieve speed, effective storage and data retrieval. Here is a introduction to data types:
- TINYINT: very small numbers; suitable for ages. Actually, we should have used this data type for employee ages and number of children. Can store numbers between 0 to 255 if UNSIGNED clause is applied, else the range is between -128 to 127.
- SMALLINT: Suitable for numbers between 0 to 65535 (UNSIGNED) or -32768 to 32767.
- MEDIUMINT: 0 to 16777215 with UNSIGNED clause or -8388608 to 8388607.
- INT: UNSIGNED integers fall between 0 to 4294967295 or -2147683648 to 2147683647.
- BIGINT: Huge numbers. (-9223372036854775808 to 9223372036854775807)
- FLOAT: Floating point numbers (single precision)
- DOUBLE: Floating point numbers (double precision)
- DECIMAL:Floating point numbers represented as strings.
Date and Time Data types
Text can be fixed length (char) or variable length strings. Also, text comparisions can be case sensitive or insensitive depending on the type you choose.
Text Data Type
- CHAR(x): where x can range from 1 to 255.
- VARCHAR(x): x ranges from 1 – 255
- TINYTEXT: small text, case insensitive
- TEXT: slightly longer text, case insensitive
- MEDIUMTEXT: medium size text, case insensitive
- LONGTEXT: really long text, case insensitive
- TINYBLOB: Blob means a Binary Large OBject. You should use blobs for case sensitive searches.
- BLOB: slightly larger blob, case sensitive.
- MEDIUMBLOB: medium sized blobs, case sensitive.
- LONGBLOB: really huge blobs, case sensitive.
- ENUM: Enumeration data type have fixed values and the column can take only one value from the given set. The values are placed in parenthesis following ENUM declaration. An example, is the marital status column we encountered in employee_per table.
m_status ENUM("Y", "N")Thus, m_status column will take only Y or N as values. If you specify any other value with the INSERT statement, MYSQL will not return an error, it just inserts a NULL value in the column.
- SET: An extension of ENUM. Values are fixed and placed after the SET declaration; however, SET columns can take multiple values from the values provided. Consider a column with the SET data type as
foods SET ("Apples", "Cookies", "Pies", "Chicken")You can have 0 or all the four values in the column.
INSERT tablename (foods) values ("Apple", "Cookies");
Posted in mysql
PHP Include and Require Functions
Introduction:
With PHP, there are two ways to include a file. There is the include() statement and the require() statement. Both constructs are very similar except on how they handle failures. Include() produces a Warning while require() results in a Fatal Error.
I prefer to not to use the require() statement, because if there’s an error, the rest of the page will not be displayed. Include() does not behave this way, the script will continue regardless and all of the other code will be executed.
When a file is included, any variables available at that line in the calling file will be available within the called file, from that point forward. For example, you may want to store all of your php functions or database username and passwords into a file called “inc_funct.php” and have all the other pages include it. This will save you the headache of having to retype the code over and over again.
Source PHP Code:
<?
// include a file.
include(‘inc_info.php’);
// display the value of the included file.
echo $password;
?>
Source PHP Code of Included File (inc_info.php):
<?
$password = “1234″;
?>
Conclusion:
Just be sure to properly type the path to your file. Note, if you’re including files that are in higher directories (parent directories), it’s best to type out the full path name starting from the home directory (ex: home/user/public/file.php).
Posted in php
Array to csv downloadable
<?php
function export_array_to_csv($inarray) {
while (list ($key1, $val1) = each ($inarray)) {
while (list ($key, $val) = each ($val1)) {
if (is_numeric($val)) {
$sendback .= $val.”,”; //integer value
}else{
$sendback .= “\”". $val .”\”,”; //string value
}//fi
}//end of while
$sendback = substr($sendback, 0, -1); //chop last ,
$sendback .= “\n”;
}//End of while
return ($sendback);
}// end function
function send_file_to_client($filename, $data) {
header(“Content-type: application/ofx”);
header(“Content-Disposition: attachment; filename=$filename”);
echo $data;
};
function send_file_to_client_2($filename, $data) {
// required for IE, otherwise Content-disposition is ignored
if(ini_get(‘zlib.output_compression’))
ini_set(‘zlib.output_compression’, ‘Off’);
$file_extension = strtolower(substr(strrchr($filename,”.”),1));
//Start condition switch( $file_extension )
switch( $file_extension )
{
case “csv”: $ctype=”application/force-download”;break;
//case “csv”: $ctype=”application/octet-stream”;break;
//case “pdf”: $ctype=”application/pdf”; break;
//case “exe”: $ctype=”application/octet-stream”; break;
//case “zip”: $ctype=”application/zip”; break;
//case “doc”: $ctype=”application/msword”; break;
//case “xls”: $ctype=”application/vnd.ms-excel”; break;
//case “ppt”: $ctype=”application/vnd.ms-powerpoint”; break;
//case “gif”: $ctype=”image/gif”; break;
//case “png”: $ctype=”image/png”; break;
//case “jpeg”:
//case “jpg”: $ctype=”image/jpg”; break;
//default: $ctype=”application/force-download”;
default: echo “<html><title>This file cannot be downloaded</title> <body>ERROR: This file cannot be downloaded</body></html>”;exit;
}//End condition switch( $file_extension )
header(“Pragma: public”); // required
header(“Expires: 0″);
header(“Cache-Control: must-revalidate, post-check=0, pre-check=0″);
header(“Cache-Control: private”,false); // required for certain browsers
header(“Content-Type: $ctype; charset=utf-8″);
header(“Content-Disposition: attachment; filename=\”".basename($filename).”\”;” );
header(“Content-Transfer-Encoding: binary”);
echo $dataVal;
exit;
}
//How to use it:
$dataArr[0][0] = “value1″;
$dataArr[0][1] = “value2″;
$dataArr[1][0] = “value3″;
$dataArr[1][1] = “123123123″;
$dataArr[2][0] = “123″;
$dataArr[2][1] = “value4″;
send_file_to_client(“csvdatafile.csv”, export_array_to_csv($dataArr));
?>
Posted in php






