<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-915936226477348126</id><updated>2024-09-17T09:23:36.220+05:30</updated><category term="computers"/><category term="ASP.NET"/><category term=".NET"/><category term="VB.NET"/><category term="Hardware"/><category term="JAVA.proggramming language"/><category term="Mainframe"/><category term="Bluetooth"/><category term="Mobiles"/><category term="Networking"/><category term="computer"/><category term="gtalk"/><title type='text'>subham&#39;s</title><subtitle type='html'>Go through to know more..........</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://subhambasak.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://subhambasak.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Subham Basak</name><uri>http://www.blogger.com/profile/11375424304433724624</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnkz1s-xZXCXxghXyOyzhqxfKWErXXIac-DxV_8P962gD3jFzeguod0-pNs4D2sq5ztijTNjJSomKFxCn-APa8Z1AGE-ys3_lfjsvDNK839mVQrdEK9BeZv7loqj95inY/s220/16032009170445.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>27</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-915936226477348126.post-7892107921462475338</id><published>2012-04-19T12:08:00.000+05:30</published><updated>2012-04-19T12:08:26.695+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="computer"/><category scheme="http://www.blogger.com/atom/ns#" term="Mainframe"/><title type='text'>How to handle clear key in CICS</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
In CICS the clear key can be handled by the EIBAID.While entering into a transaction we can evaluate the EIBAID and if the EIBAID value is DFHCLEAR Then we can simply throw the map with its values. IF we&amp;nbsp; ever try to recieve a map after pressing the clear key then it will issue a AEIP abend, as the clear key clears the cics terminal amd while recieving the map it recieves a null value. So it issues an AEIP abend.&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;The Sample code is&lt;/u&gt; :-&lt;br /&gt;
&lt;br /&gt;
EVALUATE EIBTRNID &lt;br /&gt;
WHEN TRANS &lt;br /&gt;
&lt;br /&gt;
EVALUATE EIBAID &lt;br /&gt;
&lt;br /&gt;
WHEN DFHCLEAR &lt;br /&gt;
PERFORM 100-SEND-PARA &lt;br /&gt;
END-EVALUATE &lt;br /&gt;
END-EVALUATE. &lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&lt;u&gt;The send para is:-&lt;/u&gt; &lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
100-SEND-PARA. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
EXEC CICS SEND &lt;br /&gt;
MAP(POA) &lt;br /&gt;
MAPSET(TCHM121) &lt;br /&gt;
FROM(POAO) &lt;br /&gt;
ERASE &lt;br /&gt;
FREEKB &lt;br /&gt;
CURSOR &lt;br /&gt;
END-EXEC .&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://subhambasak.blogspot.com/feeds/7892107921462475338/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://subhambasak.blogspot.com/2012/04/how-to-handle-clear-key-in-cics.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/7892107921462475338'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/7892107921462475338'/><link rel='alternate' type='text/html' href='http://subhambasak.blogspot.com/2012/04/how-to-handle-clear-key-in-cics.html' title='How to handle clear key in CICS'/><author><name>Subham Basak</name><uri>http://www.blogger.com/profile/11375424304433724624</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnkz1s-xZXCXxghXyOyzhqxfKWErXXIac-DxV_8P962gD3jFzeguod0-pNs4D2sq5ztijTNjJSomKFxCn-APa8Z1AGE-ys3_lfjsvDNK839mVQrdEK9BeZv7loqj95inY/s220/16032009170445.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-915936226477348126.post-3467259181750650806</id><published>2012-04-05T10:26:00.000+05:30</published><updated>2012-04-05T10:26:57.005+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Mainframe"/><title type='text'>Mainframe Tips</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;How to list last 10 datasets used in tso region&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;goto ispf 3.4 option, on the top menubar select reflist and select option 1 and you will find the last&amp;nbsp;datasets used&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Auto-indentation&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;text-align: left;&quot;&gt;When writing code in certain programming languages, indentation is an important part of the style to ensure that the code is more readable. You can set up the vi editor to automatically indent to adhere to a language-specific style when necessary. You use autoindent to turn automatic indenting on or off&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Switch case&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;text-align: left;&quot;&gt;You can switch the case of the alpha character underneath your cursor in vi the tilde key (~). Doing so shifts from lowercase to uppercase and vice versa. Holding down the key rolls over each character in the line, flipping the case of any alpha characters the editor comes across. You can enter a numeric character prior to the tilde to denote how many alpha characters you want to change.&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;Section save&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;text-align: left;&quot;&gt;You can save sections of a file you&#39;re currently editing by entering :start,endw file, where start is the first line in the current file from which you want to save, end is the last line that you want to save to, w denotes that you want to write to another file (or overwrite an existing file), and file is the name of the file to which you want to save the specified section. You can use the $ notation for the last line to specify to the end of the file and double greater-than symbols (&amp;gt;&amp;gt;) after the w to indicate that you want to append to rather than overwrite the file&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://subhambasak.blogspot.com/feeds/3467259181750650806/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://subhambasak.blogspot.com/2012/04/mainframe-tips.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/3467259181750650806'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/3467259181750650806'/><link rel='alternate' type='text/html' href='http://subhambasak.blogspot.com/2012/04/mainframe-tips.html' title='Mainframe Tips'/><author><name>Subham Basak</name><uri>http://www.blogger.com/profile/11375424304433724624</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnkz1s-xZXCXxghXyOyzhqxfKWErXXIac-DxV_8P962gD3jFzeguod0-pNs4D2sq5ztijTNjJSomKFxCn-APa8Z1AGE-ys3_lfjsvDNK839mVQrdEK9BeZv7loqj95inY/s220/16032009170445.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-915936226477348126.post-7204642431918110212</id><published>2011-07-17T17:30:00.001+05:30</published><updated>2011-07-17T17:30:02.146+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET"/><category scheme="http://www.blogger.com/atom/ns#" term="computers"/><category scheme="http://www.blogger.com/atom/ns#" term="VB.NET"/><title type='text'>Using progress bar in VB.NET</title><content type='html'>A simple example of how to user a progress bar.&amp;nbsp; Here we will do a&lt;br /&gt;
simple query, and advance through the records while showing a&lt;br /&gt;
progress  bar.&amp;nbsp; In order to try this, simple create a new Windows&lt;br /&gt;
Application, and  drap a progress bar control onto your form.Next,&lt;br /&gt;
you can add the code  from below, and you should be all set.&lt;br /&gt;
The progress bar will automatically increase steps based on the&lt;br /&gt;
number  of records we have in the database.This gives an idea to&lt;br /&gt;
the user of  how long they will be waiting.&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;&lt;br /&gt;
Progress Bar Code :-&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;DataSet&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; DS = &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;new&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;DataSet&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;();&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;DS = GetDataSet(&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-size: x-small;&quot;&gt;&quot;select *  from&amp;nbsp;Employees&quot;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;);  &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;//Verify we have  records&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;if&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; (DS != &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; &amp;amp;&amp;amp; DS.Tables.Count &amp;gt; 0 &amp;amp;&amp;amp;  DS.Tables[0].Rows.Count &amp;gt; 0)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;//Set Progress Bar&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;ProgressBarMigration.Visible  = &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;//Make it visible&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ProgressBarMigration.Minimum  = 0;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;//Set Min Steps &lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ProgressBarMigration.Maximum  = DS.Tables[0].Rows.Count;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;//Set&amp;nbsp;Number of Max  Steps&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ProgressBarMigration.Value = 0;&amp;nbsp; &lt;span style=&quot;color: green;&quot;&gt;//Initiliaze to beginning&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: green; font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;//parse  through each record&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;foreach&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;DataRow&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; dr &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;in&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt; DS.Tables[0].Rows)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ProgressBarMigration.Value  += 1;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;System.Threading.&lt;/span&gt;&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;Thread&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;.Sleep(50);&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: green;&quot;&gt;//Sleep to slow down to see steps&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span style=&quot;color: green;&quot;&gt;//Ideally here you would&amp;nbsp;do your transactions&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ProgressBarMigration.Visible  = &lt;/span&gt;&lt;span style=&quot;color: blue; font-size: x-small;&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #2b91af; font-size: x-small;&quot;&gt;MessageBox&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;.Show(&lt;/span&gt;&lt;span style=&quot;color: #a31515; font-size: x-small;&quot;&gt;&quot;Migration Complete.&quot;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;);&lt;br /&gt;
}&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://subhambasak.blogspot.com/feeds/7204642431918110212/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://subhambasak.blogspot.com/2011/07/using-progress-bar-in-vbnet.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/7204642431918110212'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/7204642431918110212'/><link rel='alternate' type='text/html' href='http://subhambasak.blogspot.com/2011/07/using-progress-bar-in-vbnet.html' title='Using progress bar in VB.NET'/><author><name>Subham Basak</name><uri>http://www.blogger.com/profile/11375424304433724624</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnkz1s-xZXCXxghXyOyzhqxfKWErXXIac-DxV_8P962gD3jFzeguod0-pNs4D2sq5ztijTNjJSomKFxCn-APa8Z1AGE-ys3_lfjsvDNK839mVQrdEK9BeZv7loqj95inY/s220/16032009170445.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-915936226477348126.post-2100566330954369268</id><published>2011-07-17T10:56:00.000+05:30</published><updated>2011-07-17T10:56:25.181+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET"/><category scheme="http://www.blogger.com/atom/ns#" term="computers"/><category scheme="http://www.blogger.com/atom/ns#" term="VB.NET"/><title type='text'>Destroy cookie using VB.NET and ASP.NET</title><content type='html'>This is a small function which allows you to destroy a  cookie.&lt;br /&gt;
All that is needed is to pass the cookie name.&amp;nbsp; If the cookie  is&lt;br /&gt;
found, it&#39;ll set it so that it has expired.&lt;br /&gt;
&lt;br /&gt;
Public Shared Sub DestroyCookie(ByVal CookieName As String)&lt;br /&gt;
&amp;nbsp;Dim  CookieObj As HttpCookie =  HttpContext.Current.Request.Cookies(&quot;CookieName&quot;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; If  CookieObj IsNot Nothing Then&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; CookieObj.Expires =  DateTime.Now.AddDays(-1d)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;  HttpContext.Current.Response.Cookies.Add(CookieObj)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp;  End If&lt;br /&gt;
End Sub &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just call this static function and.If you are calling it  from a regular&lt;br /&gt;
class you may want to make it a non static method.&amp;nbsp; I  had this is&lt;br /&gt;
a HttpHelper class, which I would just call by using&lt;br /&gt;
HttpHelper.DestroyCookie(&quot;mycookiename&quot;)</content><link rel='replies' type='application/atom+xml' href='http://subhambasak.blogspot.com/feeds/2100566330954369268/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://subhambasak.blogspot.com/2011/07/destroy-cookie-using-vbnet-and-aspnet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/2100566330954369268'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/2100566330954369268'/><link rel='alternate' type='text/html' href='http://subhambasak.blogspot.com/2011/07/destroy-cookie-using-vbnet-and-aspnet.html' title='Destroy cookie using VB.NET and ASP.NET'/><author><name>Subham Basak</name><uri>http://www.blogger.com/profile/11375424304433724624</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnkz1s-xZXCXxghXyOyzhqxfKWErXXIac-DxV_8P962gD3jFzeguod0-pNs4D2sq5ztijTNjJSomKFxCn-APa8Z1AGE-ys3_lfjsvDNK839mVQrdEK9BeZv7loqj95inY/s220/16032009170445.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-915936226477348126.post-8475891095626517431</id><published>2011-06-11T10:15:00.000+05:30</published><updated>2011-06-11T10:15:01.569+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET"/><category scheme="http://www.blogger.com/atom/ns#" term="computers"/><category scheme="http://www.blogger.com/atom/ns#" term="VB.NET"/><title type='text'>Drawing a pie chart in .NET</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;color: black;&quot;&gt;This program shows how to draw a pie chart from the values obtained from a table..&lt;/div&gt;&lt;div style=&quot;color: black;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;color: black;&quot;&gt;Imports  System.Data.OleDb&lt;br /&gt;
Imports  System.Drawing.Drawing2D&lt;br /&gt;
Imports  System.Messaging&lt;br /&gt;
Imports  System.ServiceProcess&lt;br /&gt;
&lt;br /&gt;
Public  Class  Form1&lt;/div&gt;&lt;div style=&quot;color: black;&quot;&gt;Dim Conn As  OleDbConnection = New OleDbConnection(&quot;Provider=Microsoft.Jet.OLEDB.4.0;Data  Source=C:\mdb1.mdb&quot;)&lt;/div&gt;&lt;div style=&quot;color: black;&quot;&gt;Dim dr As  OleDbDataReader&lt;br /&gt;
Dim rd As  New  Random(255)&lt;/div&gt;&lt;div style=&quot;color: black;&quot;&gt;Dim Arr As  New  ArrayList&lt;/div&gt;&lt;div style=&quot;color: black;&quot;&gt;Dim pos As  Integer&lt;br /&gt;
Private  Sub  Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load&lt;br /&gt;
Bind()&lt;br /&gt;
End Sub&lt;br /&gt;
Public  Sub  FinalDrawPieChart()&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim APiePercent(Arr.Count) As Integer&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For  index = 0 To  Arr.Count - 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; APiePercent(index) = Convert.ToInt32(Arr.Item(index))&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Using PieGraphic = Me.CreateGraphics()&lt;/div&gt;&lt;div style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DrawPieChart(APiePercent, PieGraphic, New Point(20, 20), New Size(130, 130))&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End  Using&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End  Sub&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public  Sub  DrawPieChart(ByVal PiePercents() As Integer, ByVal PieGraphic As Graphics, ByVal  PieLocation As  Point, ByVal PieSize As Size)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim sum = 0&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For  index = 0 To  Arr.Count - 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum += PiePercents(index)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim eachper As Double&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; eachper = 0.0&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For  index = 0 To  Arr.Count - 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; eachper = CSng((PiePercents(index) * 100) / sum)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Next&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim PiePercentTotal = 0&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim percy As Integer&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; percy = 40&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For  PiePercent = 0 To  Arr.Count - 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Using brush As New SolidBrush(Color.FromArgb(rd.Next()))&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PieGraphic.FillPie(brush, New Rectangle(Location, PieSize),  CSng((PiePercentTotal * 360) / 100), CSng(((PiePercents(PiePercent)   * 100) / sum) * 360) / 100)&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PieGraphic.FillRectangle(brush, 250, percy, 20, 20)&lt;br /&gt;
&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;color: black;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PieGraphic.DrawString(Arr.Item(PiePercent), New Font(&quot;Arial&quot;, 16), New SolidBrush(Color.Black), New Point(290,  percy))&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; percy = percy + 30&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; End Using&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; PiePercentTotal += ((PiePercents(PiePercent) * 100) / sum)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; Return&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; End  Sub&lt;br /&gt;
&lt;br /&gt;
Private  Sub  Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click&lt;br /&gt;
Arr.Clear()&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Try&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Conn.Open()&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim cmd As OleDbCommand = New OleDbCommand(&quot;Select Age From Student&quot;, Conn)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dr = cmd.ExecuteReader&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; While  dr.Read()&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Arr.Add(dr.GetValue(0).ToString())&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pos += 1&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; End  While&lt;br /&gt;
Catch ex As  Exception&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; MessageBox.Show(ex.ToString())&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; Finally&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; dr.Close()&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Conn.Close()&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End  Try&lt;br /&gt;
FinalDrawPieChart()&lt;br /&gt;
&lt;br /&gt;
End  Sub&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZ324D8pHKcCMGwk_wxfmkRfv9Ji-xBUbpOTC-JmdairKyAunziP-MYuXhwVq6lg7z3zLXFpu1doPIC5ihEbGm1rRXMmRhcVrgnQzJuHrkIWcm7wZ0yeOwG6NZaSCaWK_n4blMaG8p7kKN/s1600/1893384388_Student_Age_Pie_Chart.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZ324D8pHKcCMGwk_wxfmkRfv9Ji-xBUbpOTC-JmdairKyAunziP-MYuXhwVq6lg7z3zLXFpu1doPIC5ihEbGm1rRXMmRhcVrgnQzJuHrkIWcm7wZ0yeOwG6NZaSCaWK_n4blMaG8p7kKN/s320/1893384388_Student_Age_Pie_Chart.PNG&quot; width=&quot;277&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;color: black;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://subhambasak.blogspot.com/feeds/8475891095626517431/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://subhambasak.blogspot.com/2011/06/drawing-pie-chart-in-net.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/8475891095626517431'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/8475891095626517431'/><link rel='alternate' type='text/html' href='http://subhambasak.blogspot.com/2011/06/drawing-pie-chart-in-net.html' title='Drawing a pie chart in .NET'/><author><name>Subham Basak</name><uri>http://www.blogger.com/profile/11375424304433724624</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnkz1s-xZXCXxghXyOyzhqxfKWErXXIac-DxV_8P962gD3jFzeguod0-pNs4D2sq5ztijTNjJSomKFxCn-APa8Z1AGE-ys3_lfjsvDNK839mVQrdEK9BeZv7loqj95inY/s220/16032009170445.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZ324D8pHKcCMGwk_wxfmkRfv9Ji-xBUbpOTC-JmdairKyAunziP-MYuXhwVq6lg7z3zLXFpu1doPIC5ihEbGm1rRXMmRhcVrgnQzJuHrkIWcm7wZ0yeOwG6NZaSCaWK_n4blMaG8p7kKN/s72-c/1893384388_Student_Age_Pie_Chart.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-915936226477348126.post-9036783658760309709</id><published>2011-03-19T14:30:00.001+05:30</published><updated>2011-03-19T14:30:42.821+05:30</updated><title type='text'>Happy holi</title><content type='html'>Wish you a very happy and safe holi&lt;p&gt;-- &lt;br&gt;Subham Basak&lt;br&gt;&lt;a href=&quot;http://www.subhambasak.weebly.com&quot;&gt;www.subhambasak.weebly.com&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://subhambasak.blogspot.com&quot;&gt;subhambasak.blogspot.com&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://subhambasak.blogspot.com/feeds/9036783658760309709/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://subhambasak.blogspot.com/2011/03/happy-holi.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/9036783658760309709'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/9036783658760309709'/><link rel='alternate' type='text/html' href='http://subhambasak.blogspot.com/2011/03/happy-holi.html' title='Happy holi'/><author><name>Subham Basak</name><uri>http://www.blogger.com/profile/11375424304433724624</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnkz1s-xZXCXxghXyOyzhqxfKWErXXIac-DxV_8P962gD3jFzeguod0-pNs4D2sq5ztijTNjJSomKFxCn-APa8Z1AGE-ys3_lfjsvDNK839mVQrdEK9BeZv7loqj95inY/s220/16032009170445.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-915936226477348126.post-7053876093071990113</id><published>2011-02-15T15:32:00.000+05:30</published><updated>2011-02-15T15:32:53.337+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET"/><category scheme="http://www.blogger.com/atom/ns#" term="computers"/><category scheme="http://www.blogger.com/atom/ns#" term="VB.NET"/><title type='text'>File operations in VB.NET</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;h1&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span id=&quot;ctl00_MiddleContent_txtSummary&quot; style=&quot;font-weight: normal;&quot;&gt;In this article we will learn how to delete, copy and move  files in VB.NET&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;&lt;h1&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span id=&quot;ctl00_MiddleContent_txtSummary&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;/span&gt;&lt;span style=&quot;color: black; font-weight: normal;&quot;&gt;This method shows how to delete files in a  folder.Using System.IO class Directory&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;&lt;h1&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: black; font-weight: normal;&quot;&gt;class we will check whether the folder  name in &quot;sourcePath&quot;   exists or not.If directory&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;&lt;h1&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: black; font-weight: normal;&quot;&gt; is not present in the disk then we will create it. Then we  will check   any files are present&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;&lt;h1&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: black; font-weight: normal;&quot;&gt; in that folder.If present then we loop through&amp;nbsp;all files one by one and delete&amp;nbsp;those  file&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;&lt;h1&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: black; font-weight: normal;&quot;&gt;using&amp;nbsp;File.Delete   method.&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span id=&quot;ctl00_MiddleContent_txtSummary&quot; style=&quot;font-weight: normal;&quot;&gt;&lt;/span&gt;&lt;span id=&quot;ctl00_MiddleContent_txtSummary&quot; style=&quot;font-weight: normal;&quot;&gt; &lt;/span&gt;&lt;/span&gt; &lt;/h1&gt;&lt;h1 style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Public Sub DeleteFilesFromFolders(ByVal sourcePath As String)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If (Directory.Exists(DirPath)) Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For Each fName As String In Directory.GetFiles(DirPath)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If File.Exists(fName) Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; File.Delete(fName)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub&lt;/span&gt;&lt;/h1&gt;&lt;h1 style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/h1&gt;&lt;h1 style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;This method shows how to&amp;nbsp;move files&amp;nbsp;from one  folder to another folder.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&amp;nbsp; Public Sub MoveFiles(ByVal sourcePath As String, ByVal  DestinationPath As String)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If (Directory.Exists(sourcePath)) Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For Each fName As String In Directory.GetFiles(sourcePath)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If File.Exists(fName) Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim dFile As String = String.Empty&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dFile = Path.GetFileName(fName)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim dFilePath As String = String.Empty&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dFilePath = DestinationPath + dFile&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; File.Move(fName, dFilePath)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub&lt;br /&gt;
&lt;span style=&quot;color: blue;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;&lt;h1 style=&quot;font-weight: normal;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;This method shows how to copy files from  one folder to&amp;nbsp;another folder.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Public Sub CopyFiles(ByVal sourcePath As String, ByVal  DestinationPath As String)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If (Directory.Exists(sourcePath)) Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For Each fName As String In Directory.GetFiles(sourcePath)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If File.Exists(fName) Then&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim dFile As String = String.Empty&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dFile = Path.GetFileName(fName)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim dFilePath As String = String.Empty&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dFilePath = DestinationPath + dFile&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; File.Copy(fName, dFilePath, True)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; End Sub&lt;/span&gt;  &lt;span style=&quot;font-size: small;&quot;&gt; &lt;/span&gt;&lt;/h1&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://subhambasak.blogspot.com/feeds/7053876093071990113/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://subhambasak.blogspot.com/2011/02/file-operations-in-vbnet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/7053876093071990113'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/7053876093071990113'/><link rel='alternate' type='text/html' href='http://subhambasak.blogspot.com/2011/02/file-operations-in-vbnet.html' title='File operations in VB.NET'/><author><name>Subham Basak</name><uri>http://www.blogger.com/profile/11375424304433724624</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnkz1s-xZXCXxghXyOyzhqxfKWErXXIac-DxV_8P962gD3jFzeguod0-pNs4D2sq5ztijTNjJSomKFxCn-APa8Z1AGE-ys3_lfjsvDNK839mVQrdEK9BeZv7loqj95inY/s220/16032009170445.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-915936226477348126.post-7219762052666254265</id><published>2011-02-15T15:23:00.000+05:30</published><updated>2011-02-15T15:23:41.190+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET"/><category scheme="http://www.blogger.com/atom/ns#" term="computers"/><title type='text'>Adding data to an existing file using VB.NET</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;In this article we will learn how to append data to an existing file.&lt;br /&gt;
&lt;br /&gt;
Here I am using FileStream object to write contents to a file.&lt;br /&gt;
First a FileSteam and File object is created. Using file object we will compare wether file is exists are not.&lt;br /&gt;
&lt;br /&gt;
If file exits in the disk then we will truncate it otherwise we will create new file and allow that file for read and write using file steam object.&lt;br /&gt;
&lt;br /&gt;
If file already exists then we will open that file in append mode.&lt;br /&gt;
Then we will point the stream reader to last line using streamwriter.&lt;br /&gt;
Example : sw.BaseStream.Seek(0, SeekOrigin.End)&lt;br /&gt;
&lt;br /&gt;
If file does&#39;t exists then we will create new file and open that file in create mode.Then we will point the stream reader to first line using streamwriter.&lt;br /&gt;
Example: sw.BaseStream.Seek(0, SeekOrigin.Begin)&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;color: black;&quot;&gt;&lt;u&gt;The code follows :&lt;/u&gt;&lt;/div&gt;&lt;br /&gt;
Public  Sub ExportToFile(ByVal oFileName As String, ByVal myContent As String)&lt;br /&gt;
&lt;br /&gt;
Dim file As FileStream&lt;br /&gt;
Dim f As IO.File&lt;br /&gt;
&lt;br /&gt;
If (f.Exists(oFileName)) Then&lt;br /&gt;
file = New FileStream(FileToWrite, FileMode.Append, FileAccess.Write)&lt;br /&gt;
Else&lt;br /&gt;
file = New FileStream(FileToWrite, FileMode.Create, FileAccess.ReadWrite)&lt;br /&gt;
End If&lt;br /&gt;
&lt;br /&gt;
Dim sw As New StreamWriter(file, System.Text.Encoding.Default)&lt;br /&gt;
If (f.Exists(oFileName)) Then&lt;br /&gt;
sw.BaseStream.Seek(0, SeekOrigin.End)&lt;br /&gt;
Else&lt;br /&gt;
sw.BaseStream.Seek(0, SeekOrigin.Begin)&lt;br /&gt;
End If&lt;br /&gt;
&lt;br /&gt;
sw.Write(myContent)&lt;br /&gt;
&lt;br /&gt;
sw.Close()&lt;br /&gt;
&lt;br /&gt;
End Sub&lt;br /&gt;
&lt;br /&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://subhambasak.blogspot.com/feeds/7219762052666254265/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://subhambasak.blogspot.com/2011/02/adding-data-to-existing-file-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/7219762052666254265'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/7219762052666254265'/><link rel='alternate' type='text/html' href='http://subhambasak.blogspot.com/2011/02/adding-data-to-existing-file-using.html' title='Adding data to an existing file using VB.NET'/><author><name>Subham Basak</name><uri>http://www.blogger.com/profile/11375424304433724624</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnkz1s-xZXCXxghXyOyzhqxfKWErXXIac-DxV_8P962gD3jFzeguod0-pNs4D2sq5ztijTNjJSomKFxCn-APa8Z1AGE-ys3_lfjsvDNK839mVQrdEK9BeZv7loqj95inY/s220/16032009170445.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-915936226477348126.post-7686773836970732127</id><published>2011-01-25T10:51:00.004+05:30</published><updated>2011-01-25T16:01:43.042+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="computers"/><category scheme="http://www.blogger.com/atom/ns#" term="gtalk"/><title type='text'>Creating Google Talk Themes</title><content type='html'>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4q66N9dLc0uNdRuaVfxHELMdr0pbrhKsVf2lJTw6AUhBgFxQNRLOYsJ4UzWIQL1M4gkG1oSkFun0tqZIyUwOiLhb136e6QAKV3TMyoiQku3i3qoiFXnzkMHq9H_d97cPmyiK7n4OzXMHO/s1600/gtalk.jpg&quot;&gt;&lt;img style=&quot;display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 320px; height: 182px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4q66N9dLc0uNdRuaVfxHELMdr0pbrhKsVf2lJTw6AUhBgFxQNRLOYsJ4UzWIQL1M4gkG1oSkFun0tqZIyUwOiLhb136e6QAKV3TMyoiQku3i3qoiFXnzkMHq9H_d97cPmyiK7n4OzXMHO/s320/gtalk.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5565999230388234274&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;br /&gt;Google&#39;s gtalk offer you with various self defined themes like classic, bubble ,&lt;br /&gt;bubble picture , orkut etc. To create your own personalised theme follow the&lt;br /&gt;following steps :-&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Copy and paste the following address in your &lt;strong&gt;My Computer  Address bar&lt;/strong&gt;.&lt;br /&gt;&lt;pre style=&quot;border: 1px inset; overflow: auto; height: 34px; margin: 0pt; padding: 6px;&quot;&gt;%userprofile%\Local Settings\Application Data\Google\Google Talk\themes\system\chat&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;&lt;strong&gt;&lt;/strong&gt;&lt;strong&gt;&lt;/strong&gt;Copy the classical picture theme and move back to the themes directory.&lt;/li&gt;&lt;li&gt;Navigate to user directory.&lt;/li&gt;&lt;li&gt;Create a folder named &quot;chat&quot; in it.&lt;/li&gt;&lt;li&gt;Paste the classical picture folder in the chat folder.&lt;/li&gt;&lt;li&gt;Rename the folder to any other name. eg. MyTheme.&lt;/li&gt;&lt;li&gt;In the mytheme folder navigate to contents-&gt;resources.&lt;/li&gt;&lt;li&gt;Create a folder named images.&lt;/li&gt;&lt;li&gt;Paste the picture in the folder which you want to make your back ground.&lt;/li&gt;&lt;li&gt;Rename the picture to &quot;background.jpg&quot;.&lt;/li&gt;&lt;li&gt;Resize the image to 300x225 pixels.&lt;/li&gt;&lt;li&gt;The code would look like this&lt;br /&gt;&lt;pre style=&quot;border: 1px inset; overflow: auto; height: 418px; margin: 0pt; padding: 6px;&quot;&gt;BODY { color: #000000; background-color: #FFFFFF; }&lt;br /&gt;&lt;br /&gt;BODY a:link { color: #0000FF; }&lt;br /&gt;&lt;br /&gt;BODY a:hover { color: #0000FF; }&lt;br /&gt;&lt;br /&gt;BODY a:active { color: #0000FF; }&lt;br /&gt;&lt;br /&gt;BODY a:visited { color: #800080; }BODY {&lt;br /&gt;&lt;br /&gt;margin: 6px;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;DIV#content {&lt;br /&gt;&lt;br /&gt;font: 12px Arial;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;DIV#insert {&lt;br /&gt;&lt;br /&gt;display: none;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;DIV.system1st {&lt;br /&gt;&lt;br /&gt;margin: 4px 0px 4px 0px;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;DIV.systemNth {&lt;br /&gt;&lt;br /&gt;margin: 4px 0px 4px 0px;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/* Two ways to do icons with these rules:&lt;br /&gt;&lt;br /&gt;Some code here&lt;br /&gt;&lt;br /&gt;*/&lt;br /&gt;&lt;br /&gt;DIV.chat .icon {&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;DIV.chat DIV.msg {&lt;br /&gt;&lt;br /&gt;margin: 0px 0px 0px 0px;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;DIV.chat DIV.Nth {&lt;br /&gt;&lt;br /&gt;margin: 5px 0px 0px 0px;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;DIV.chat SPAN.salutation {&lt;br /&gt;&lt;br /&gt;font-weight: bold;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;DIV.out {&lt;br /&gt;&lt;br /&gt;text-align: left;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;DIV.out .icon {&lt;br /&gt;&lt;br /&gt;float: left;&lt;br /&gt;&lt;br /&gt;margin: 2px 5px 0px 0px;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;DIV.in {&lt;br /&gt;&lt;br /&gt;text-align: left;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;DIV.in .icon {&lt;br /&gt;&lt;br /&gt;float: left;&lt;br /&gt;&lt;br /&gt;margin: 2px 5px 0px 0px;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;DIV.clear {&lt;br /&gt;&lt;br /&gt;clear: both;&lt;br /&gt;&lt;br /&gt;height: 1px;&lt;br /&gt;&lt;br /&gt;overflow: hidden;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;DIV.break {&lt;br /&gt;&lt;br /&gt;height: 1px;&lt;br /&gt;&lt;br /&gt;margin: 3px 0px 4px 0px;&lt;br /&gt;&lt;br /&gt;overflow: hidden;&lt;br /&gt;&lt;br /&gt;}&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;Add the background url to the body class&lt;br /&gt;&lt;pre style=&quot;border: 1px inset; overflow: auto; height: 98px; margin: 0pt; padding: 6px;&quot;&gt;BODY&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;&lt;br /&gt;margin: 6px;&lt;br /&gt;&lt;br /&gt;background-image: url(&quot;images/background.jpg&quot;);&lt;br /&gt;&lt;br /&gt;}&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;You can also change the alignment and the fronts according to your wish.&lt;/li&gt;&lt;li&gt;To apply the theme close all chat windows.&lt;/li&gt;&lt;li&gt;Goto settings in gtalk-&gt;appearance-&gt;chat theme.&lt;/li&gt;&lt;li&gt;Select mytheme.&lt;/li&gt;&lt;li&gt;Then open the chat window to see the effect.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;</content><link rel='replies' type='application/atom+xml' href='http://subhambasak.blogspot.com/feeds/7686773836970732127/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://subhambasak.blogspot.com/2011/01/creating-google-talk-themes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/7686773836970732127'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/7686773836970732127'/><link rel='alternate' type='text/html' href='http://subhambasak.blogspot.com/2011/01/creating-google-talk-themes.html' title='Creating Google Talk Themes'/><author><name>Subham Basak</name><uri>http://www.blogger.com/profile/11375424304433724624</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnkz1s-xZXCXxghXyOyzhqxfKWErXXIac-DxV_8P962gD3jFzeguod0-pNs4D2sq5ztijTNjJSomKFxCn-APa8Z1AGE-ys3_lfjsvDNK839mVQrdEK9BeZv7loqj95inY/s220/16032009170445.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4q66N9dLc0uNdRuaVfxHELMdr0pbrhKsVf2lJTw6AUhBgFxQNRLOYsJ4UzWIQL1M4gkG1oSkFun0tqZIyUwOiLhb136e6QAKV3TMyoiQku3i3qoiFXnzkMHq9H_d97cPmyiK7n4OzXMHO/s72-c/gtalk.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-915936226477348126.post-4176032565346050789</id><published>2011-01-08T17:26:00.002+05:30</published><updated>2011-01-08T17:39:32.735+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET"/><category scheme="http://www.blogger.com/atom/ns#" term="computers"/><title type='text'>Access specifier in VB.NET</title><content type='html'>&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;Welcome readers......Wish you all a Happy New Year&lt;br /&gt;So coming back to .NET, today I would discuss about the different access specifier&lt;br /&gt;in VB.NET.&lt;/span&gt;&lt;br /&gt;&lt;p class=&quot;MsoNormal&quot; style=&quot;line-height: normal;&quot;&gt;&lt;span style=&quot;font-family:Verdana;font-size:100%;&quot;&gt;Access specifiers describe the accessibility scope of a  variable, method or a class. By  using access specifiers we can control the scope of the member object of  a  class. Access specifiers were used  for providing security of our  applications.  In Visual Basic .Net there are five access specifiers and they are as  follows:&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style=&quot;font-family:Verdana;font-size:100%;&quot;&gt;&lt;b&gt;Public: &lt;/b&gt;It have no restriction  on accessibility. We can use the public  members from any were inside the class or outside the class.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Private: &lt;/b&gt;Their accessibility scope is limited to only inside the  class in  which they are declared. We can&#39;t access the Private members from  outside the  class and it is the least permissive access level.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Protected: &lt;/b&gt;The protected members have scope of accessibility  within the  class and classes derived(Inherited) from that class.&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;Friend: &lt;/b&gt;Friend members have the accessibility scope from the same   assembly and program that contain their declarations. &lt;b&gt;&lt;br /&gt;&lt;br /&gt;Protected Friend: &lt;/b&gt;It behave like both protected and friend access  specifiers.  We can access the protected friend member from anywhere in same assembly  and the  classes inherited from the same class.&lt;/span&gt;&lt;/p&gt; &lt;span style=&quot;font-size:100%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;font-size:100%;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://subhambasak.blogspot.com/feeds/4176032565346050789/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://subhambasak.blogspot.com/2011/01/access-specifier-in-vbnet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/4176032565346050789'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/4176032565346050789'/><link rel='alternate' type='text/html' href='http://subhambasak.blogspot.com/2011/01/access-specifier-in-vbnet.html' title='Access specifier in VB.NET'/><author><name>Subham Basak</name><uri>http://www.blogger.com/profile/11375424304433724624</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnkz1s-xZXCXxghXyOyzhqxfKWErXXIac-DxV_8P962gD3jFzeguod0-pNs4D2sq5ztijTNjJSomKFxCn-APa8Z1AGE-ys3_lfjsvDNK839mVQrdEK9BeZv7loqj95inY/s220/16032009170445.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-915936226477348126.post-6787914617017697300</id><published>2010-12-28T09:35:00.003+05:30</published><updated>2010-12-28T10:02:59.512+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET"/><category scheme="http://www.blogger.com/atom/ns#" term="computers"/><title type='text'>Difference between VB.NET and C#.NET</title><content type='html'>Its a subjective matter which language is best. Some like VB.NET’s&lt;br /&gt;natural style and some like professional and terse C# syntaxes. Both&lt;br /&gt;use the same framework and speed is also very much equivalents. But&lt;br /&gt;still let’s list down some major differences between them :-&lt;br /&gt;&lt;br /&gt;Advantages VB.NET :-&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Has support for optional parameters which makes COM interoperability                             much easy.&lt;/li&gt;&lt;li&gt;With Option Strict off late binding is supported.Legacy VB functionalities                                can be used by using Microsoft.VisualBasic namespace.&lt;/li&gt;&lt;li&gt;Has the WITH construct which is not in C#.&lt;/li&gt;&lt;li&gt;The VB.NET part of Visual Studio .NET compiles your code in                                               the background. While this is considered an advantage for small                                                 projects, people creating very                 large projects have found that the                                              IDE slows down considerably as the project                    gets larger.&lt;/li&gt;&lt;/ul&gt;Advantages of C# :-&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;XML documentation is generated from source code but this is now been                 incorporated in Whidbey&lt;/li&gt;&lt;li&gt;Operator overloading which is not in current VB.NET but is been                                 introduced in Whidbey.&lt;/li&gt;&lt;li&gt;Use of this statement makes unmanaged resource disposal simple.&lt;/li&gt;&lt;li&gt;Access to Unsafe code. This allows pointer arithmetic etc, and can                                    improve performance in some situations. However, it is not to be                                       used lightly, as a lot of the normal safety of C# is lost (as the name implies).                      This is the major difference that you can access unmanaged code in C# and                         not in VB.NET.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://subhambasak.blogspot.com/feeds/6787914617017697300/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://subhambasak.blogspot.com/2010/12/difference-between-vbnet-and-cnet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/6787914617017697300'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/6787914617017697300'/><link rel='alternate' type='text/html' href='http://subhambasak.blogspot.com/2010/12/difference-between-vbnet-and-cnet.html' title='Difference between VB.NET and C#.NET'/><author><name>Subham Basak</name><uri>http://www.blogger.com/profile/11375424304433724624</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnkz1s-xZXCXxghXyOyzhqxfKWErXXIac-DxV_8P962gD3jFzeguod0-pNs4D2sq5ztijTNjJSomKFxCn-APa8Z1AGE-ys3_lfjsvDNK839mVQrdEK9BeZv7loqj95inY/s220/16032009170445.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-915936226477348126.post-4876103170554431210</id><published>2010-12-27T20:20:00.003+05:30</published><updated>2010-12-27T20:34:07.158+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET"/><category scheme="http://www.blogger.com/atom/ns#" term="computers"/><title type='text'>Common Language Runtime ( CLR )</title><content type='html'>Full form of CLR is Common Language Runtime and it forms the heart of the .                          NET framework. All Languages have runtime and its the responsibility of the                          runtime to take care of the code execution of the program. For example Java                               has Java Virtual Machine etc. Similarly .NET has CLR. Following are the                            responsibilities of CLR :&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Garbage Collection&lt;/span&gt; :- CLR automatically manages memory allocation                              thus eliminating memory leaks. When objects are not referred Garbage                              Collector automatically releases those memories thus providing efficient                    memory management.&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Code Access Security&lt;/span&gt; :- CAS grants rights to program depending on                              the security configuration of the machine. Example the program has rights                           to edit or create a new file but the security configuration of machine does not                      allow the program to delete a file. CAS will take care that the code runs under                    the environment of machines security configuration.&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Code Verification&lt;/span&gt; :- This ensures proper code execution and type safety                   while the code runs. It prevents the source code to perform illegal operation                    such as accessing invalid memory locations etc.&lt;/li&gt;&lt;li&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;IL( Intermediate language )-to-native translators and optimizer’s &lt;/span&gt;:-            CLR uses JIT(Just In Time) and compiles the IL code to machine code and then        executes. CLR also determines depending on platform what is optimized way of         running the IL code.&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://subhambasak.blogspot.com/feeds/4876103170554431210/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://subhambasak.blogspot.com/2010/12/common-language-runtime-clr.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/4876103170554431210'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/4876103170554431210'/><link rel='alternate' type='text/html' href='http://subhambasak.blogspot.com/2010/12/common-language-runtime-clr.html' title='Common Language Runtime ( CLR )'/><author><name>Subham Basak</name><uri>http://www.blogger.com/profile/11375424304433724624</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnkz1s-xZXCXxghXyOyzhqxfKWErXXIac-DxV_8P962gD3jFzeguod0-pNs4D2sq5ztijTNjJSomKFxCn-APa8Z1AGE-ys3_lfjsvDNK839mVQrdEK9BeZv7loqj95inY/s220/16032009170445.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-915936226477348126.post-1394594077475726498</id><published>2010-11-21T12:13:00.003+05:30</published><updated>2010-11-21T12:28:54.353+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Hardware"/><category scheme="http://www.blogger.com/atom/ns#" term="Mobiles"/><title type='text'>Testing Samsung SGH-L700</title><content type='html'>&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;Hi,&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;    I am a samsung l700 user and would like to share this with others who also admire the beauty and functionality of this sleek bar phone.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;    This is a guide to teach you all how to test your samsung l700 (most of the new samsung multimedia phones also support this) :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;li&gt;First type &lt;span style=&quot;font-weight: bold;&quot;&gt;*#0*#&lt;/span&gt; on your dialing screen.You will find the following options -&lt;/li&gt;&lt;/ul&gt;&lt;ol style=&quot;color: rgb(0, 0, 0);&quot;&gt;&lt;li&gt;Red Lcd&lt;/li&gt;&lt;li&gt;Green Lcd&lt;/li&gt;&lt;li&gt;Blue Lcd&lt;/li&gt;&lt;li&gt;Melody test  (white lcd and melody test in some phones)&lt;/li&gt;&lt;li&gt;Vibration test (black lcd and vibration test in some phones)&lt;/li&gt;&lt;li&gt;Dimming test&lt;/li&gt;&lt;li&gt;Mega cam test&lt;/li&gt;&lt;li&gt;VGA cam test&lt;/li&gt;&lt;li&gt;Lcd on/off&lt;a href=&quot;post-create.g?blogID=915936226477348126#&quot; id=&quot;show-labels-link&quot; onclick=&quot;BLOG_showLabels(); return false&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Sleep mode&lt;/li&gt;&lt;li&gt;Speaker test(left speaker and right speaker test in some phones)&lt;/li&gt;&lt;/ol&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;Select the respective test and find out whether your phone is working fine.If you find some problem then rush to your nearest samsung service center.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://subhambasak.blogspot.com/feeds/1394594077475726498/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://subhambasak.blogspot.com/2010/11/testing-samsung-sgh-l700.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/1394594077475726498'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/1394594077475726498'/><link rel='alternate' type='text/html' href='http://subhambasak.blogspot.com/2010/11/testing-samsung-sgh-l700.html' title='Testing Samsung SGH-L700'/><author><name>Subham Basak</name><uri>http://www.blogger.com/profile/11375424304433724624</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnkz1s-xZXCXxghXyOyzhqxfKWErXXIac-DxV_8P962gD3jFzeguod0-pNs4D2sq5ztijTNjJSomKFxCn-APa8Z1AGE-ys3_lfjsvDNK839mVQrdEK9BeZv7loqj95inY/s220/16032009170445.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-915936226477348126.post-6007980986262598960</id><published>2010-11-20T20:05:00.003+05:30</published><updated>2010-11-20T20:32:25.786+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term=".NET"/><category scheme="http://www.blogger.com/atom/ns#" term="computers"/><title type='text'>.NET Framework 4 Unleashed</title><content type='html'>&lt;span style=&quot;font-weight: bold; color: rgb(0, 0, 0);&quot;&gt;Compatibility :&lt;/span&gt;&lt;br /&gt;                         .Net 4 is highly compatible with applications that are built with earlier .NET  Framework versions, except for some changes that were made to improve  security, standards compliance, correctness, reliability, and  performance.The .NET Framework 4 does not automatically use its version of the  common language runtime to run applications that are built with earlier  versions of the .NET Framework. To run older applications with .NET  Framework 4, you must compile your application with the target .NET  Framework version specified in the properties for your project in Visual  Studio&lt;br /&gt;                     .Net 4 also supports much more language in its client profile than its earlier versions.&lt;br /&gt;                      Moreover it supports in process side by side execution which enables it to compile and run a project using components based on .net 4 as well as add ins based on earlier versions.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold; color: rgb(0, 0, 0);&quot;&gt;Performance monitoring :&lt;/span&gt;&lt;br /&gt;                      Using Earlier versions of the .NET Framework it was not possible to determine whether the application was affecting other applications or not.But .net 4 enables us to get processor usage and memory usage estimates per application domain.We can monitor CPU and memory usage of individual application domains.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold; color: rgb(0, 0, 0);&quot;&gt;Garbage Collection :&lt;/span&gt;&lt;br /&gt;                       The .NET Framework 4 provides background garbage collection. This  feature replaces concurrent garbage collection in previous versions and  provides better performance and memory utilization.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold; color: rgb(0, 0, 0);&quot;&gt;Other new features :&lt;/span&gt;&lt;br /&gt;&lt;ol&gt;&lt;li&gt;  It support big integers(system.numerics.biginteger) which supports all the standard integer operations, including bit  manipulation.&lt;/li&gt;&lt;li&gt;it support complex numbers(system.numerics.complex) which supports arithmetic and trigonometric operations with complex numbers.&lt;/li&gt;&lt;li&gt;It supports the feature of identifying a 64-bit operating system and a 64-bit process.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And there are lots more features packed into .NET 4 framework which makes a programmers friendly heaven.</content><link rel='replies' type='application/atom+xml' href='http://subhambasak.blogspot.com/feeds/6007980986262598960/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://subhambasak.blogspot.com/2010/11/net-framework-4-unleashed.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/6007980986262598960'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/6007980986262598960'/><link rel='alternate' type='text/html' href='http://subhambasak.blogspot.com/2010/11/net-framework-4-unleashed.html' title='.NET Framework 4 Unleashed'/><author><name>Subham Basak</name><uri>http://www.blogger.com/profile/11375424304433724624</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnkz1s-xZXCXxghXyOyzhqxfKWErXXIac-DxV_8P962gD3jFzeguod0-pNs4D2sq5ztijTNjJSomKFxCn-APa8Z1AGE-ys3_lfjsvDNK839mVQrdEK9BeZv7loqj95inY/s220/16032009170445.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-915936226477348126.post-4973623560879191882</id><published>2010-07-30T20:31:00.004+05:30</published><updated>2010-07-30T20:51:18.506+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET"/><category scheme="http://www.blogger.com/atom/ns#" term="computers"/><title type='text'>Fetching image from database in ASP.NET</title><content type='html'>In asp database the images are stored in form of binary array.So it is never easy to fetch the image and display it in a image control.For doing so we take a round about method where we print the image in a page and ten we direct the image url in the image control to that page.&lt;br /&gt;&lt;br /&gt;Next we would follow the steps to do that :&lt;br /&gt;&lt;br /&gt;Now we shall add a page named image.aspx and in the image.aspx.vb we shall write the code given below&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;Partial Class image&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;Inherits System.Web.UI.Page&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;Dim s As String = Request.QueryString(&quot;val&quot;)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;Try&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;  con.Open()&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;   com.CommandText = &quot;select * from items where pid =&#39;&quot; &amp;amp; s &amp;amp; &quot;&#39;&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;   com.Connection = con&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;   dr = com.ExecuteReader&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;   dr.Read()&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;  Dim bytImage As Byte() = New Byte() {}&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;bytImage = dr.Item(7)&lt;/span&gt;&lt;br /&gt;     &lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;Response.ContentType = &quot;image/jpeg&quot;&lt;/span&gt; &lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;&lt;br /&gt;   Response.Expires = 0&lt;/span&gt; &lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;&lt;br /&gt;   Response.Buffer = True&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;Response.Clear()&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;   Response.BinaryWrite(bytImage)&lt;/span&gt; &lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;&lt;br /&gt;   Response.End()&lt;/span&gt;  &lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;&lt;br /&gt;Catch ex As Exception&lt;/span&gt; &lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;&lt;br /&gt;    MsgBox(ex.Message)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;Finally&lt;/span&gt;&lt;br /&gt;   &lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;con.Close()&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;  com.Cancel()&lt;/span&gt; &lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;&lt;br /&gt;   dr.Close()&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;End Try&lt;/span&gt;   &lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;&lt;br /&gt;End Sub&lt;/span&gt;&lt;br /&gt; &lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;End Class&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In this page we will get the image from the database an a binary form and will binarywrite the image in this page.We shall get the pid from the querystring which we shall pass from the page where the image control is. In that page we will direct the image url as below :&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;Image1.ImageUrl = &quot;~/image1.aspx?vall=&quot; &amp;amp; DropDownList1.SelectedValue&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;where dropdownlist1.selected value returns a element of the pid coloum in the items table&lt;br /&gt;I have already shown how to connect the database using the module in my earlier blog</content><link rel='replies' type='application/atom+xml' href='http://subhambasak.blogspot.com/feeds/4973623560879191882/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://subhambasak.blogspot.com/2010/07/fetching-image-from-database-in-aspnet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/4973623560879191882'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/4973623560879191882'/><link rel='alternate' type='text/html' href='http://subhambasak.blogspot.com/2010/07/fetching-image-from-database-in-aspnet.html' title='Fetching image from database in ASP.NET'/><author><name>Subham Basak</name><uri>http://www.blogger.com/profile/11375424304433724624</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnkz1s-xZXCXxghXyOyzhqxfKWErXXIac-DxV_8P962gD3jFzeguod0-pNs4D2sq5ztijTNjJSomKFxCn-APa8Z1AGE-ys3_lfjsvDNK839mVQrdEK9BeZv7loqj95inY/s220/16032009170445.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-915936226477348126.post-8454140018949780647</id><published>2010-07-21T17:21:00.004+05:30</published><updated>2010-07-30T20:31:03.886+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET"/><category scheme="http://www.blogger.com/atom/ns#" term="computers"/><title type='text'>Adding image to database in ASP.NET</title><content type='html'>First we have taken a sql database table (items) with a image type field in it.Next we have to create a connection using a module..&lt;br /&gt;&lt;br /&gt;The module should look like this&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;Imports Microsoft.VisualBasic&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;Imports System.Data&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;Imports System.Data.SqlClient&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;Public Module connection&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;    Public con As New SqlConnection(&quot;Data Source=.\SQLEXPRESS;_AttachDbFilename=&#39;J:\shopping\App_Data\Database.mdf&#39;;Integrated_ Security=True;User Instance=True&quot;)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;    Public com As New SqlCommand&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;    Public dr As SqlDataReader&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;End Module&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now to add the image follow the following steps :&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;Try&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;            Dim imgByte As Byte() = Nothing&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;   If FileUpload1.PostedFile IsNot Nothing AndAlso FileUpload1.PostedFile.FileName &lt;&gt; &quot;&quot; Then&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;                Dim File As HttpPostedFile = FileUpload1.PostedFile&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;                imgByte = New Byte(File.ContentLength - 1) {}&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;                File.InputStream.Read(imgByte, 0, File.ContentLength)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;      End If&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;            Dim b As Boolean&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;            con.Open()&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;            com.CommandText = &quot;insert into items values(&#39;&quot; &amp;amp; TextBox1.Text &amp;amp; &quot;&#39;,&#39;&quot; &amp;amp; TextBox2.Text &amp;amp; &quot;&#39;,&#39;&quot; &amp;amp; TextBox7.Text &amp;amp; &quot;&#39;,&#39;&quot; &amp;amp; TextBox3.Text &amp;amp; &quot;&#39;,&#39;&quot; &amp;amp; TextBox4.Text &amp;amp; &quot;&#39;,&#39;&quot; &amp;amp; TextBox5.Text &amp;amp; &quot;&#39;,&#39;&quot; &amp;amp; TextBox6.Text &amp;amp; &quot;&#39;,@eimg)&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;            com.Parameters.AddWithValue(&quot;@eimg&quot;, imgByte)&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;            com.Connection = con&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;            com.ExecuteNonQuery()&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;            &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;            MsgBox(&quot;inserted&quot;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;        Catch ex As Exception&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;            MsgBox(ex.Message)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;        Finally&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;            con.Close()&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;           com.Cancel()&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;           com.Parameters.Clear()&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;            dr.Close()&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(255, 0, 0);&quot;&gt;        End Try&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;First we shall upload the file using a fileupload control then we shall convert it into a byte stream and would store it into a byte array.Next we would store this byte array into the items database using parametarised query.Hence the image gets stored into the image field</content><link rel='replies' type='application/atom+xml' href='http://subhambasak.blogspot.com/feeds/8454140018949780647/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://subhambasak.blogspot.com/2010/07/adding-image-to-database-in-aspnet.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/8454140018949780647'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/8454140018949780647'/><link rel='alternate' type='text/html' href='http://subhambasak.blogspot.com/2010/07/adding-image-to-database-in-aspnet.html' title='Adding image to database in ASP.NET'/><author><name>Subham Basak</name><uri>http://www.blogger.com/profile/11375424304433724624</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnkz1s-xZXCXxghXyOyzhqxfKWErXXIac-DxV_8P962gD3jFzeguod0-pNs4D2sq5ztijTNjJSomKFxCn-APa8Z1AGE-ys3_lfjsvDNK839mVQrdEK9BeZv7loqj95inY/s220/16032009170445.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-915936226477348126.post-8828373268585272668</id><published>2010-07-08T15:53:00.002+05:30</published><updated>2010-07-08T16:05:49.357+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="computers"/><category scheme="http://www.blogger.com/atom/ns#" term="JAVA.proggramming language"/><title type='text'>JAVA Threads</title><content type='html'>Multithreading refers to two or more tasks executing concurrently within  a single program. A thread is an independent path of execution within a  program. Many threads can run concurrently within a program. Every  thread in Java is created and controlled by the &lt;strong&gt;java.lang.Thread  class&lt;/strong&gt;. A Java program can have many threads, and these threads  can run concurrently, either asynchronously or                           synchronously.&lt;br /&gt;&lt;p class=&quot;style5&quot;&gt;Multithreading has several advantages over  Multiprocessing such as;&lt;/p&gt; &lt;ul&gt;&lt;li&gt; Threads are lightweight compared to processes&lt;/li&gt;&lt;li&gt; Threads share the same address space and therefore can share both  data and code&lt;/li&gt;&lt;li&gt; Context switching between threads is usually less expensive than  between processes&lt;/li&gt;&lt;li&gt; Cost of thread intercommunication is relatively low that that of  process intercommunication&lt;/li&gt;&lt;li&gt; Threads allow different tasks to be performed concurrently.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;h2&gt;Thread Creation&lt;/h2&gt; &lt;p class=&quot;style11&quot;&gt;There are two ways to create thread in java;&lt;/p&gt; &lt;ul&gt;&lt;li&gt; Implement the Runnable interface (java.lang.Runnable)&lt;/li&gt;&lt;li&gt; By Extending the Thread class  (java.lang.Thread)&lt;span class=&quot;style1&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style=&quot;font-size:180%;&quot;&gt;&lt;span class=&quot;style1&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Implementing the Runnable Interface&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;public interface Runnable {&lt;/p&gt; &lt;p&gt;void run();&lt;/p&gt; &lt;p&gt;}&lt;/p&gt; &lt;p&gt;One way to create a thread in java is to implement the Runnable  Interface and then instantiate an object of the class. We need to  override the run() method into our class which is the only method that  needs to be implemented. The run() method contains the logic of the  thread.&lt;/p&gt; &lt;p class=&quot;style11&quot;&gt;&lt;strong&gt;The procedure for creating threads based on  the Runnable interface is as follows:&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;1. A class implements the Runnable interface, providing the run()  method that will be executed by the thread. An object of this class is a  Runnable object.&lt;/p&gt; &lt;p&gt;2. An object of Thread class is created by passing a Runnable object  as argument to the Thread constructor. The Thread object now has a  Runnable object that implements the run() method.&lt;/p&gt; &lt;p&gt;3. The start() method is invoked on the Thread object created in the  previous step. The start() method returns immediately after a thread has  been spawned.&lt;/p&gt; 4.     The thread ends when the run() method ends, either by normal  completion or by throwing an uncaught exception&lt;br /&gt;&lt;br /&gt;&lt;h2&gt;Extending Thread Class&lt;/h2&gt; &lt;p class=&quot;style11&quot;&gt;The procedure for creating threads based on extending  the Thread is as follows:&lt;/p&gt; &lt;p&gt;1. A class extending the Thread class overrides the run() method from  the Thread class to define the code executed by the thread.&lt;/p&gt; &lt;p&gt;2. This subclass may call a Thread constructor explicitly in its  constructors to initialize the thread, using the super() call.&lt;/p&gt; &lt;p&gt;3. The start() method inherited from the Thread class is invoked on  the object of the class to make the thread eligible for running.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;When creating threads, there are two reasons why implementing the  Runnable interface may be preferable to extending the Thread class:&lt;/p&gt; &lt;ul&gt;&lt;li&gt; Extending the Thread class means that the subclass cannot extend  any other class, whereas a class implementing the Runnable interface&lt;br /&gt;has this option.&lt;/li&gt;&lt;li&gt; A class might only be interested in being runnable, and therefore,  inheriting the full overhead of the Thread class would be excessive.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span class=&quot;style1&quot;&gt;&lt;br /&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://subhambasak.blogspot.com/feeds/8828373268585272668/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://subhambasak.blogspot.com/2010/07/java-threads.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/8828373268585272668'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/8828373268585272668'/><link rel='alternate' type='text/html' href='http://subhambasak.blogspot.com/2010/07/java-threads.html' title='JAVA Threads'/><author><name>Subham Basak</name><uri>http://www.blogger.com/profile/11375424304433724624</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnkz1s-xZXCXxghXyOyzhqxfKWErXXIac-DxV_8P962gD3jFzeguod0-pNs4D2sq5ztijTNjJSomKFxCn-APa8Z1AGE-ys3_lfjsvDNK839mVQrdEK9BeZv7loqj95inY/s220/16032009170445.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-915936226477348126.post-551514343266543936</id><published>2010-06-30T12:23:00.003+05:30</published><updated>2010-06-30T12:32:10.823+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Networking"/><title type='text'>ISO OSI Model</title><content type='html'>&lt;span style=&quot;font-weight: bold; color: rgb(0, 0, 0);&quot;&gt;What is OSI model?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;It is known as Open System Interface.It is a seven layer model.It is used to communicate between different nodes on a network.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b style=&quot;color: rgb(0, 0, 0);&quot;&gt;OSI Layers Explained&lt;/b&gt;&lt;br /&gt; &lt;br /&gt; &lt;u style=&quot;color: rgb(0, 0, 0);&quot;&gt;Physical Layer&lt;/u&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;: The physical layer is at the bottom of this data networking model. It deals with crude data that is in the form of electrical signals. The data bits are sent as 0&#39;s and 1&#39;s. 0&#39;s correspond to low voltage signals and 1&#39;s correspond to high voltage signals. The mechanical aspects of communication, such as wires or connectors come under this layer. The physical layer also deals with how these wires, connectors, and voltage electrical signals work.&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &lt;u style=&quot;color: rgb(0, 0, 0);&quot;&gt;The Data Link Layer&lt;/u&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;: The transmission of the data over the communication medium is the responsibility of this layer. The 0&#39;s and 1&#39;s that are used in the communication are grouped into logical encapsulation. This encapsulation is called frames. The data is transported in frames. The responsibility of these frames is that of the data link layer.&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &lt;u style=&quot;color: rgb(0, 0, 0);&quot;&gt;Network Layer&lt;/u&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;: There are many different types of ethernets. These networks are connected to each other through various media. When a data packet wants to reach a particular destination, it has to traverse through these networks. Essentially, there are lot of operations that are taking place between the connected networks. Also, the packet data which is traversing, has to choose an optimum route, and the addressing of these packets has to be proper. The various operations between the networks, packet data issues, addressing and routing are handled by this network layer.&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &lt;u style=&quot;color: rgb(0, 0, 0);&quot;&gt;Transport Layer&lt;/u&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;: The transport layer ensures quality and reliability of the communication. The data packet switching is entirely handled by the transport layer. There are basically two types of packet switching. They are connectionless packet switching and connection oriented packet switching. In connectionless packet switching, the packet data is allowed to choose the route in which it is going to reach the destination. Obviously, the packet in itself cant do this. Physical devices like routers are mainly responsible for the behavior of packets, but the packets formed from the same datum can reach their destination in different ways. Whereas, in connection oriented packet switching, once the route is decided, then all the packets have to follow the same route. Examples of connectionless packet switching are text messages in mobile phones, and the example of connection oriented switching is a direct voice call.&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &lt;u style=&quot;color: rgb(0, 0, 0);&quot;&gt;The Sessions Layer&lt;/u&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;: The sessions layer is mainly responsible for creating, maintaining and destroying the communication link. PDU (Protocol Data Unit), in which various protocols are defined, that have to be followed during communication, are the responsibility of the sessions layer. The applications that use RPC&#39;s (remote procedure calls) are taken care of by the sessions layer.&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &lt;u style=&quot;color: rgb(0, 0, 0);&quot;&gt;Presentation Layer&lt;/u&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;: There are various techniques of data compression which are used to send and receive the optimized data. For example, if certain data is repeating itself for a number of times, then it is logical to send the data only once, and specify the number of times it is repeated. This bundling of the repeated data is one of the techniques of compressions. The compression and decompression of the data is handled by the presentation layer. Also, encryption and decryption techniques used to avoid malicious attacks on data are handled by the presentation layer.&lt;/span&gt;&lt;br /&gt; &lt;br /&gt; &lt;u style=&quot;color: rgb(0, 0, 0);&quot;&gt;Application Layer&lt;/u&gt;&lt;span style=&quot;color: rgb(0, 0, 0);&quot;&gt;: This is the topmost layer of the OSI reference model. This layer comes into picture when there is a process to process communication. Whenever a user invokes any application, all the associated processes are run. Many a times, when an application wants to communicate with another application, then there has to be communication between these associated processes.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://subhambasak.blogspot.com/feeds/551514343266543936/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://subhambasak.blogspot.com/2010/06/iso-osi-model.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/551514343266543936'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/551514343266543936'/><link rel='alternate' type='text/html' href='http://subhambasak.blogspot.com/2010/06/iso-osi-model.html' title='ISO OSI Model'/><author><name>Subham Basak</name><uri>http://www.blogger.com/profile/11375424304433724624</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnkz1s-xZXCXxghXyOyzhqxfKWErXXIac-DxV_8P962gD3jFzeguod0-pNs4D2sq5ztijTNjJSomKFxCn-APa8Z1AGE-ys3_lfjsvDNK839mVQrdEK9BeZv7loqj95inY/s220/16032009170445.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-915936226477348126.post-2660175958837526712</id><published>2010-06-28T10:59:00.002+05:30</published><updated>2010-06-28T11:14:54.099+05:30</updated><title type='text'>How to create a jar file</title><content type='html'>&lt;ol&gt;&lt;li&gt;First, make sure you have installed Java 1.2 or above. This facility is not available in previous versions of Java.&lt;/li&gt;&lt;li&gt;Now create a program and place it in a separate folder.For example the main class is hello world. so first compile it using the statement  &lt;br /&gt;javac helloworld.java&lt;/li&gt;&lt;li&gt;Now you will find a file named helloworld.class&lt;/li&gt;&lt;li&gt;Now in that same folder you create a file Manifest.mf&lt;/li&gt;&lt;li&gt;The first line should be ---                                                                                                                Main-Class: helloworld&lt;/li&gt;&lt;li&gt;Now save the file&lt;/li&gt;&lt;li&gt;Now open the command promt in that folder.&lt;/li&gt;&lt;li&gt;Type the line ---   jar cfm helloworld.jar Manifest.mf  *.class&lt;/li&gt;&lt;li&gt;Give enter and your jar file would be created.&lt;/li&gt;&lt;li&gt;If you have gif images used in the program then place the images in that folder and type the given line in the commandline  ----   jar cfm helloworld.jar Manifest.mf  *.class *.gif&lt;/li&gt;&lt;li&gt;Now your jar is created .Click on it to run it.&lt;/li&gt;&lt;li&gt;Note :: all the commands and file name are case sensitive.&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;</content><link rel='replies' type='application/atom+xml' href='http://subhambasak.blogspot.com/feeds/2660175958837526712/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://subhambasak.blogspot.com/2010/06/how-to-create-jar-file.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/2660175958837526712'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/2660175958837526712'/><link rel='alternate' type='text/html' href='http://subhambasak.blogspot.com/2010/06/how-to-create-jar-file.html' title='How to create a jar file'/><author><name>Subham Basak</name><uri>http://www.blogger.com/profile/11375424304433724624</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnkz1s-xZXCXxghXyOyzhqxfKWErXXIac-DxV_8P962gD3jFzeguod0-pNs4D2sq5ztijTNjJSomKFxCn-APa8Z1AGE-ys3_lfjsvDNK839mVQrdEK9BeZv7loqj95inY/s220/16032009170445.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-915936226477348126.post-5033171091241151109</id><published>2010-06-27T18:35:00.003+05:30</published><updated>2010-06-27T19:20:31.853+05:30</updated><title type='text'>BLACK BOX TESTING</title><content type='html'>Black box testing treats the system as a “black-box”, so it doesn’t explicitly use Knowledge of the internal structure or code. Or in other words the Test engineer need not know the internal working of the “Black box” or application.&lt;br /&gt;Main focus in black box testing is on functionality of the system as a whole. The term ‘behavioral testing’ is also used for black box testing and white box testing is also sometimes called ’structural testing’. Behavioral test design is slightly different from black-box test design because the use of internal knowledge isn’t strictly forbidden, but it’s still discouraged.&lt;br /&gt;Each testing method has its own advantages and disadvantages. There are some bugs that cannot be found using only black box or only white box. Majority of the applications are tested by black box testing method. We need to cover majority of test cases so that most of the bugs will get discovered by blackbox testing.&lt;br /&gt;Black  box  testing  occurs  throughout  the  software  development  and  testing  life cycle i.e.  in Unit, Integration, System, Acceptance and regression testing stages.&lt;br /&gt;&lt;br /&gt;Tools used for Black Box testing:&lt;br /&gt;Black box testing tools are mainly record and playback tools. These tools are used for regression testing that to check whether new build has created any bug in previous working application functionality. These record and playback tools records test cases in the form of some scripts like TSL, VB script, Java script, Perl.&lt;br /&gt;Advantages of Black Box Testing:&lt;br /&gt;- Tester can be non-technical.&lt;br /&gt;- Used to verify contradictions in actual system and the specifications.&lt;br /&gt;- Test cases can be designed as soon as the functional specifications are complete&lt;br /&gt;Disadvantages of Black Box Testing:&lt;br /&gt;- The test inputs needs to be from large sample space.&lt;br /&gt;- It is difficult to identify all possible inputs in limited testing time. So writing test cases is slow and difficult&lt;br /&gt;- Chances of having unidentified paths during this testing&lt;br /&gt;&lt;br /&gt;Methods of Black box Testing:&lt;br /&gt;&lt;br /&gt;Graph Based Testing Methods:&lt;br /&gt;Each and every application is build up of some objects. All such objects are identified and graph is prepared. From this object graph each object relationship is identified and test cases written accordingly to discover the errors.&lt;br /&gt;Error Guessing:&lt;br /&gt;This is purely based on previous experience and judgment of tester. Error Guessing is the art of guessing where errors can be hidden. For this technique there are no specific tools, writing the test cases that cover all the application paths.&lt;br /&gt;Equivalence Partitioning:&lt;br /&gt;Equivalence partitioning is a black box testing method that divides the input domain of a program into classes of data from which test cases can be derived.&lt;br /&gt;&lt;br /&gt;How this partitioning is performed while testing:&lt;br /&gt;1. If an input condition specifies a range, one valid and one two invalid classes are defined.&lt;br /&gt;2. If an input condition requires a specific value, one valid and two invalid equivalence classes are defined.&lt;br /&gt;3. If an input condition specifies a member of a set, one valid and one invalid equivalence class is defined.&lt;br /&gt;4. If an input condition is Boolean, one valid and one invalid class is defined.&lt;br /&gt;&lt;br /&gt;In this technique, we do not use the code to determine a test suite; rather, knowing the problem that we&#39;re trying to solve, we come up with four types of test data:&lt;br /&gt;1.    Easy-to-compute data&lt;br /&gt;2.    Typical data&lt;br /&gt;3.    Boundary / extreme data&lt;br /&gt;4.    Bogus data&lt;br /&gt;For example, suppose we are testing a function that uses the quadratic formula to determine the two roots of a second-degree polynomial ax2+bx+c. For simplicity, assume that we are going to work only with real numbers, and print an error message if it turns out that the two roots are complex numbers (numbers involving the square root of a negative number).&lt;br /&gt;We can come up with test data for each of the four cases, based on values of the polynomial&#39;s discriminant (b2-4ac):&lt;br /&gt;Easy data ( discriminant is a perfect square):&lt;br /&gt;a    b    c    Roots&lt;br /&gt;1    2    1    -1, -1&lt;br /&gt;1    3    2    -1, -2&lt;br /&gt;&lt;br /&gt;Typical data (discriminant is positive):&lt;br /&gt;a    b    c    Roots&lt;br /&gt;1    4    1    -3.73205, -0.267949&lt;br /&gt;2    4    1    -1.70711, -0.292893&lt;br /&gt;&lt;br /&gt;Boundary / extreme data (discriminant is zero):&lt;br /&gt;a    b    c    Roots&lt;br /&gt;2    -4    2    1, 1&lt;br /&gt;2    -8    8    2, 2&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Bogus data ( discriminant is negative, or is zero):&lt;br /&gt;a    b    c    Roots&lt;br /&gt;1    1    1    square root of negative number&lt;br /&gt;0    1    1    division by zero&lt;br /&gt;&lt;br /&gt;As with glass-box testing, you should test your code with each set of test data. If the answers match, then your code passes the black-box test.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Boundary Value Analysis:&lt;br /&gt;Many systems have tendency to fail on boundary. So testing boundary values of application is important. Boundary Value Analysis (BVA) is a test Functional Testing technique where the extreme boundary values are chosen. Boundary values include maximum, minimum, just inside/outside boundaries, typical values, and error values.&lt;br /&gt;&lt;br /&gt;BVA techniques:&lt;br /&gt;1. Number of variables&lt;br /&gt;For n variables: BVA yields 4n + 1 test  cases .&lt;br /&gt;2. Kinds of ranges&lt;br /&gt;Generalizing ranges depends on the nature or type of variables&lt;br /&gt;Advantages of Boundary Value Analysis&lt;br /&gt;1. Robustness Testing – Boundary Value Analysis plus values that go beyond the limits&lt;br /&gt;2. Min – 1, Min, Min +1, Nom, Max -1, Max, Max +1&lt;br /&gt;3. Forces attention to exception handling&lt;br /&gt;&lt;br /&gt;Limitations of Boundary Value Analysis&lt;br /&gt;Boundary value testing is efficient only for variables of fixed values in boundary.&lt;br /&gt;EXAMPLE:&lt;br /&gt;For the function that computes the square root of integer values in the range 0 and 5000, the test case must include the following values:   {0, -1, 5000, 5001}</content><link rel='replies' type='application/atom+xml' href='http://subhambasak.blogspot.com/feeds/5033171091241151109/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://subhambasak.blogspot.com/2010/06/black-box-testing.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/5033171091241151109'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/5033171091241151109'/><link rel='alternate' type='text/html' href='http://subhambasak.blogspot.com/2010/06/black-box-testing.html' title='BLACK BOX TESTING'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/08611362567665496177</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-915936226477348126.post-1935399171083099343</id><published>2010-06-27T15:49:00.001+05:30</published><updated>2010-06-27T15:49:53.336+05:30</updated><title type='text'>How to use internet from pc using mobile as the modem</title><content type='html'>First obtain the settings from the ISP.&lt;p&gt;Next activate the settings and see if you can access the internet from&lt;br&gt;the mobile.If you can access then it is ok else contact the service&lt;br&gt;provider.&lt;p&gt;Now assuming that you was enable to connect to the internet, connect&lt;br&gt;the mobile with the&lt;br&gt;pc/laptop using data cable/bluetooth and activate the pc studio mode.&lt;p&gt;Next create a dial up network connection. Access name would be the&lt;br&gt;name provided by the&lt;br&gt;ISP.Leave the username and password blank.&lt;p&gt;Now for the dialling number ask from the ISP. Mainly try *99***1#   or *99#.&lt;p&gt;Now go to system properties-&amp;gt;Advanced system&lt;br&gt;settings-&amp;gt;Hardware-&amp;gt;Device manager-&amp;gt;Modem.&lt;p&gt;Now select the modem type( bluetooth / serial port).&lt;p&gt;Next go to advanced options and at the place of extra initialization&lt;br&gt;commands type the following :&lt;p&gt;AT+CGDCONT=1,&amp;quot;IP&amp;quot;,&amp;quot;bsnlnet&amp;quot;&lt;p&gt;Here bsnlnet is the connection name. Write your connection name in this place.&lt;p&gt;Now your all setup is ready.Connect the internet and enjoy browsing.&lt;br&gt;-- &lt;br&gt;Subham Basak&lt;br&gt;&lt;a href=&quot;http://www.subhambasak.weebly.com&quot;&gt;www.subhambasak.weebly.com&lt;/a&gt;&lt;br&gt;&lt;a href=&quot;http://subhambasak.blogspot.com&quot;&gt;subhambasak.blogspot.com&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://subhambasak.blogspot.com/feeds/1935399171083099343/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://subhambasak.blogspot.com/2010/06/how-to-use-internet-from-pc-using.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/1935399171083099343'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/1935399171083099343'/><link rel='alternate' type='text/html' href='http://subhambasak.blogspot.com/2010/06/how-to-use-internet-from-pc-using.html' title='How to use internet from pc using mobile as the modem'/><author><name>Subham Basak</name><uri>http://www.blogger.com/profile/11375424304433724624</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnkz1s-xZXCXxghXyOyzhqxfKWErXXIac-DxV_8P962gD3jFzeguod0-pNs4D2sq5ztijTNjJSomKFxCn-APa8Z1AGE-ys3_lfjsvDNK839mVQrdEK9BeZv7loqj95inY/s220/16032009170445.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-915936226477348126.post-4690034580162202884</id><published>2010-06-27T10:59:00.001+05:30</published><updated>2010-06-27T10:59:12.472+05:30</updated><title type='text'>How to install Java games on the Samsung L700</title><content type='html'>In the phone Menu select&lt;br&gt;&amp;#39;Settings&amp;#39;&lt;p&gt;Then select&lt;br&gt;&amp;#39;Phone settings&amp;#39;&lt;p&gt;Then&lt;br&gt;&amp;#39;USB settings&amp;#39;&lt;p&gt;And choose&lt;br&gt;&amp;#39;Ask on connection&amp;#39;&lt;p&gt;Plug the Phone in to the PC with the USB cable&lt;p&gt;On the phone select&lt;br&gt;&amp;#39;Media player&amp;#39; or Mass Storage&lt;p&gt;Open the folder&lt;br&gt;&amp;#39;Phone&amp;#39;&lt;p&gt;Phone memory...&lt;br&gt;You should see the folders: Images, Other files, Sounds, Videos&lt;p&gt;Create a new folder and name it&lt;br&gt;Games&lt;p&gt;Put any game you want to install in that &amp;#39;Games&amp;#39; folder&lt;p&gt;Two things need to made sure of when copying over the games. Firstly&lt;br&gt;make sure you have the *.jar and&lt;br&gt;*.jad files for each game, if you don&amp;#39;t have the *.jad file, you can&lt;br&gt;download a jad creator pretty easily, just type it in Google. Secondly&lt;br&gt;each game has to be in it&amp;#39;s own folder, if you just dump all the *.jar&lt;br&gt;and *.jad files directly into the &amp;#39;Games&amp;#39; folder only the first game&lt;br&gt;installed will work (Poorly too).&lt;p&gt;Now Unplug the phone&lt;p&gt;Now on the phone dial the code:&lt;p&gt;*#6984125*#&lt;p&gt;Select &amp;#39;Internals&amp;#39; (Number 4)&lt;br&gt;It will ask for a master key it is:&lt;p&gt;*#9072641*#&lt;p&gt;Select &amp;#39;Storage settings&amp;#39; (Number 7)&lt;p&gt;Update Java DB (Number 2)&lt;br&gt;Note: As soon as you do &amp;quot;update java DB&amp;quot;, the game will install... no&lt;br&gt;need to run the .jar and .jad files now.&lt;p&gt;Now your game is installed...&lt;br&gt;To play the games navigate to My Files &amp;gt; Games and more...&lt;br&gt;There you the installed can find game..&lt;p&gt;-- &lt;br&gt;Subham Basak&lt;br&gt;&lt;a href=&quot;http://www.subhambasak.weebly.com&quot;&gt;www.subhambasak.weebly.com&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://subhambasak.blogspot.com/feeds/4690034580162202884/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://subhambasak.blogspot.com/2010/06/how-to-install-java-games-on-samsung.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/4690034580162202884'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/4690034580162202884'/><link rel='alternate' type='text/html' href='http://subhambasak.blogspot.com/2010/06/how-to-install-java-games-on-samsung.html' title='How to install Java games on the Samsung L700'/><author><name>Subham Basak</name><uri>http://www.blogger.com/profile/11375424304433724624</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnkz1s-xZXCXxghXyOyzhqxfKWErXXIac-DxV_8P962gD3jFzeguod0-pNs4D2sq5ztijTNjJSomKFxCn-APa8Z1AGE-ys3_lfjsvDNK839mVQrdEK9BeZv7loqj95inY/s220/16032009170445.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-915936226477348126.post-6125116844424582587</id><published>2010-06-26T21:39:00.000+05:30</published><updated>2010-06-26T21:43:41.340+05:30</updated><title type='text'>JAVA Features</title><content type='html'>The properties that make Java so attractive are present in other programming languages. Many languages are ideally suited for certain types of applications, even more so than Java. But Java brings all these properties together, in one language. This is a revolutionary jump forward for the software industry.&lt;br /&gt;&lt;br /&gt;Let&#39;s look at some of the properties in more detail: -&lt;br /&gt;&lt;br /&gt;   * &lt;span style=&quot;font-weight: bold;&quot;&gt;object-oriented&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;   *&lt;span style=&quot;font-weight: bold;&quot;&gt; portable&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;   * &lt;span style=&quot;font-weight: bold;&quot;&gt;multi-threaded&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;   * &lt;span style=&quot;font-weight: bold;&quot;&gt;automatic garbage collection&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;   *&lt;span style=&quot;font-weight: bold;&quot;&gt; secure&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;   * &lt;span style=&quot;font-weight: bold;&quot;&gt;network and &quot;Internet&quot; aware&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;   * &lt;span style=&quot;font-weight: bold;&quot;&gt;simplicity and ease-of-use&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold; color: rgb(0, 0, 0);&quot;&gt;Object-oriented&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Many older languages, like C and Pascal, were procedural languages. Procedures (also called functions) were blocks of code that were part of a module or application. Procedures passed parameters (primitive data types like integers, characters, strings, and floating point numbers). Code was treated separately to data. You had to pass around data structures, and procedures could easily modify their contents. This was a source of problems, as parts of a program could have unforeseen effects in other parts. Tracking down which procedure was at fault wasted a great deal of time and effort, particularly with large programs.&lt;br /&gt;&lt;br /&gt;In some procedural language, you could even obtain the memory location of a data structure. Armed with this location, you could read and write to the data at a later time, or accidentally overwrite the contents.&lt;br /&gt;&lt;br /&gt;Java is an object-oriented language. An object-oriented language deals with objects. Objects contain both data (member variables) and code (methods). Each object belongs to a particular class, which is a blueprint describing the member variables and methods an object offers. In Java, almost every variable is an object of some type or another - even strings. Object-oriented programming requires a different way of thinking, but is a better way to design software than procedural programming.&lt;br /&gt;&lt;br /&gt;There are many popular object-oriented languages available today. Some like Smalltalk and Java are designed from the beginning to be object-oriented. Others, like C++, are partially object-oriented, and partially procedural. In C++, you can still overwrite the contents of data structures and objects, causing the application to crash. Thankfully, Java prohibits direct access to memory contents, leading to a more robust system.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold; color: rgb(0, 0, 0);&quot;&gt;Portable&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Most programming languages are designed for a specific operating system and processor architecture. When source code (the instructions that make up a program) are compiled, it is converted to machine code which can be executed only on one type of machine. This process produces native code, which is extremely fast.&lt;br /&gt;&lt;br /&gt;Another type of language is one that is interpreted. Interpreted code is read by a software application (the interpreter), which performs the specified actions. Interpreted code often doesn&#39;t need to be compiled - it is translated as it is run. For this reason, interpreted code is quite slow, but often portable across different operating systems and processor architectures.&lt;br /&gt;&lt;br /&gt;Java takes the best of both techniques. Java code is compiled into a platform-neutral machine code, which is called Java bytecode. A special type of interpreter, known as a Java Virtual Machine (JVM), reads the bytecode, and processes it. The approach Java takes offers some big advantages over other interpreted languages. Firstly, the source code is protected from view and modification - only the bytecode needs to be made available to users. Secondly, security mechanisms can scan bytecode for signs of modification or harmful code, complimenting the other security mechanisms of Java. Most of all though, it means that Java code can be compiled once, and run on any machine and operating system combination that supports a Java Virtual Machine (JVM). Java can run on Unix, Windows, Macintosh, and even the Palm Pilot. Java can even run inside a web browser, or a web server. Being portable means that the application only has to be written once - and can then execute on a wider range of machines. This saves a lot of time, and money.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Multi-threaded&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you&#39;ve ever written complex applications in C, or PERL, you&#39;ll probably have come across the concept of multiple processes before. An application can split itself into separate copies, which run concurrently. Each copy replicates code and data, resulting in increased memory consumption. Getting the copies to talk together can be complex, and frustrating. Creating each process involves a call to the operating system, which consumes extra CPU time as well.&lt;br /&gt;&lt;br /&gt;A better model is to use multiple threads of execution, referred to as threads for short. Threads can share data and code, making it easier to share data between thread instances. They also use less memory and CPU overhead. Some languages, like C++, have support for threads, but they are complex to use. Java has support for multiple threads of execution built right into the language. Threads require a different way of thinking, but can be understood very quickly. Thread support in Java is very simple to use, and the use of threads in applications and applets is quite commonplace.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Automatic garbage collection&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;No, we&#39;re not talking about taking out the trash (though a computer that could literally do that would be kind of neat). The term garbage collection refers to the reclamation of unused memory space. When applications create objects, the JVM allocates memory space for their storage. When the object is no longer needed (no reference to the object exists), the memory space can be reclaimed for later use.&lt;br /&gt;&lt;br /&gt;Languages like C++ force programmers to allocate and deallocate memory for data and objects manually. This adds extra complexity, but also causes another problem - memory leaks. When programmers forget to deallocate memory, the amount of free memory available is decreased. Programs that frequently create and destroy objects may eventually find that there is no memory left. In Java, the programmer is free from such worries, as the JVM will perform automatic garbage collection of objects.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Secure&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Security is a big issue with Java. Since Java applets are downloaded remotely, and executed in a browser, security is of great concern. We wouldn&#39;t want applets reading our personal documents, deleting files, or causing mischief. At the API level, there are strong security restrictions on file and network access for applets, as well as support for digital signatures to verify the integrity of downloaded code. At the bytecode level, checks are made for obvious hacks, such as stack manipulation or invalid bytecode. The strong security mechanisms in Java help to protect against inadvertent or intentional security violations, but it is important to remember that no system is perfect. The weakest link in the chain is the Java Virtual Machine on which it is run - a JVM with known security weaknesses can be prone to attack. It is also worth noting that while there have been a few identified weaknesses in JVMs, they are rare, and usually fixed quickly.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Network and &quot;Internet&quot; aware&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Java was designed to be &quot;Internet&quot; aware, and to support network programming. The Java API provides extensive network support, from sockets and IP addresses, to URLs and HTTP. It&#39;s extremely easy to write network applications in Java, and the code is completely portable between platforms. In languages like C/C++, the networking code must be re-written for different operating systems, and is usually more complex. The networking support of Java saves a lot of time, and effort.&lt;br /&gt;&lt;br /&gt;Java also includes support for more exotic network programming, such as remote-method invocation (RMI), CORBA and Jini. These distributed systems technologies make Java an attractive choice for large distributed systems.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Simplicity and ease-of-use&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Java draws its roots from the C++ language. C++ is widely used, and very popular. Yet it is regarded as a complex language, with features like multiple-inheritance, templates and pointers that are counter-productive. Java, on the other hand, is closer to a &quot;pure&quot; object-oriented language. Access to memory pointers is removed, and object-references are used instead. Support for multiple-inheritance has been removed, which lends itself to clearer and simpler class designs. The I/O and network library is very easy to use, and the Java API provides developers with lots of time-saving code (such as networking and data-structures).  After using Java for awhile, most developers are reluctant to return to other languages, because of the simplicity and elegance of Java.</content><link rel='replies' type='application/atom+xml' href='http://subhambasak.blogspot.com/feeds/6125116844424582587/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://subhambasak.blogspot.com/2010/06/java-features.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/6125116844424582587'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/6125116844424582587'/><link rel='alternate' type='text/html' href='http://subhambasak.blogspot.com/2010/06/java-features.html' title='JAVA Features'/><author><name>Subham Basak</name><uri>http://www.blogger.com/profile/11375424304433724624</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnkz1s-xZXCXxghXyOyzhqxfKWErXXIac-DxV_8P962gD3jFzeguod0-pNs4D2sq5ztijTNjJSomKFxCn-APa8Z1AGE-ys3_lfjsvDNK839mVQrdEK9BeZv7loqj95inY/s220/16032009170445.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-915936226477348126.post-241748013795612319</id><published>2010-06-25T20:58:00.000+05:30</published><updated>2010-06-26T21:02:35.892+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="computers"/><category scheme="http://www.blogger.com/atom/ns#" term="JAVA.proggramming language"/><title type='text'>The Java Virtual Machine (JVM)</title><content type='html'>&lt;div id=&quot;blog-author&quot;&gt; &lt;/div&gt;&lt;span style=&quot;font-size:+2;&quot;&gt;A&lt;/span&gt;t the heart of the Java platform lies the Java Virtual Machine, or JVM. Most programming languages compile source code directly into machine code, suitable for execution on a particular microprocessor architecture. The difference with Java is that it uses bytecode - a special type of machine code.&lt;br /&gt;&lt;br /&gt;Java bytecode executes on a special type of microprocessor. Strangely enough, there wasn&#39;t a hardware implementation of this microprocessor available when Java was first released. Instead, the processor architecture is emulated by what is known as a &quot;&lt;em&gt;virtual         machine&lt;/em&gt;&quot;. This virtual machine is an emulation of a real Java processor - a machine within a machine. The only difference is that the virtual machine isn&#39;t running on a CPU - it is being emulated on the CPU of the host machine.&lt;br /&gt;The Java Virtual Machine is responsible for interpreting Java bytecode, and translating this into actions or operating system calls. For example, a request to establish a socket connection to a remote machine will involve an operating system call. Different operating systems handle sockets in different ways - but the programmer doesn&#39;t need to worry about such details.  It is the responsibility of the JVM to handle these translations, so that the operating system and CPU architecture on which Java software is running is completely irrelevant to the developer.&lt;br /&gt;The Java Virtual Machine forms part of a large system, the Java Runtime Environment (JRE). Each operating system and CPU architecture requires a different JRE. The JRE comprises a set of base classes, which are an implementation of the base Java API, as well as a JVM. The portability of Java comes from implementations on a variety of CPUs and architectures. Without an available JRE for a given environment, it is impossible to run Java software.&lt;br /&gt;&lt;br /&gt;Differences between JVM implementations Though implementations of Java Virtual Machines are designed to be compatible, no two JVMs are exactly alike. For example, garbage collection algorithms vary between one JVM and another, so it becomes impossible to know exactly when memory will be reclaimed. The thread scheduling algorithms are different between one JVM and another (based in part on the underlying operating system), so that it is impossible to accurately predict when one thread will be executed over another.&lt;br /&gt;&lt;br /&gt;Initially, this is a cause for concern from programmers new to the Java language. However, it actually has very little practical bearing on Java development. Such predictions are often dangerous to make, as thread scheduling and memory usage will vary between different hardware environments anyway. The power of Java comes from not being specific about the operating system and CPU architecture - to do so reduces the portability of software.&lt;br /&gt;                                                                                                               -Subham Basak&lt;br /&gt;                                                                                                      www.subhambasak.weebly.com</content><link rel='replies' type='application/atom+xml' href='http://subhambasak.blogspot.com/feeds/241748013795612319/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://subhambasak.blogspot.com/2010/06/java-virtual-machine-jvm.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/241748013795612319'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/241748013795612319'/><link rel='alternate' type='text/html' href='http://subhambasak.blogspot.com/2010/06/java-virtual-machine-jvm.html' title='The Java Virtual Machine (JVM)'/><author><name>Subham Basak</name><uri>http://www.blogger.com/profile/11375424304433724624</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnkz1s-xZXCXxghXyOyzhqxfKWErXXIac-DxV_8P962gD3jFzeguod0-pNs4D2sq5ztijTNjJSomKFxCn-APa8Z1AGE-ys3_lfjsvDNK839mVQrdEK9BeZv7loqj95inY/s220/16032009170445.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-915936226477348126.post-586566578206794522</id><published>2010-04-15T21:43:00.000+05:30</published><updated>2010-06-26T21:54:45.430+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="Bluetooth"/><title type='text'>Introducing Bluetooth....</title><content type='html'>&lt;div id=&quot;blog-content&quot;&gt;&lt;div class=&quot;paragraph&quot; style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;In this article I will talk about Bluetooth. You must be thinking what is this Bluetooth? Is it something related to cosmetics or something related to teeth or may be something…&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;Well to begin with, Bluetooth is a new technology named after the 10th century Danish king Harald Bluetooth Blatand who ruled part of Scandinavia in 960 AD .He helped unite his part of the world. As the name implies that Bluetooth would be the technology to unite the mobile world. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;Bluetooth device is the revolutionary device launched by L.M Ericsson, to integrate its phone with all Internet enabled devices. Two L.M Ericsson telephone employees, the Swedish born Sve Mattison and his Dutch colleague, Jaap Haartsen, originally designed Bluetooth technology in 1994.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The term Bluetooth refers to an open specification governed by the Bluetooth special interest group (SIG) for wireless personal area networks (PANs). This technology provides a way to connect and exchange information between devices like personal digital assistants (PDAs), mobile phones, laptops, PCs, printers and digital cameras via a secure, low cost, globally available short-range radio frequency.&lt;br /&gt;&lt;br /&gt;Lets look at some examples where we can use Bluetooth technology.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;Nowadays, you have to either manually enter the names and phone numbers of all your contacts or in other advance way you can use a cable to connect your phone and PC and can run some application to synchronize the contact information.&lt;br /&gt;With this new technology you could see this happens automatically, without your involvement, whenever phone will come in the range of PC data will automatically updated.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;With Bluetooth there are so many exciting applications like, nowadays whenever you come to office, you have to do so many setup to get to start to work, like you have to connect your notebook to USB port, you switch it on, then your notebook gets boot up and after that only you are able to log in. All this process takes some of your time. Now think about the situation where you walk into the office switch on the notebook and get ready to do work. This is possible with Bluetooth, it makes your notebook to start communicating with your server via radio signals, not require you to connect it to the USB port.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;Even car manufacturers are not left behind; car manufacturers such as BMW, Lexus and Toyota have equipped some of their models with Bluetooth car kits. This allows you to use the features of your cell phone through the car’s audio system while the phone itself stored in the trunk for instance.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial; font-size: medium;&quot;&gt;Now the question arises, how the Bluetooth technology works?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The Bluetooth system consists of an RF (Radio Frequency) transceiver, baseband and protocol stack. It uses radio standards to enable file-sharing and data transfers between devices like PDA and desktop. These radio frequencies are present in all directions and their range varies between 10cm to 10m, further it can be extended to 100m depending on the power class of the product, again this power transmission rates varies in many Bluetooth products depending on the power saving features available in particular unit, bandwidth requirements, transmission distance, etc.&lt;br /&gt;Because this Bluetooth technology uses radio signals, the walls in our house will not impede a Bluetooth network. Also we can control devices in the different rooms very easily.&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;Bluetooth operates in globally available low radio frequency at 2.4 GHz and supports data speed of up to 721 Kbps, as well as three voice channels.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;To make use of Bluetooth technology you have to make sure the new device which you buy is Bluetooth compatible, Bluetooth compatible devices comes with software to configure Bluetooth to share data by implementing specific profiles, these profiles will determine what type of information or resources the device can store.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;When you want two new Bluetooth device should communicate, first you have to introduce them to share data, this is known as pairing (authorizing the device to communicate with each other).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: Arial;&quot;&gt;It is also possible to configure the devices to have password protection, so that other people cannot take part in your communication. One more thing is also there, you can set up the device to constantly announce their presence to the device in its range, and the connection can be automatically establish.&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://subhambasak.blogspot.com/feeds/586566578206794522/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://subhambasak.blogspot.com/2010/04/introducing-bluetooth.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/586566578206794522'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/915936226477348126/posts/default/586566578206794522'/><link rel='alternate' type='text/html' href='http://subhambasak.blogspot.com/2010/04/introducing-bluetooth.html' title='Introducing Bluetooth....'/><author><name>Subham Basak</name><uri>http://www.blogger.com/profile/11375424304433724624</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnkz1s-xZXCXxghXyOyzhqxfKWErXXIac-DxV_8P962gD3jFzeguod0-pNs4D2sq5ztijTNjJSomKFxCn-APa8Z1AGE-ys3_lfjsvDNK839mVQrdEK9BeZv7loqj95inY/s220/16032009170445.jpg'/></author><thr:total>0</thr:total></entry></feed>