Hide mouse on canvas in Javascript

<!DOCTYPE html> <html> <head> <script type=’text/javascript’ src=’http://code.jquery.com/jquery-1.9.1.js’></script> <style type=’text/css’> canvas{border:1px solid red;} </style> <script type=’text/javascript’> $(window).load(function(){ $(“#theCanvas”).click(function () { alert(“You clicked the canvas with an invisible mouse!”); $(“#theCanvas”).css(“cursor”, “none”); }); }); </script> </head> <body> <p”>Click the red canvas and I’ll hide the cursor when you are over me</p> <canvas id=”theCanvas”></canvas> </body> </html>

Random Password Generate in PHP

In this tutorial i am create Random Password Generate in php so you can choose secure password create . <?php $string = “abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890~!@#$%^&*()_+{}<>?”; echo substr(str_shuffle($string), 0, 12); //you can add start to end length from the password //12 is minimum 12 letter password ?>

Create Count Down Timer in Javascript

In this simple code you can create count down timer in just few step . <span id=”countdown” class=”timer”></span> <script> var seconds = 20;  // change time in second function secondPassed() { var minutes = Math.round((seconds – 30)/60); var remainingSeconds = seconds % 60; if (remainingSeconds < 10) { remainingSeconds = “0” + remainingSeconds; } document.getElementById(‘countdown’).innerHTML

Set Box with Shadow in javascript

<!DOCTYPE html> <html> <head> <script type=’text/javascript’ src=’http://code.jquery.com/jquery-1.8.3.js’></script> <script type=’text/javascript’> $(window).load(function(){ var canvas=document.getElementById(“canvas”); var ctx=canvas.getContext(“2d”); ctx.rotate(.6); ctx.rect(150, 50, 50, 60); ctx.shadowOffsetX = 50; ctx.shadowOffsetY = 50; ctx.shadowBlur = 5; ctx.shadowColor = “DarkGoldenRod”; ctx.strokeStyle = “Gold”; ctx.stroke(); }); </script> </head> <body> <canvas id=”canvas” width=300 height=300></canvas> </body> </html>

Add close button to dialog in website

<!DOCTYPE html> <html> <head> <script type=’text/javascript’> window.onload=function(){ Dialog_header.onclick = function(e) { $(“#Dialog”).fadeOut(500); }; Button1.onclick = function(e) { var $dialog = $(“#Dialog”); if (!$dialog.hasClass(‘ui-dialog’)) { $dialog.page(); } $dialog.fadeIn(500); }; Button2.onclick = function() { $(“#Dialog”).fadeOut(500); }; } </script> <link rel=”stylesheet” href=”http://code.jquery.com/mobile/1.1.0-rc.1/jquery.mobile-1.1.0-rc.1.min.css” /> <script src=”http://code.jquery.com/jquery-1.7.1.min.js”></script> <script src=”http://code.jquery.com/mobile/1.1.0-rc.1/jquery.mobile-1.1.0-rc.1.min.js”></script> </head> <body> <div data-role=”page” id=’Page1′> <div data-role=’button’ id=”Button1″>Open Dialog</div> </div> <div

Create Input Type Date in Javascript

<!DOCTYPE html> <html> <head> <script type=’text/javascript’ src=’https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js’></script> <script type=’text/javascript’ src=”http://code.jquery.com/mobile/latest/jquery.mobile.min.js”></script> <link rel=”stylesheet” type=”text/css” href=”http://code.jquery.com/mobile/latest/jquery.mobile.min.css”> </head> <body> <div data-role=”page”> <div data-role=”content”> <input type=”date” /> </div> </div> </body> </html>

Create transparent navbar in html and css

<!DOCTYPE html> <html> <head> <title> Simple Page </title> <link rel=”stylesheet” type=”text/css” href=”style.css”> </head> <body> <ul> <li> <a href=”#”> Menu 1 </a> <ul> <li> <a href=”#”> Menu 1.1 </a> </li> <li> <a href=”#”> Menu 1.2 </a> </li> <li> <a href=”#”> Menu 1.3 </a> </li> </ul> </li> <li> <a href=”#”> Menu 2 </a> <ul> <li> <a href=”#”>

Set TimePicker to 24 Hour View in Android UI

<?xml version=”1.0″ encoding=”utf-8″?> <LinearLayout xmlns:android=”http://schemas.android.com/apk/res/android” android:layout_width=”fill_parent” android:layout_height=”fill_parent” android:orientation=”vertical” > <TimePicker android:id=”@+id/timePicker” android:layout_width=”wrap_content” android:layout_height=”wrap_content” /> <Button android:id=”@+id/btnSet” android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:text=”I am all set!” android:onClick=”onClick” /> </LinearLayout> ————————- Java Code —————————   package com.studentsempire.myapplication3.app; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.widget.TimePicker; import android.widget.Toast; public class MainActivity extends Activity { TimePicker timePicker; @Override public void onCreate(Bundle savedInstanceState)