1) The very first thing you should do is, download FireFox browser and surf internet with that only. To download Firefox go to http://www.mozilla.com
2) Once FireFox is setup, restart your PC and then Download this: http://www.torproject.org/torbrowser/dist/tor-browser-1.3.9_en-US.exe
3) Setup the above given software.
4) Once this is setup, You will see a program called "Vidalia Bundle", [...]
Monday, September 28, 2009
we know that rounded corner border is only working fine in firefox ,safari etc but not in IE. There is a hack for implementing curved border in IE.I got a file border.htc which is directly called in CSS using behavior property.
syntax:
behavior:url(border.htc)
this behavior is only for IE for other browser we have to use border radius [...]
Monday, September 28, 2009
To create a stylish and extra decoration for your border used in css, generally use border-radius to make it in curved shaped.Although this method is used in css3 and not working in IE ,but for mozilla firefox ,safari and other browser.
Syntax:
-moz-border-radius: 5px
-webkit-border-radius: 5px
-opera-border-radius: 5px
-khtml-border-radius: 5px
Example:
.giveborder{
border: 1px solid #eaea00;
background-color:#ffffb7;
padding:5px;
}
.makecurved{
[...]
Friday, September 18, 2009
Adobe’s portable document format (PDF) is everywhere these days — and it’s easy to see why. PDF files are secure. They also allow publishers to distribute documents with complex formatting retained, and, thanks to the free Adobe Acrobat Reader, they can be viewed by just about anyone on any platform.
But what if you’d like [...]
To open a popup window we use window.open method in javascript:
Syntax:
window.open(url,”windowname”,[windowfeatures]);
URL: Denotes,URL of the page to open in the new window.
windowname: Denotes name of the popup window. The name can be used to refer this window again.
windowfeatures: These contains strings seperated by commas which refers the windows features in off and on mode OR 0 [...]
Wednesday, April 22, 2009
Use preg_match OR preg_match_all to solve this problem.Here i have given simple Example for taking name and image format or extension and stored it in array:
Example1: Taking name and image format or extension from
<img src>
Here is the code:
$url=‘<img src="http://www.computereducationworld.com/logo.jpg">’;
preg_match_all(‘/ (src)(\=\’|\=\”)http:\/\/([a-zA-Z0-9\-\_\/\.]+|)\/([a-zA-Z0-9\-\_]+)\.([a-zA-Z]+)(\’|\”)/’,$url,$ImagesArray1,PREG_SET_ORDER);
print_r($ImagesArray1);
Output:
Array (
[0] => Array (
[0] => src="http://www.computereducationworld.com/logo.jpg"
[1] => src
[2] => ="
[3] [...]
we simply use parseInt() function to convert string into integer:
Example1:
parseInt(”34px”);
Output: 34
Example2:
Size:
<script type="text/javascript">function incre()
{
var increase = 10;
wid = parseInt(document.getElementById(’style_class’).style.width);
document.getElementById(’style_class’).style.width = wid + increase;
}</script>
<table border="0">
<tbody>
<tr>
<td id="style_class" style="width: 80px; height: 50px; background-color: red;"></td>
</tr>
</tbody></table>
<strong>Size:</strong>
<input onclick="getElementById(’style_class’).style.width=’100′" name="botton" type="button" value="Size to 100" /> <input onclick="getElementById(’style_class’).style.width=’120′" name="botton" type="button" value="Size to 120" /> <input onclick="incre()" name="botton" type="button" value="Increase by +10" />
style attributes are easily applicable to javascript code.
object.style.styleattribute
There is one basic rule you have to follow that is: if there is two name in style attribute like margin-left etc. write the first name(name before hyphen) as it is while the first letter of second name should be capital so:
margin-left = marginLeft
margin-top = marginTop
backgorund-color = backgroundColor
but [...]
Shortcut Keys
Description
Alt + Tab
Switch between open applications.
Alt + Shift + Tab
Switch backwards between open applications.
Alt + double-click
Display the properties of the object you double-click on.
Ctrl + Tab
With an application that has multiple sub tabs/document windows, this switch between tabs
Ctrl + Shift + Tab
Same as above but backwards.
Alt + Print Screen
Create [...]
This trick force for a secure HTTP connection
if (!($HTTPS == “on”)) {
header (”Location: https://$SERVER_NAME$php_SELF”);
exit;
}
Redirect to another page in PHP..Here is the code:
<?
header(“Location: http://www.computereducationworld.com/”);
exit(0);
?>
Display date and time with PHP:
<?
/* Today is March 9, 2009, 6:25 am */
$today = date(“F j, Y, g:i a”); // March 9, 2009, 6:25 am
$today = date(“m.d.y”); // 03.09.09
$today = date(“j, n, Y”); // 9, 3, 2009
$today = date(“Ymd”); // 20090309
$today = date(“D M j G:i:s T Y”);// Mon Mar 9 6:25:11 [...]
This trick helps you to send an alert mail when there is a new registration on your site or when there is some critical error in your PHP script.
<?
mail(“recipient@example.com”,
“email subject”,
“Body of the message”,
“From: webmaster@mydomain.com\r\n”);
?>
How to optimize PHP database table… Here code goes:
dbConnect()
$alltables = mysql_query(”SHOW TABLES”);
while ($table = mysql_fetch_assoc($alltables))
{
foreach ($table as $db => $tablename)
{
mysql_query(”OPTIMIZE TABLE ‘”.$tablename.”‘”)
or die(mysql_error());
}
}
This trick helps you protect your web page with a help of a password…Here is the code:
<?
$username = “someuser”;
$password = “somepassword”;
if ($_POST[‘txtUsername’] != $username || $_POST[‘txtPassword’] != $password) {?>
<h1>Login</h1>
<form name=”form” method=”post” action=”<?php echo $_SERVER[‘PHP_SELF’]; ?>”>
<p><label for=”txtUsername”>Username:</label>
<br><input type=”text” title=”Enter your Username” name=”txtUsername”></p>
<p><label for=”txtpassword”>Password:</label>
<br><input type=”password” title=”Enter your password” name=”txtPassword”></p>
<p><input type=”submit” name=”Submit” value=”Login”></p>
</form>
<?} else {?>
<p>This is the [...]
This trick disables the right click on your web page . It is tested on IE and works fine.. Here is the code:
<SCRIPT language=”JavaScript”>
<!–
var message=”Put here the text you want to display when you right click”;
function click(e) {
if (document.all) {
if (event.button==2||event.button==3) {
alert(message);
return false;
}
}
if (document.layers) {
if (e.which == 3) {
alert(message);
return false;
}
}
}
if (document.layers) {
document.captureEvents(Event.MOUSEDOWN);
}
document.onmousedown=click;
// –>
</SCRIPT>
[...]