Saturday, February 23, 2013

Text Blinking in HTML support in Mozilla, IE and Chrome


Paste between <head></head> tag.


 <script type="text/javascript">
<!--
spe=500;
na=document.all.tags("blink");
swi=1;
bringBackBlinky();
function bringBackBlinky() {
if (swi == 1) {
sho="visible";
swi=0;
}
else {
sho="hidden";
swi=1;
}
for(i=0;i<na.length;i++) {
na[i].style.visibility=sho;
}
setTimeout("bringBackBlinky()", spe);
}
-->
</script>

Paste between <body></body> tag:

<blink> IMPORTANT INFORMATION&nbsp;</blink>



-------------------------------
Thanks and Regards
Varun Bansal
Software Developer

Friday, July 13, 2012

Check Your Own Mobile Number

Hi,

Some time mobile user forget own mobile number for recharging purpose or giving to other person.
So don't worry, try below code according your mobile operator.


 For Example:

If you have Airtel operater then type *121*9# and press dial button.
After some time you will see your own number.

Thanks and Regards
Varun Bansal
Sr. Programmer
www.perfume2order.com

Friday, July 23, 2010

First time a friendly browser launch by India

Hi guys,

First time a browser launched by India supporting by Mozilla. The name of the browser is Epic...

Epic have side bar application which is helpful to all user...

So enjoy with new indian brower (Epic)......



Click on the below link for download Epic Browser

http://http.cdnlayer.com/href/epic-setup.exe


click for visit Epic browser site..

http://www.epicbrowser.com/


Thanks and Regards
Varun Bansal
System Officer
E-Court Project
Jaipur District CourtJaipur

Friday, December 11, 2009

Please Carefull If U r Using Mobile Phone

If you receive a phone call on your Mobile from any person saying that they are checking your mobile line or going to give you some offer/ prize, and ask you to press #90 or #09 or any other number. End that call immediately without pressing any Number. There is a company in Pakistan that is using a device that once you press #90 or #09 they can access your SIM card and make calls at your expense. They are misusing it to make calls from Indian numbers. Forward this message to as many friends as u can, to stop it. This information has been confirmed by both Motorola and Nokia.. There are over 3 million mobile phones affected by this. You can check this news at CNN web site

Thanks and Regards
Varun Bansal
System Officer
E-Court Project
Jaipur District Court
Jaipur

Friday, July 10, 2009

Image Store in Database (BLOB)

There is two process of image store in web application..
1. physicaly store
2. Store in Database (Blob)
I give the code of store image in database..

//when the image has a valid path
if(imgname!="")
{
FileStream fs;
fs=new FileStream(@imgname,FileMode.Open,FileAccess.Read);
//a array of byte to read the image
byte[] blobimg = new byte[fs.Length];
fs.Read(blobimg,0,System.Convert.ToInt32(fs.Length));
fs.Close();
// open database and excute below query...
// emp is a table name where three column is id (nvarchar), name(nvarchar) and photo(img)
query="insert into emp(id,name,photo) values(" + txtid.Text + "," + "'" + txtname.Text + "'," + " :BlobParameter )";
OracleParameter blobParameter = new OracleParameter();
blobParameter.OracleType = OracleType.Blob;
blobParameter.ParameterName = "BlobParameter";
blobParameter.Value = blobimg;
cmnd=new OracleCommand(query,conn);
cmnd.Parameters.Add(blobParameter);
cmnd.ExecuteNonQuery();
MessageBox.Show("Succesfully done!");
}

Read img from database
There is use following contros:

1. combobox:cmbname
2. label:lblname
3. buttons:btnshow
4. picturebox:img
global declare these variable:
OracleConnection con;
OracleDataAdapter empadp;
DataSet ds;
string constr;
//bind name of img in combobox at page load event
constr="User Id=sc;Password=t;Data Source=st;";con=new OracleConnection(connstr);
con.Open();
empadp=new OracleDataAdapter();
empadp.SelectCommand=new OracleCommand("SELECT * FROM emp",conn);
ds=new DataSet("dset");
empadp.Fill(ds);
DataTable dt;
dt=ds.Tables[0];
cmbname.Items.Clear();
foreach(DataRow dr in dt.Rows)
{
cmbname.Items.Add(dr[1].ToString());
cmbname.SelectedIndex=0;
}

// show img when select name of img from combobox,
DataTable dt = ds.Tables[0];
//if there is an already an image in picturebox, then delete it
if(img.Image != null)
{
img.Image.Dispose();
}
//using filestream object write the column as bytes and store it as an image
FileStream FS = new FileStream("image.jpg", FileMode.Create);
foreach(DataRow dr in dt.Rows)
{
if(dr[1].ToString() == cmbname.SelectedItem.ToString()) //check name of the image
{
byte[] blob = (byte[])dr[2];
FS.Write(blob,0,blob.Length);
FS.Close();
FS = null;
img.Image = Image.FromFile("image.jpg");
img.SizeMode = PictureBoxSizeMode.StretchImage;
img.Refresh();
}
}
Thanks and Regards
Varun Bansal
Assistant Programmer
NIC, Jaipur

Friday, July 3, 2009

Validate float value while entering in textbox using javasript

on .aspx page
<script language="javascript" type="text/javascript"7gt;
function check_float(e,field)
{
if (!(((e.keyCode>=48)&&(e.keyCode<=57))(e.keyCode==46)))
{
alert("Only Digits Are Allowed!");
e.keyCode=0;
}
if (e.keyCode==46)
{
var patt1=new RegExp("\\.");
var ch =patt1.exec(field);
if(ch==".")
{
alert("More then one decimal point not allowed");
e.keyCode=0; }
}
}
</script>

on code behind (.aspx.cs page) :
TextBox5.Attributes.Add("onkeypress", "check_float(event,document.getElementById('" + TextBox5.ClientID + "').value)");
TextBox6.Attributes.Add("onkeypress", "check_float(event,document.getElementById('" + TextBox6.ClientID + "').value)");

Thanks and Regards
Varun Bansal
Assistant Programmer
NIC, Jaipur

Tips & Tricks : Nero 8

Nero BurnRights
Nero 8 that allows you to define user authentication for specific user on your system can burn CDs and DVDs. Go to Start > All Programs > Nero 8 > Nero Toolkit > Nero BurnRights. Select the type of users that you want to give permission to, and click OK.

Do Not Eject The CD/DVD

Every CD immediately ejected after burn from the drive by default. To keep the CD or DVD in the drive once it’s done, go to File > Options > Expert Features. Check the box "Do not eject the disc after the burn is complete" and click OK.

Thanks and Regards
Varun Bansal
Assistant Programmer
NIC, Jaipur