<?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: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-3562210129043968367</id><updated>2011-11-27T16:20:15.917-08:00</updated><category term='future'/><category term='IBM'/><category term='technology'/><category term='c sharp'/><category term='SQL'/><category term='news'/><category term='VB Functions'/><category term='Sharing'/><category term='programming'/><category term='Hazardous'/><category term='boost'/><category term='SQL Server 2005'/><category term='ASP'/><category term='information tech'/><category term='Updatable Subscription'/><category term='Computerworld'/><category term='ASP.NET'/><category term='Session State'/><category term='Job'/><category term='Fiber Distributed- Data Interface'/><category term='Landing'/><category term='Full Text Catalogs in SQL Server'/><category term='Building'/><category term='8 Tips'/><category term='String Manipulation in'/><category term='c language'/><category term='Google Results'/><category term='String Manipulation'/><category term='career'/><category term='Replication Topology'/><category term='Text Search'/><category term='compute'/><category term='vb language'/><category term='Health'/><category term='increment'/><category term='FDDI'/><category term='2008'/><title type='text'>Crazy Programming Codes</title><subtitle type='html'>coding de-bugging coding de-bugging code code code..</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://crazy-programming-codes.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3562210129043968367/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://crazy-programming-codes.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>roguemei</name><uri>http://www.blogger.com/profile/02630238697113270207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>11</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3562210129043968367.post-2338471575637315173</id><published>2010-05-14T20:53:00.000-07:00</published><updated>2011-03-14T20:55:26.187-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='String Manipulation'/><category scheme='http://www.blogger.com/atom/ns#' term='VB Functions'/><category scheme='http://www.blogger.com/atom/ns#' term='vb language'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><title type='text'>String Manipulation Functions in VB - Len, Right, Left, Mid, Trim, Ltrim, Rtrim, Ucase, Lcase, Instr, Val, Str  ,Chr and Asc</title><content type='html'>&lt;span class="Apple-style-span" style="line-height: 16px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: 'Times New Roman'; font-size: medium; "&gt;&lt;span &gt;&lt;span style="font-family: Verdana; "&gt;Here's how to use some of the string manipulation VB function such as &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;&lt;b&gt;Len, R&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Verdana; "&gt;&lt;span &gt;&lt;b&gt;ight, Left, Mid, Trim, Ltrim, Rtrim, Ucase, Lcase, Instr, Val, Str  ,Chr&lt;/b&gt; and &lt;b&gt;Asc&lt;/b&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span"  &gt;&lt;span class="Apple-style-span" style="line-height: 16px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span &gt;&lt;/span&gt;&lt;span class="Apple-style-span"  &gt;&lt;span class="Apple-style-span" style="line-height: 16px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman'; line-height: normal; font-size: medium; "&gt;&lt;table border="0" width="100%" id="table7"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;h4 style="margin-top: 9px; margin-right: 0cm; margin-bottom: 5px; margin-left: 0cm; page-break-after: avoid; font-size: 14pt; font-family: 'Times New Roman'; line-height: 19px; "&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;(i)The  Len Function&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-top: 9px; margin-bottom: 5px; "&gt;&lt;span lang="EN-US"&gt;&lt;span  &gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-top: 9px; margin-bottom: 5px; "&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;The length function returns an integer value which is the length of a phrase or a sentence, including the empty spaces. The format is&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-left: 72pt; margin-top: 9px; margin-bottom: 5px; "&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;Len (“Phrase”)&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-top: 9px; margin-bottom: 5px; "&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;For example,&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-left: 72pt; margin-top: 9px; margin-bottom: 5px; "&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;Len (VisualBasic) = 11 and Len (welcome to VB tutorial) = 22&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-top: 9px; margin-bottom: 5px; "&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;The Len function can also return the number of digits or memory locations of a number that is stored in the computer. For example,&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-left: 72pt; margin-top: 9px; margin-bottom: 5px; "&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;Private sub Form_Activate ( )&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-left: 72pt; margin-top: 9px; margin-bottom: 5px; "&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;X=sqr (16)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-left: 72pt; margin-top: 9px; margin-bottom: 5px; "&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;Y=1234&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-left: 72pt; margin-top: 9px; margin-bottom: 5px; "&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;Z#=10#&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-left: 72pt; margin-top: 9px; margin-bottom: 5px; "&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;Print Len(x), Len(y), and Len (z)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-left: 72pt; margin-top: 9px; margin-bottom: 5px; "&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;End Sub&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-top: 10px; margin-bottom: 5px; "&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;will produce the output  1, 4 , 8. The reason why the last value is 8 is because z# is a double precision number and so it is allocated more memory spaces.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h4 style="margin-top: 11px; margin-right: 0cm; margin-bottom: 12px; margin-left: 0cm; page-break-after: avoid; font-size: 14pt; font-family: 'Times New Roman'; line-height: 19px; "&gt;&lt;a name="_Toc123994244"&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;(ii) The Right  Function&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-top: 11px; margin-bottom: 12px; "&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;The Right function extracts the right portion of a phrase. The format is&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-left: 72pt; margin-top: 11px; margin-bottom: 12px; "&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;Right (“Phrase”, n)&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-top: 11px; margin-bottom: 12px; "&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;Where n is the starting position from the right of the phase where the portion of the phrase is going to be extracted.  For example,&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-left: 72pt; margin-top: 11px; margin-bottom: 12px; "&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt; Right(“Visual Basic”, 4) = asic&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h4 style="margin-top: 11px; margin-right: 0cm; margin-bottom: 12px; margin-left: 0cm; page-break-after: avoid; font-size: 14pt; font-family: 'Times New Roman'; line-height: 19px; "&gt;&lt;a name="_Toc123994245"&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;(iii)The Left Function&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-top: 11px; margin-bottom: 12px; "&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;The Left$ function extract the left portion of a phrase. The format is&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-left: 72pt; margin-top: 11px; margin-bottom: 12px; "&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;Left(“Phrase”, n)&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-top: 11px; margin-bottom: 12px; "&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;Where n is the starting position from the left of the phase where the portion of the phrase is going to be extracted.  For example,&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-left: 72pt; margin-top: 11px; margin-bottom: 12px; "&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt; Left (“Visual Basic”, 4) = Visu&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-top: 11px; margin-bottom: 12px; "&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt; &lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;a name="_Toc123994246"&gt;&lt;span lang="EN-US" style="font-family: Verdana; font-weight: 700; "&gt;&lt;span &gt;(iv) The Ltrim Function&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-top: 11px; margin-bottom: 12px; "&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;The Ltrim function trims the empty spaces of the left portion of the phrase. The format is&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-left: 72pt; margin-top: 11px; margin-bottom: 12px; "&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;Ltrim(“Phrase”)&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-top: 11px; margin-bottom: 12px; "&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;.For example,&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-left: 72pt; margin-top: 11px; margin-bottom: 12px; "&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt; Ltrim (“  Visual Basic”, 4)= Visual basic&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h4 style="margin-top: 11px; margin-right: 0cm; margin-bottom: 12px; margin-left: 0cm; page-break-after: avoid; font-size: 14pt; font-family: 'Times New Roman'; line-height: 19px; "&gt;&lt;a name="_Toc123994247"&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;(v) The Rtrim Function&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-top: 11px; margin-bottom: 12px; "&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;The Rtrim function trims the empty spaces of the right portion of the phrase. The format is&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-left: 72pt; margin-top: 11px; margin-bottom: 12px; "&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;Rtrim(“Phrase”)&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-top: 11px; margin-bottom: 12px; "&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;.For example,&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-left: 72pt; margin-top: 11px; margin-bottom: 12px; "&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;Rtrim (“Visual Basic      ”, 4) = Visual basic&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h4 style="margin-top: 11px; margin-right: 0cm; margin-bottom: 12px; margin-left: 34.5pt; page-break-after: avoid; font-size: 14pt; font-family: 'Times New Roman'; text-indent: -34.5pt; line-height: 19px; "&gt;&lt;a name="_Toc123994248"&gt;&lt;span &gt;&lt;span lang="EN-US" style="font-style: normal; font-variant: normal; "&gt;&lt;span &gt;(vi)&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-US" style="font-style: normal; font-variant: normal; font-weight: normal; font-family: Verdana; "&gt;    &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-US"&gt;&lt;span  &gt;The Trim function&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-top: 11px; margin-bottom: 12px; "&gt;&lt;span lang="EN-US"&gt;&lt;span  &gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-top: 11px; margin-bottom: 12px; "&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;The Ttrim function trims the empty spaces on both side of the phrase. The format is&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-left: 72pt; margin-top: 11px; margin-bottom: 12px; "&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;Trim(“Phrase”)&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-top: 11px; margin-bottom: 12px; "&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;.For example,&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-left: 72pt; margin-top: 11px; margin-bottom: 12px; "&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;Trim (“   Visual Basic      ”) = Visual basic&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h4 style="margin-top: 11px; margin-right: 0cm; margin-bottom: 12px; margin-left: 0cm; page-break-after: avoid; font-size: 14pt; font-family: 'Times New Roman'; line-height: 19px; "&gt;&lt;a name="_Toc123994249"&gt;&lt;span &gt;&lt;span style="font-family: Verdana; "&gt;(viii)&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt; The Mid Function&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-top: 11px; margin-bottom: 12px; "&gt;&lt;span lang="EN-US"&gt;&lt;span  &gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-top: 11px; margin-bottom: 12px; "&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;The &lt;b&gt;Mid&lt;/b&gt; function extracts a substring from the original phrase or string. It takes the following format:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-left: 72pt; margin-top: 11px; margin-bottom: 12px; "&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;Mid(phrase, position, n)&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-top: 11px; margin-bottom: 12px; "&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;Where position is the starting position of the phrase from which the extraction process will start and n is the number of characters to be extracted. For example,&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-left: 72pt; margin-top: 11px; margin-bottom: 12px; "&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;Mid(“Visual Basic”, 3, 6) = ual Bas&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h4 style="margin-top: 11px; margin-right: 0cm; margin-bottom: 12px; margin-left: 0cm; page-break-after: avoid; font-size: 14pt; font-family: 'Times New Roman'; line-height: 19px; "&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;(&lt;a name="_Toc123994250"&gt;ix) The InStr function&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-top: 11px; margin-bottom: 12px; "&gt;&lt;span lang="EN-US"&gt;&lt;span  &gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-top: 11px; margin-bottom: 12px; "&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt; The &lt;b&gt;InStr&lt;/b&gt; function looks for a phrase that is embedded within the original phrase and returns the starting position of the embedded phrase. The format is&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-left: 72pt; margin-top: 11px; margin-bottom: 12px; "&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;Instr (n, original phase, embedded phrase)&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-top: 11px; margin-bottom: 12px; "&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;Where n is the position where the Instr function will begin to look for the embedded phrase. For example&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-left: 72pt; margin-top: 11px; margin-bottom: 12px; "&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;Instr(1, “Visual Basic”,” Basic”)=8&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h4 style="margin-top: 11px; margin-right: 0cm; margin-bottom: 12px; margin-left: 0cm; page-break-after: avoid; font-size: 14pt; font-family: 'Times New Roman'; line-height: 19px; "&gt;&lt;a name="_Toc123994251"&gt;&lt;span &gt;&lt;span style="font-family: Verdana; "&gt;(x)&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt; The Ucase and the Lcase functions&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-top: 11px; margin-bottom: 12px; "&gt;&lt;span lang="EN-US"&gt;&lt;span  &gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-top: 11px; margin-bottom: 12px; "&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;The &lt;b&gt;Ucase&lt;/b&gt; function converts all the characters of a string to capital letters. On the other hand, the &lt;b&gt;Lcase&lt;/b&gt; function converts all the characters of a string to small letters. For example,&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-left: 72pt; margin-top: 11px; margin-bottom: 12px; "&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;Ucase(“Visual Basic”) =VISUAL BASiC&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-left: 72pt; margin-top: 11px; margin-bottom: 12px; "&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;Lcase(“Visual Basic”) =visual basic&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h4 style="margin-top: 11px; margin-right: 0cm; margin-bottom: 12px; margin-left: 0cm; page-break-after: avoid; font-size: 14pt; font-family: 'Times New Roman'; line-height: 19px; "&gt;&lt;a name="_Toc123994252"&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;(xi) The Str and Val functions&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-top: 11px; margin-bottom: 12px; "&gt;&lt;span lang="EN-US"&gt;&lt;span  &gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-top: 11px; margin-bottom: 12px; "&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;The &lt;b&gt;Str &lt;/b&gt;is the function that converts a number to a string while the &lt;b&gt;Val&lt;/b&gt; function converts a string to a number. The two functions are important when we need to perform mathematical operations.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;h4 style="margin-top: 11px; margin-right: 0cm; margin-bottom: 12px; margin-left: 0cm; page-break-after: avoid; font-size: 14pt; font-family: 'Times New Roman'; line-height: 19px; "&gt;&lt;a name="_Toc123994253"&gt;&lt;span &gt;&lt;span style="font-family: Verdana; "&gt;(xii)&lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt; The Chr and the Asc functions&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h4&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-top: 11px; margin-bottom: 12px; "&gt;&lt;span lang="EN-US"&gt;&lt;span  &gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-top: 11px; margin-bottom: 12px; "&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;The &lt;b&gt;Chr&lt;/b&gt; function returns the string that corresponds to an ASCII code while the &lt;b&gt;Asc&lt;/b&gt; function converts an ASCII character or symbol to the corresponding ASCII code. ASCII stands for “American Standard Code for Information Interchange”. Altogether there are 255 ASCII codes and as many ASCII characters. Some of the characters may not be displayed as they may represent some actions such as the pressing of a key or produce a beep sound. The format of the Chr function is&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-left: 72pt; margin-top: 11px; margin-bottom: 12px; "&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;Chr(charcode)&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-top: 11px; margin-bottom: 12px; "&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;and the format of the Asc function is&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-left: 72pt; margin-top: 11px; margin-bottom: 12px; "&gt;&lt;b&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;Asc(Character)&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-top: 11px; margin-bottom: 12px; "&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;The following are some examples:&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="line-height: 16px; margin-top: 11px; margin-bottom: 12px; "&gt;&lt;span lang="EN-US" style="font-family: Verdana; "&gt;&lt;span &gt;Chr(65)=A, Chr(122)=z, Chr(37)=% , Asc(“B”)=66, Asc(“&amp;amp;”)=38&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="line-height: 16px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: 'Times New Roman'; font-size: medium; "&gt;&lt;span style="font-family: Verdana; "&gt;&lt;span &gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="line-height: 16px; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; font-family: 'Times New Roman'; font-size: medium; "&gt;&lt;span style="font-family: Verdana; "&gt;&lt;span &gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3562210129043968367-2338471575637315173?l=crazy-programming-codes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crazy-programming-codes.blogspot.com/feeds/2338471575637315173/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3562210129043968367&amp;postID=2338471575637315173' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3562210129043968367/posts/default/2338471575637315173'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3562210129043968367/posts/default/2338471575637315173'/><link rel='alternate' type='text/html' href='http://crazy-programming-codes.blogspot.com/2010/05/string-manipulation-functions-in-vb-len.html' title='String Manipulation Functions in VB - Len, Right, Left, Mid, Trim, Ltrim, Rtrim, Ucase, Lcase, Instr, Val, Str  ,Chr and Asc'/><author><name>roguemei</name><uri>http://www.blogger.com/profile/02630238697113270207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3562210129043968367.post-5351650566944923975</id><published>2010-03-14T20:50:00.000-07:00</published><updated>2011-03-14T20:52:42.083-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c sharp'/><category scheme='http://www.blogger.com/atom/ns#' term='String Manipulation in'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='c language'/><title type='text'>Programming String Manipulation in C#</title><content type='html'>&lt;span class="Apple-style-span" style="color: rgb(46, 46, 46); font-family: Arial; font-size: 12px; "&gt;&lt;h2 style="margin-top: 10px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 0px; font-size: 1.3em; font-family: Arial; color: rgb(46, 46, 46); border-bottom-style: none; border-bottom-width: 1px; border-bottom-color: rgb(216, 216, 216); clear: left; border-top-style: none; border-right-style: none; border-left-style: none; border-width: initial; border-color: initial; "&gt;Trim Function&lt;/h2&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;The trim function has three variations &lt;code style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 10px; font-style: normal; font-weight: normal; "&gt;Trim&lt;/code&gt;, &lt;code style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 10px; font-style: normal; font-weight: normal; "&gt;TrimStart&lt;/code&gt; and &lt;code style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 10px; font-style: normal; font-weight: normal; "&gt;TrimEnd&lt;/code&gt;. The first example show how to use the &lt;code style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 10px; font-style: normal; font-weight: normal; "&gt;Trim()&lt;/code&gt;. It strips all white spaces from both the start and end of the string. &lt;br /&gt;&lt;br /&gt;&lt;code class="pre" style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; font-size: 11px; font-style: normal; font-weight: normal; background-color: rgb(255, 248, 225); font-family: 'Lucida Console', monospace; overflow-x: auto; overflow-y: auto; display: block; max-width: 620px; clear: both; "&gt;//STRIPS WHITE SPACES FROM BOTH START + FINSIHE &lt;br /&gt;string Name = " String Manipulation " ; &lt;br /&gt;string NewName = Name.Trim(); &lt;br /&gt;//ADD BRACKET SO YOU CAN SEE TRIM HAS WORKED &lt;br /&gt;MessageBox.Show("["+ NewName + "]");&lt;/code&gt;&lt;/p&gt;&lt;h2 style="margin-top: 10px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 0px; font-size: 1.3em; font-family: Arial; color: rgb(46, 46, 46); border-bottom-style: none; border-bottom-width: 1px; border-bottom-color: rgb(216, 216, 216); clear: left; border-top-style: none; border-right-style: none; border-left-style: none; border-width: initial; border-color: initial; "&gt;TrimEnd&lt;/h2&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;code style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 10px; font-style: normal; font-weight: normal; "&gt;TrimEnd&lt;/code&gt; works in much the same way but u are stripping characters which you specify from the end of the string, the below example first strips the space then the n so the output is String Manipulatio.&lt;/p&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;code class="pre" style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; font-size: 11px; font-style: normal; font-weight: normal; background-color: rgb(255, 248, 225); font-family: 'Lucida Console', monospace; overflow-x: auto; overflow-y: auto; display: block; max-width: 620px; clear: both; "&gt;//STRIPS CHRS FROM THE END OF THE STRING &lt;br /&gt;string Name = " String Manipulation " ; &lt;br /&gt;//SET OUT CHRS TO STRIP FROM END &lt;br /&gt;char[] MyChar = {' ','n'}; &lt;br /&gt;string NewName = Name.TrimEnd(MyChar); &lt;br /&gt;//ADD BRACKET SO YOU CAN SEE TRIM HAS WORKED &lt;br /&gt;MessageBox.Show("["+ NewName + "]");&lt;/code&gt;&lt;/p&gt;&lt;h2 style="margin-top: 10px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 0px; font-size: 1.3em; font-family: Arial; color: rgb(46, 46, 46); border-bottom-style: none; border-bottom-width: 1px; border-bottom-color: rgb(216, 216, 216); clear: left; border-top-style: none; border-right-style: none; border-left-style: none; border-width: initial; border-color: initial; "&gt;TrimStart&lt;/h2&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;code style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 10px; font-style: normal; font-weight: normal; "&gt;TrimStart&lt;/code&gt; is the same as &lt;code style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 10px; font-style: normal; font-weight: normal; "&gt;TrimEnd&lt;/code&gt; apart from it does it to the start of the string.&lt;/p&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;code class="pre" style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; font-size: 11px; font-style: normal; font-weight: normal; background-color: rgb(255, 248, 225); font-family: 'Lucida Console', monospace; overflow-x: auto; overflow-y: auto; display: block; max-width: 620px; clear: both; "&gt;//STRIPS CHRS FROM THE START OF THE STRING &lt;br /&gt;string Name = " String Manipulation " ; &lt;br /&gt;//SET OUT CHRS TO STRIP FROM END &lt;br /&gt;char[] MyChar = {' ','S'}; &lt;br /&gt;string NewName = Name.TrimStart(MyChar); &lt;br /&gt;//ADD BRACKET SO YOU CAN SEE TRIM HAS WORKED &lt;br /&gt;MessageBox.Show("["+ NewName + "]");&lt;/code&gt;&lt;/p&gt;&lt;h2 style="margin-top: 10px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 0px; font-size: 1.3em; font-family: Arial; color: rgb(46, 46, 46); border-bottom-style: none; border-bottom-width: 1px; border-bottom-color: rgb(216, 216, 216); clear: left; border-top-style: none; border-right-style: none; border-left-style: none; border-width: initial; border-color: initial; "&gt;Find String within string&lt;/h2&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;This code shows how to search within a string for a sub string and either returns an index position of the start or a -1 which indicates the string has not been found.&lt;/p&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;code class="pre" style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; font-size: 11px; font-style: normal; font-weight: normal; background-color: rgb(255, 248, 225); font-family: 'Lucida Console', monospace; overflow-x: auto; overflow-y: auto; display: block; max-width: 620px; clear: both; "&gt;string MainString = "String Manipulation"; &lt;br /&gt;string SearchString = "pul"; &lt;br /&gt;int FirstChr = MainString.IndexOf(SearchString); &lt;br /&gt;//SHOWS START POSITION OF STRING &lt;br /&gt;MessageBox.Show("Found at : " + FirstChr );&lt;/code&gt;&lt;/p&gt;&lt;h2 style="margin-top: 10px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 0px; font-size: 1.3em; font-family: Arial; color: rgb(46, 46, 46); border-bottom-style: none; border-bottom-width: 1px; border-bottom-color: rgb(216, 216, 216); clear: left; border-top-style: none; border-right-style: none; border-left-style: none; border-width: initial; border-color: initial; "&gt;Replace string in string&lt;/h2&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;Below is an example of replace a string within a string. It replaces the word Manipulatin with the correct spelling of Manipulation.&lt;/p&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;code class="pre" style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; font-size: 11px; font-style: normal; font-weight: normal; background-color: rgb(255, 248, 225); font-family: 'Lucida Console', monospace; overflow-x: auto; overflow-y: auto; display: block; max-width: 620px; clear: both; "&gt;string MainString "String Manipulatin"; &lt;br /&gt;string CorrectString = MainString.Replace("Manipulatin", "Manipulation"); &lt;br /&gt;//SHOW CORRECT STRING &lt;br /&gt;MessageBox.Show("Correct string is : " + CorrectString);&lt;/code&gt;&lt;/p&gt;&lt;h2 style="margin-top: 10px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 0px; font-size: 1.3em; font-family: Arial; color: rgb(46, 46, 46); border-bottom-style: none; border-bottom-width: 1px; border-bottom-color: rgb(216, 216, 216); clear: left; border-top-style: none; border-right-style: none; border-left-style: none; border-width: initial; border-color: initial; "&gt;Strip specified number of characters from string&lt;/h2&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;This example show how you can strip a number of characters from a specified starting point within the string. The first number is the starting point in the string and the second is the amount of chrs to strip. &lt;br /&gt;&lt;br /&gt;&lt;code class="pre" style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; font-size: 11px; font-style: normal; font-weight: normal; background-color: rgb(255, 248, 225); font-family: 'Lucida Console', monospace; overflow-x: auto; overflow-y: auto; display: block; max-width: 620px; clear: both; "&gt;string MainString = "S1111tring Manipulation"; &lt;br /&gt;string NewString = MainString.Remove(1,4); &lt;br /&gt;&lt;br /&gt;//SHOW OUTPUT &lt;br /&gt;MessageBox.Show(NewSring);&lt;/code&gt;&lt;/p&gt;&lt;h2 style="margin-top: 10px; margin-right: 0px; margin-bottom: 5px; margin-left: 0px; padding-top: 5px; padding-right: 0px; padding-bottom: 5px; padding-left: 0px; font-size: 1.3em; font-family: Arial; color: rgb(46, 46, 46); border-bottom-style: none; border-bottom-width: 1px; border-bottom-color: rgb(216, 216, 216); clear: left; border-top-style: none; border-right-style: none; border-left-style: none; border-width: initial; border-color: initial; "&gt;Split string with dilemeter&lt;/h2&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;The example below shows how to split the string into seperate parts via a specified dilemeter. The results get put into the Split array and called back via &lt;code style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-size: 10px; font-style: normal; font-weight: normal; "&gt;Split[0]&lt;/code&gt;.&lt;/p&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "&gt;&lt;code class="pre" style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 10px; padding-right: 10px; padding-bottom: 10px; padding-left: 10px; font-size: 11px; font-style: normal; font-weight: normal; background-color: rgb(255, 248, 225); font-family: 'Lucida Console', monospace; overflow-x: auto; overflow-y: auto; display: block; max-width: 620px; clear: both; "&gt;string MainString = "String Manipulation"; &lt;br /&gt;string [] Split = MainString.Split(new Char [] {' '}); &lt;br /&gt;//SHOW RESULT &lt;br /&gt;MessageBox.Show(Convert.ToString(Split[0])); &lt;br /&gt;MessageBox.Show(Convert.ToString(Split[1]));&lt;/code&gt;&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3562210129043968367-5351650566944923975?l=crazy-programming-codes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crazy-programming-codes.blogspot.com/feeds/5351650566944923975/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3562210129043968367&amp;postID=5351650566944923975' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3562210129043968367/posts/default/5351650566944923975'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3562210129043968367/posts/default/5351650566944923975'/><link rel='alternate' type='text/html' href='http://crazy-programming-codes.blogspot.com/2010/03/programming-string-manipulation-in-c.html' title='Programming String Manipulation in C#'/><author><name>roguemei</name><uri>http://www.blogger.com/profile/02630238697113270207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3562210129043968367.post-1218702384579448748</id><published>2009-02-05T20:33:00.000-08:00</published><updated>2009-02-06T02:02:20.635-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Full Text Catalogs in SQL Server'/><title type='text'>Full Text Catalogs in SQL Server</title><content type='html'>&lt;h1&gt;Gathering status and detail information for all Full Text Catalogs for an instance of SQL Server&lt;/h1&gt;&lt;br /&gt;&lt;p&gt;&lt;u&gt;&lt;b&gt;Problem&lt;br /&gt;&lt;/b&gt;&lt;/u&gt;I have several Full Text Search enabled databases and these databases contain several catalogs. Very often, I deploy these databases to many servers, so I need to know if these are deployed correctly and also find out as quickly as possible.  I need to know the population progress as well, but using management studio is too slow and also very hard to find out how much the catalogs have been populated. &lt;/p&gt; &lt;p&gt;&lt;u&gt;&lt;b&gt;Solution&lt;br /&gt;&lt;/b&gt;&lt;/u&gt;You can use a T-SQL Script to pull all the major information at once. The query below has been tested and works on SQL 2000, SQL 2005 and SQL 2008.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3562210129043968367-1218702384579448748?l=crazy-programming-codes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crazy-programming-codes.blogspot.com/feeds/1218702384579448748/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3562210129043968367&amp;postID=1218702384579448748' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3562210129043968367/posts/default/1218702384579448748'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3562210129043968367/posts/default/1218702384579448748'/><link rel='alternate' type='text/html' href='http://crazy-programming-codes.blogspot.com/2009/02/full-text-catalogs-in-sql-server.html' title='Full Text Catalogs in SQL Server'/><author><name>roguemei</name><uri>http://www.blogger.com/profile/02630238697113270207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3562210129043968367.post-6857435200932297900</id><published>2008-03-05T11:02:00.000-08:00</published><updated>2008-03-10T11:02:41.001-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Updatable Subscription'/><category scheme='http://www.blogger.com/atom/ns#' term='Replication Topology'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server 2005'/><category scheme='http://www.blogger.com/atom/ns#' term='Building'/><title type='text'>Building a SQL Server 2005 Updatable Subscription Replication Topology</title><content type='html'>ProblemMoving data into SQL Server is something that most DBAs or Developers are faced with probably on a daily basis.  One simple way of doing this is by using the Import / Export wizard, but along with this option there are several other ways of loading data into SQL Server tables. Another common technique would be to use either DTS (SQL 2000) or SSIS (SQL 2005).  In this tip we take a look at some of these other options for importing data into SQL Server.&lt;br /&gt;SolutionIn addition to using the Import / Export wizards and/or DTS or SSIS to move data into SQL Server there are also a few other options for doing this that are built into SQL Server.  Some these other options include bcp, BULK INSERT, OPENROWSET as well as others.  The following examples show you some of these different options for importing data and how you can use some of these inline with your T-SQL code as well as others that can be run from the command line.&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms162802.aspx" target="_blank"&gt;BCP&lt;/a&gt;This is one of the options that is mostly widely used.  One reason for this is that it has been around for awhile, so DBAs have come quite familiar with this command.  This command allows you to both import and export data, but is primarily used for text data formats.  In addition, this command is generally run from a Windows command prompt, but could also be called from a stored procedure by using xp_cmdshell or called from a DTS or SSIS package.&lt;br /&gt;Here is a simple command for importing data from file C:\ImportData.txt into table dbo.ImportTest.&lt;br /&gt;bcp dbo.ImportTest in 'C:\ImportData.txt' -T -SserverName\instanceName&lt;br /&gt;For more information about bcp &lt;a href="http://msdn2.microsoft.com/en-us/library/ms162802.aspx" target="_blank"&gt;click here&lt;/a&gt;.&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms188365.aspx" target="_blank"&gt;BULK INSERT&lt;/a&gt;This command is a T-SQL command that allows you to import data directly from within SQL Server by using T-SQL.  This command imports data from file C:\ImportData.txt into table dbo.ImportTest.&lt;br /&gt;BULK INSERT dbo.ImportTest FROM 'C:\ImportData.txt' WITH ( FIELDTERMINATOR =',', FIRSTROW = 2 )&lt;br /&gt;For more information about BULK INSERT &lt;a href="http://msdn2.microsoft.com/en-us/library/ms188365.aspx" target="_blank"&gt;click here&lt;/a&gt;.&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms190312.aspx" target="_blank"&gt;OPENROWSET&lt;/a&gt;This command is a T-SQL command that allows you to query data from other data sources directly from within SQL Server.  By using this command along with an INSERT INTO command we can load data from the specified data source into a SQL Server table.&lt;br /&gt;This command will pull in all data from worksheet [Sheet1$]. By using the INSERT INTO command you can insert the query results into table dbo.ImportTest.&lt;br /&gt;INSERT INTO dbo.ImportTest SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=C:\ImportData.xls', [Sheet1$])&lt;br /&gt;Here is another example where data is pulled from worksheet [Sheet1$] by using a SELECT * FROM command. Again, by using the INSERT INTO command you can insert the query results into table dbo.ImportTest.   The query can be any valid SQL query, so you can filter the columns and rows by using this option.&lt;br /&gt;INSERT INTO dbo.ImportTest SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=C:\ImportData.xls', 'SELECT * FROM [Sheet1$]')&lt;br /&gt;For more information about OPENROWSET &lt;a href="http://msdn2.microsoft.com/en-us/library/ms190312.aspx" target="_blank"&gt;click here&lt;/a&gt;.&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms179856.aspx" target="_blank"&gt;OPENDATASOURCE&lt;/a&gt;This command is a T-SQL command that allows you to query data from other data sources directly from within SQL Server. This is similar to the OPENROWSET command.&lt;br /&gt;INSERT INTO dbo.ImportTest SELECT * FROM OPENDATASOURCE('Microsoft.Jet.OLEDB.4.0', 'Data Source=C:\ImportData.xls;Extended Properties=Excel 8.0')...[Sheet1$]&lt;br /&gt;For more information about OPENDATASOURCE &lt;a href="http://msdn2.microsoft.com/en-us/library/ms179856.aspx" target="_blank"&gt;click here&lt;/a&gt;.&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms188427.aspx" target="_blank"&gt;OPENQUERY&lt;/a&gt;Another option is OPENQUERY.  This is another command that allows you to issue a T-SQL command to select data and again with the INSERT INTO option we can load data into our table.  There are two steps with this process, first a linked server is setup and then second the query is issued using the OPENQUERY command.  This option allow you to filter the columns and rows by the query that is issued against your linked data source.&lt;br /&gt;EXEC sp_addlinkedserver 'ImportData',    'Jet 4.0', 'Microsoft.Jet.OLEDB.4.0',    'C:\ImportData.xls',    NULL,    'Excel 8.0' GO&lt;br /&gt;INSERT INTO dbo.ImportTest SELECT * FROM OPENQUERY(ImportData, 'SELECT * FROM [Sheet1$]')&lt;br /&gt;For more information about OPENQUERY &lt;a href="http://msdn2.microsoft.com/en-us/library/ms188427.aspx" target="_blank"&gt;click here&lt;/a&gt;.&lt;br /&gt;&lt;a href="http://msdn2.microsoft.com/en-us/library/ms190479.aspx" target="_blank"&gt;Linked Servers&lt;/a&gt;Here is yet another option with setting up a linked server and then issuing a straight SQL statement against the linked server.  This again has two steps, first the linked server is setup and secondly a SQL command is issued against the linked data source.&lt;br /&gt;EXEC sp_addlinkedserver 'ImportData',    'Jet 4.0', 'Microsoft.Jet.OLEDB.4.0',    'C:\ImportData.xls',    NULL,    'Excel 8.0' GO&lt;br /&gt;INSERT INTO dbo.ImportTest SELECT * FROM ImportData...Sheet1$&lt;br /&gt;For more information about Linked Servers &lt;a href="http://msdn2.microsoft.com/en-us/library/ms190479.aspx" target="_blank"&gt;click here&lt;/a&gt;.&lt;br /&gt;As you can see right out of the box SQL Server offers many ways of importing data into SQL Server.  Take a look at these different options to see what satisfies your database requirements.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3562210129043968367-6857435200932297900?l=crazy-programming-codes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crazy-programming-codes.blogspot.com/feeds/6857435200932297900/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3562210129043968367&amp;postID=6857435200932297900' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3562210129043968367/posts/default/6857435200932297900'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3562210129043968367/posts/default/6857435200932297900'/><link rel='alternate' type='text/html' href='http://crazy-programming-codes.blogspot.com/2008/03/building-sql-server-2005-updatable_05.html' title='Building a SQL Server 2005 Updatable Subscription Replication Topology'/><author><name>roguemei</name><uri>http://www.blogger.com/profile/02630238697113270207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3562210129043968367.post-6091831506547018027</id><published>2008-02-19T19:30:00.000-08:00</published><updated>2008-02-19T19:31:16.638-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Sharing'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET'/><category scheme='http://www.blogger.com/atom/ns#' term='Session State'/><title type='text'>Sharing Session State between ASP and ASP.NET</title><content type='html'>&lt;h1&gt;Sharing Session State between ASP and ASP.NET&lt;/h1&gt; by Sidney Forcier &lt;!--Tuesday, February 24, 2004--&gt; &lt;hr color="#0000ff" size="3"&gt;  &lt;p&gt; Despite all of Microsoft's best efforts to make ASP and ASP.NET coexist effortlessly, one area remains a stumbling block... session state.  Fortunately the advantages of ASP.NET's upgraded session state management far outweigh the inconvenience of not being able to pass "Classic" session information to .NET.  Unfortunately there is no simple solution; the most I can offer is an easy to implement workaround. &lt;/p&gt; &lt;p&gt; In trying to find a suitable resolution, I've come across two good options that are worth mentioning.  The first involves parsing the session information out to hidden form fields on a "Classic" intermediate page and then submitting the page to a .NET intermediate page that loads the form fields into the session state.  This is a good, simple solution, however it doesn't work both ways.  In .NET you cannot specify the page that you submit to.  Each page has to PostBack to itself. &lt;/p&gt; &lt;p&gt; The second option is probably closer to an actual solution than to a workaround.  Billy Yuen at Microsoft has developed an &lt;a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspp/html/converttoaspnet.asp"&gt;effective solution&lt;/a&gt;. The code is elegant, the integration appears to be seamless, but I couldn't get it to work on my system (remember I said that there was no simple solution, not that there was no solution at all).  If this solution works for you, great! You won't need my code and you'll be happily passing session information from "Classic" to .NET like it's going out of vogue, thanks for stopping by. &lt;/p&gt; &lt;p&gt; Ok, if you're still reading let me briefly describe the workaround I've created.  It requires a database, but it is not important which type of database (though the code is written for SQL Server).  When a page (source page) wants to redirect to another page (destination page) that uses a different version of ASP, it calls an intermediate page.  The source intermediate page takes each session variable and adds it to the database along with a Globally Unique ID (GUID). Since "Classic" and .NET use different SessionID formats it is not possible to use SessionID, hence the use of a GUID.  The source intermediate page then passes the GUID to the destination intermediate page through a Querystring variable.  The destination intermediate page retrieves the session information from the database, cleans up after itself, and then redirects to the destination page.  It's similar to the first workaround, but supports transferring state in both directions.  &lt;/p&gt;&lt;h2&gt;Code Usage&lt;/h2&gt; &lt;h3&gt;Installation&lt;/h3&gt; &lt;ol&gt;&lt;li&gt;Run the SQL Query in "ASPSessionState.sql" on the database which will hold the temporary Session information.&lt;/li&gt;&lt;li&gt;Copy the .asp and .aspx.* (SessionTransfer.aspx and SessionTransfer.aspx.cs) files to a folder on your website.&lt;/li&gt;&lt;li&gt;Update connection object information in the "SessionTransfer.asp" and "SessionTransfer.aspx.cs" files. It is located in three places in each file (sorry about not consolidating the connection info).&lt;/li&gt;&lt;li&gt;Compile the aspx files.&lt;/li&gt;&lt;li&gt;The .asp and .aspx.* files must all reside in the same folder to work.&lt;/li&gt;&lt;/ol&gt; &lt;h3&gt;Usage&lt;/h3&gt; &lt;p&gt; For use in a Hyperlink (Anchor Tag) or a Response.Redirect, set the destination URL to be one of the following: &lt;/p&gt; &lt;p&gt; From a ASP "Classic" page: &lt;/p&gt; &lt;pre&gt; SessionTransfer.asp?dir=2aspx&amp;amp;url=&lt;asp_dotnet_url&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt; From an ASP.NET page: &lt;/p&gt; &lt;pre&gt; SessionTransfer.aspx?dir=2asp&amp;amp;url=&lt;asp_classic_url&gt;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt; The code will transfer the Session information and Redirect the user to the url specified by &lt;asp_dotnet_url&gt; or &lt;asp_classic_url&gt;. &lt;/p&gt;  &lt;h2&gt;Download&lt;/h2&gt; &lt;p&gt; You can download the code from here: &lt;a href="http://www.asp101.com/articles/sidney/sharingsessionstate/session_transfer.zip"&gt;session_transfer.zip&lt;/a&gt; (4.6 KB). &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3562210129043968367-6091831506547018027?l=crazy-programming-codes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crazy-programming-codes.blogspot.com/feeds/6091831506547018027/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3562210129043968367&amp;postID=6091831506547018027' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3562210129043968367/posts/default/6091831506547018027'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3562210129043968367/posts/default/6091831506547018027'/><link rel='alternate' type='text/html' href='http://crazy-programming-codes.blogspot.com/2008/02/sharing-session-state-between-asp-and.html' title='Sharing Session State between ASP and ASP.NET'/><author><name>roguemei</name><uri>http://www.blogger.com/profile/02630238697113270207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3562210129043968367.post-9116248508622366090</id><published>2008-01-10T22:07:00.000-08:00</published><updated>2008-01-13T22:10:09.824-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Health'/><category scheme='http://www.blogger.com/atom/ns#' term='Google Results'/><category scheme='http://www.blogger.com/atom/ns#' term='Hazardous'/><title type='text'>Are Google Results Hazardous To Your Health?</title><content type='html'>&lt;b&gt;Pharmaceutical types think so &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;First thing's first: I'm suspicious of the pharmaceutical industry in  general. A lot of people are, but as a journalist, suspicion is part of the job.  Also, I have the researcher's tendency toward cyberchondriasis, so take my  non-medical expertise for what it's worth.&lt;/p&gt; &lt;p&gt;Which isn't much. I put that out there so others won't have to.&lt;/p&gt; &lt;p&gt;I also make that disclaimer in advance of what is a grander, more important  topic: To what extent is the so-called "Googlization of reality" affecting our  understanding of the world around us? The answer may not be so available and  everybody with a stake in it will give you different answers.&lt;/p&gt; &lt;p&gt;If you took the Internet's word for everything, you might believe that Ron  Paul is a Republican frontrunner or that the elephant population has tripled in  the past six months (see Stephen Colbert's "wikiality" social experiment).&lt;/p&gt; &lt;p&gt;Clearly, information on the Internet (even Google) isn't perfect, and knowing  your source is paramount, hence my opening disclaimer.&lt;/p&gt; &lt;p&gt;The &lt;a href="http://www.cmpi.org/donate.asp"&gt;Center for Medicine in the  Public Interest&lt;/a&gt; (CMPI) is a medical industry thinktank, fronted by former  Bush Administration FDA officials. CMPI released a study this week outlining the  perils of relying on Google for prescription medication information.&lt;/p&gt; &lt;p&gt;“What we found was not only disturbing, but dangerous to public health,” said  CMPI vice president Robert Goldberg. “For millions of Americans, Google has  replaced the family physician. People trust, and make decisions, based on the  information they find online. With few exceptions, the information we found  appeared legitimate but had no medical authority whatsoever. In many cases, we  found lawyers posing as medical experts.”   &lt;/p&gt; &lt;p&gt;For searches on keywords like "Crestor side effects" and "Avandia side  effects" CMPI found:&lt;/p&gt; &lt;ul&gt;&lt;li&gt;65% of the first three pages of search results came from sites which were  biased or contained unverified information. &lt;/li&gt;&lt;li&gt;Almost half of the first three pages of search results belonged to lawyers  and attorney referral services seeking plaintiffs for class action lawsuits. &lt;/li&gt;&lt;li&gt;Zero official regulatory pages or professional medical organizations  appeared in the inventory of results.&lt;/li&gt;&lt;/ul&gt; &lt;p&gt;Crestor is a cholesterol medication made by AstraZeneca and Avandia is a type  2 diabetes drug produced by GlaxoSmithKline.&lt;/p&gt; &lt;p&gt;Many of the results also referred to "unmoderated" patient forums, sites  selling or promoting "alternative medicines" or were sites run by, as CMPI  describes them, "anti-pharmaceutical activists."&lt;/p&gt; &lt;p&gt;All of these concerns and findings are published in a 33-page paper entitled  "Insta-Americans:  The Empowered (and Imperiled) Health Care Consumer in the Age of Internet  Medicine." Similar concerns were voiced about selective serotonin reuptake  inhibitors and their (Internet) relationship to teen suicide rates and links  between vaccinations and autism.&lt;/p&gt; &lt;p&gt;"Much like our email boxes are filled by 'spam' urging us to collect millions  from Nigeria or confirm our banking information from phony Ebay or Bank of  America security sites, a lot of the medical 'information' on the Web is  designed to sell, deceive or frighten, rather than inform," said Goldberg.&lt;/p&gt; &lt;p&gt;Citing a Pew report, CMPI 113 million Americans search for health  information, but three quarters rarely check the sources of the information.&lt;/p&gt; &lt;p&gt;According to Peter Pitts, CMPI President and former Associate Commissioner  for External Affairs for the FDA, "it is important to remember that not  everything online is true. The Internet has made it easier than ever before for  charlatans and quacks to spread fear and misinformation. Mark Twain wrote:  ―'Beware of health books. You might die of a misprint.' The same can now be said  of the Web."&lt;/p&gt; &lt;p&gt;And that can really affect pharmaceutical sales. Because doctors were afraid  of lawsuits and patients were afraid of, you know, death, Avandia prescriptions  had declined by 60 percent as September 2007.&lt;/p&gt; &lt;p&gt;Of course, it could also have something to do with the black box warning the  FDA put on Avandia about increased heart problems. If you use a less targeted  keyword, like simply "avandia,"  you'll find that official government warning (and one for Crestor, too),  along with official pharmaceutical company pages, scores of lawyer-sponsored  AdWords links, pages from WebMD, the Mayo Clinic, the New York Times, USA Today,  and a group called Public Citizen  which runs a site called WorstPills.org.&lt;/p&gt; &lt;p&gt;Pitts  and Goldberg aren't especially fond of that last group, and single out Dr.  Sidney Wolfe, who runs the site, as a source of misinformation about Avandia.  Wolfe joins several others with lots of letters behind their names on the site's  About page. Maybe it's  because Wolfe has a close relationship with Ralph Nader, that CMPI labels them  an anti-pharmaceutical activist group. Who knows?&lt;/p&gt; &lt;p&gt;But Wolfe's opinion of Avandia match a Cleveland Clinic doctor named Stephen  Nissen, whose May 2007 New England Journal of Medicine article about the drug  CMPI cites as a "common source of misinformation." Dr. Nissen's viewpoint  however is echoed by a  Toronto endocrinologist in this more recent (December 2007) USA Today  article.&lt;/p&gt; &lt;p&gt;So why fixate on these drugs in particular? You could present a number of  theories. CMPI is partially funded by the pharmaceutical industry, the Lilly Endowment  (connected to Eli Lilly) being one of the largest contributors. Patients shying  away from pharmaceuticals is bad for business.&lt;/p&gt; &lt;p&gt;A clue could be in reporter Evelyn Pringle's  article about Avandia, the FDA and CMPI. Pringle labels CMPI as "a home for  industry hit men who served in the Bush Administration's FDA." Pringle explains  in detail Pitts' and Goldberg's association with Manning, Selvege &amp;amp; Lee, a  PR firm representing many pharmaceutical companies, including AstraZeneca, and  with FDA spokesman Douglas Arbesfeld, who has a close relationship with GSK.&lt;/p&gt; &lt;p&gt;But I'm sure that has nothing to do with their opinion on what is  misinformation and what isn't.&lt;/p&gt; &lt;p&gt;The extra-cynical of us might also notice CMPI's definite stance against  regulation of the health care industry and any type of universal health care.  Those cynics might get really crazy and suggest that by advocating a greater  reliance on your doctor and the drugs he or she prescribes rather than moonbat  alternatives cuts down on the perception that there are flaws in the health care  industry in its current privatized state. Plus, with obesity rates the way they  are, diabetes medicines are big, big money.&lt;/p&gt; &lt;p&gt;But that's just crazy right?&lt;/p&gt; &lt;p&gt;Well, anyway, CMPI says to check  your sources, especially those sources found on Google, the nation's most  popular search engine, where most online health research begins. Sometimes  people manipulate the information to suit them.  &lt;br /&gt; &lt;/p&gt; &lt;p&gt;But you might also conclude that a variety of sources is a good thing. I  could be wrong. After all, I did all my research for this article on Google.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3562210129043968367-9116248508622366090?l=crazy-programming-codes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crazy-programming-codes.blogspot.com/feeds/9116248508622366090/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3562210129043968367&amp;postID=9116248508622366090' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3562210129043968367/posts/default/9116248508622366090'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3562210129043968367/posts/default/9116248508622366090'/><link rel='alternate' type='text/html' href='http://crazy-programming-codes.blogspot.com/2008/01/are-google-results-hazardous-to-your.html' title='Are Google Results Hazardous To Your Health?'/><author><name>roguemei</name><uri>http://www.blogger.com/profile/02630238697113270207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3562210129043968367.post-8589129815954065255</id><published>2007-12-26T09:42:00.000-08:00</published><updated>2007-12-26T09:49:43.618-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Job'/><category scheme='http://www.blogger.com/atom/ns#' term='8 Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='Landing'/><category scheme='http://www.blogger.com/atom/ns#' term='career'/><category scheme='http://www.blogger.com/atom/ns#' term='2008'/><title type='text'>8 Tips for Landing a Job in 2008</title><content type='html'>&lt;p&gt;&lt;strong&gt;1. Come prepared for the interview.&lt;/strong&gt; This sounds like a no-brainer, but hiring managers are increasingly looking for candidates who can do more than a "tech interview."&lt;/p&gt;  &lt;p&gt;They may ask you to explain your past experiences or how you would handle certain situations on the job, says Jill Herrin, CEO of JDResources, Inc., a Memphis-based recruiter. These and other inquiries help employers to determine your communications skills as well as your technical knowledge.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;2. Talk business.&lt;/strong&gt; Prospective employers also want to know whether you understand how systems and applications affect various business divisions, Herrin says. "Technical interviews are still an important component to an interview process, but rarely are they the only determining factor anymore," he explains.&lt;/p&gt;  &lt;p&gt;"We want somebody with technical acumen but I would like to know that these people know the basis for making money," says Frank Hood, CIO at Quiznos in Denver.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;3. Work your relationships&lt;/strong&gt;. Employers and job candidates alike are jumping on the use of social networks such as LinkedIn and Facebook to connect with college alumni, former business associates and mentors "to get better access to the inside jobs," says Dan Reynolds, CEO of Princeton, N.J.-based staffing firm The Brokers Group LLC.&lt;/p&gt;  &lt;p&gt;You should too.&lt;/p&gt;  &lt;p&gt;And if you're an entry-level candidate, social networks are a great way for you to get a foot in the door, says Michael Nieset, managing partner for Heidrick &amp;amp; Struggles' technology practice in Cleveland. You can identify and connect with potential employers through entry-level job listings on social networks.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;4. Dot your "i"s.&lt;/strong&gt; Make sure your resume and project accomplishments are clearly documented using proper English and correct spelling.&lt;/p&gt;  &lt;p&gt;"You won't even make it past the first gate" if your resume' is sloppy, says Robert Rosen, immediate past president of SHARE and CIO at the National Institute of Arthritis and Musculoskeletal and Skin Diseases in Bethesda, Md.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;5. Strut your stuff.&lt;/strong&gt; Effective resumes are direct and succinct. Hiring managers want to see what you've achieved. "Employers want to see 'I managed this, I coordinated that'," says Reynolds. "They don't want to see 'assisted with this' or 'supported that.'" I&lt;/p&gt;  &lt;p&gt;f you weren't the project leader on a particular effort, underscore what you did contribute. If you're a systems administrator, point out the importance of your role in a critical project and whether the effort was delivered under budget or ahead of schedule, says Katherine Spencer Lee, executive director at Robert Half Technology in Menlo Park, Calif.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;6. Keep learning.&lt;/strong&gt; Employers want IT workers who have a demonstrated thirst for knowledge and a willingness to learn new things. Pick up certifications in hot technologies or take an evening course at a local community college to improve your business acumen.&lt;/p&gt;  &lt;p&gt;Then flaunt it. "Education is absolutely vital to further your career in IT," says Neill Hopkins, vice president of skills development at the Computing Technology Industry Association Inc. in Oakbrook Terrace, Ill.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;7. Do what it takes to appear employable.&lt;/strong&gt; If you're currently unemployed and seeking a full-time position, find a temporary position or work as a contractor, says Joel Reiter, an application analyst at U.S. Bancorp in St. Paul, Minn. It's "a good way of erasing a period of time where you didn't have a job." he says.&lt;/p&gt;  &lt;p&gt;It's also important to demonstrate determination and flexibility, says Joe Trentacosta, CIO at the Southern Maryland Electric Cooperative in Hughesville. "Programmers need to be willing to step out of their comfort zone and learn new technologies, to work nights and weekends if necessary," he says. "It shows that they're willing to be aggressive and to learn new technologies."&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;8. Get a foot in the door.&lt;/strong&gt; Don't hesitate to take a temporary position, a contract or a temp-to-hire job. As demand for IT workers has ticked up, rates for contractors are also on the rise, having jumped 3% to 5% over the past five months for IT contractors in general and by 10% to 15% for people with highly sought skills such as J2ee and open source programming abilities, says Reynolds.&lt;/p&gt;  &lt;p&gt;"Once you come in as a temp or a contractor, no one is really looking at your resume. They're looking at whether you can or can't do a particular job," says Reiter.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3562210129043968367-8589129815954065255?l=crazy-programming-codes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crazy-programming-codes.blogspot.com/feeds/8589129815954065255/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3562210129043968367&amp;postID=8589129815954065255' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3562210129043968367/posts/default/8589129815954065255'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3562210129043968367/posts/default/8589129815954065255'/><link rel='alternate' type='text/html' href='http://crazy-programming-codes.blogspot.com/2007/12/8-tips-for-landing-job-in-2008.html' title='8 Tips for Landing a Job in 2008'/><author><name>roguemei</name><uri>http://www.blogger.com/profile/02630238697113270207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3562210129043968367.post-7799734392448180210</id><published>2007-12-26T09:29:00.000-08:00</published><updated>2007-12-26T09:33:24.285-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='IBM'/><category scheme='http://www.blogger.com/atom/ns#' term='information tech'/><category scheme='http://www.blogger.com/atom/ns#' term='technology'/><category scheme='http://www.blogger.com/atom/ns#' term='news'/><category scheme='http://www.blogger.com/atom/ns#' term='future'/><title type='text'>IBM dishes five predictions for the future</title><content type='html'>&lt;h2&gt; IBM's last installment of its annual 'Next Five in Five' list looks forward to intelligent traffic systems and energy grids, more organic food, and better technology for doctors&lt;/h2&gt;&lt;br /&gt;&lt;span class="artText"&gt;&lt;p page="1" class="ArticleBody"&gt;Drained by your commute? Blood-sucking utility bills got you down? Wondering if that tomato in your dinner salad was really organic?&lt;/p&gt;&lt;p page="1" class="ArticleBody"&gt;The cures to those ills and more may arrive within five years, according to IBM.&lt;/p&gt;&lt;p page="1" class="ArticleBody"&gt;The company recently released its second annual set of "Next Five in Five" predictions, visions that sketch out a future where driving is a relative pleasure, eco-friendly devices save you money, and super doctors use advanced technology to probe your body's innermost depths in search of disease.&lt;/p&gt;&lt;p page="1" class="ArticleBody"&gt;IBM's contention that driving will become safer and less aggravating may be particularly tantalizing for many.&lt;/p&gt;&lt;p page="1" class="ArticleBody"&gt;The company said that during the next five years, a "wave of connectivity" between vehicles and roadways will help keep traffic flowing smoothly, drive down pollution, and get you to your destination easier, "without the stress."&lt;/p&gt;&lt;p page="1" class="ArticleBody"&gt;This will be accomplished through "intelligent" traffic systems that automatically adjust light patterns and shift traffic to alternative routes, as well as cars that exhibit "reflexes" thanks to communication with other vehicles and roadside sensors, according to IBM.&lt;/p&gt;&lt;p page="1" class="ArticleBody"&gt;The company's crystal ball also revealed that the long-simmering trend toward "smart energy" devices will proliferate wildly. "Dishwashers, air conditioners, house lights, and more will be connected directly to a 'smart' electric grid, making it possible to turn them on and off using your cell phone or any Web browser," a company statement asserts.&lt;/p&gt;&lt;p page="1" class="ArticleBody"&gt;Even the act of eating will take on new meaning, in IBM's view: "You will know everything from the climate and soil the food was grown in, to the pesticides and pollution it was exposed to, to the energy consumed to create the product, to the temperature and air quality of the shipping containers it traveled through on the way to your dinner table."&lt;/p&gt;&lt;p page="1" class="ArticleBody"&gt;The report also suggests that doctors' ability to heal us will become even more astounding. Due to advances in X-ray and audio technologies, doctors will gain "superpowers," according to IBM. Computers will also be able to compare your health data to an ocean's worth of other patient records, helping with diagnosis and treatment, the company said.&lt;/p&gt;&lt;p page="1" class="ArticleBody"&gt;In addition, the company said cell phones will continue to grow in power and functionality. For example, phones will enable users to snap a photo of an article of clothing, pull in results from the Web about the brand and where to buy it, and then render the garment on top of a 3-D image of the user, IBM said.&lt;/p&gt;&lt;p page="1" class="ArticleBody"&gt;IBM's list received a measured nod from Edward Cornish, editor of The Futurist magazine and past president of the World Future Society, an organization based in Bethesda, Maryland.&lt;/p&gt;&lt;p page="1" class="ArticleBody"&gt;"Basically, the five forecasts seem to me to be quite reasonable," Cornish said. "They're based on technologies that have been around for a number of years and are simply extrapolations."&lt;/p&gt;&lt;p page="1" class="ArticleBody"&gt;The Futurist has released its own list of predictions for 2008 and beyond.&lt;/p&gt;&lt;p page="1" class="ArticleBody"&gt;The organization contends, among other things, that the world will have a billion millionaires by 2025; the earth is on the verge of a "significant extinction event;" and "nonhuman entities," such as robots fueled by artificial intelligence, will make more decisions.&lt;/p&gt;&lt;p page="1" class="ArticleBody"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p page="1" class="ArticleBody"&gt;&lt;br /&gt;&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3562210129043968367-7799734392448180210?l=crazy-programming-codes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crazy-programming-codes.blogspot.com/feeds/7799734392448180210/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3562210129043968367&amp;postID=7799734392448180210' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3562210129043968367/posts/default/7799734392448180210'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3562210129043968367/posts/default/7799734392448180210'/><link rel='alternate' type='text/html' href='http://crazy-programming-codes.blogspot.com/2007/12/ibm-dishes-five-predictions-for-future.html' title='IBM dishes five predictions for the future'/><author><name>roguemei</name><uri>http://www.blogger.com/profile/02630238697113270207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3562210129043968367.post-4362041136592239440</id><published>2007-12-20T09:27:00.000-08:00</published><updated>2007-12-26T09:28:42.143-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='increment'/><category scheme='http://www.blogger.com/atom/ns#' term='compute'/><category scheme='http://www.blogger.com/atom/ns#' term='Computerworld'/><category scheme='http://www.blogger.com/atom/ns#' term='programming'/><category scheme='http://www.blogger.com/atom/ns#' term='boost'/><category scheme='http://www.blogger.com/atom/ns#' term='career'/><title type='text'>8 Ways to Boost Your Career in '08</title><content type='html'>&lt;p&gt;&lt;b&gt;December 21, 2007&lt;/b&gt; (Computerworld) Today's IT professionals are an evolving breed. The job keeps morphing as companies demand not just technical know-how, but more business acumen, analytical skills and industry knowledge as well. &lt;/p&gt;&lt;p&gt;Kudos if you've pulled that all together, but don't rest just yet. The evolution isn't over, as the upcoming year promises more changes. If you want to stay in the driver's seat of your own career, put these items on your to-do list:&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;1. Incorporate security into your responsibilities&lt;/strong&gt;. Security and related disciplines, such as business continuity and disaster-recovery planning, are permeating all levels of the organization. That means all IT workers, and not just the security folks, will have to contribute by understanding how business processes, technical requirements and security intersect.&lt;/p&gt;  &lt;p&gt; &lt;!-- &lt;div style="margin:0px 10px 10px 0px; color:#333333; font-size:13px; width:150px; float:left;"&gt; &lt;div class="dottedline"&gt;&lt;/div&gt; &lt;div class="padtop10"&gt;&lt;/div&gt; &lt;img src="/common/images/site/teasers/forecats_08.jpg" width="150" height="62" alt="Forecast 2008" border="0" /&gt;    &lt;ul style="MARGIN-BOTTOM:0px; PADDING-BOTTOM:0px; MARGIN-TOP:5px; PADDING-TOP:5px;"&gt;       &lt;li&gt;&lt;a href="/action/article.do?command=viewArticleBasic&amp;articleId=307724"&gt;Google's Next Moves&lt;/a&gt;&lt;/li&gt;      &lt;li&gt;&lt;a href="/action/article.do?command=viewArticleBasic&amp;articleId=9049299"&gt;8 Sizzling Technologies&lt;/a&gt;&lt;/li&gt;   &lt;li&gt;&lt;a href="/action/article.do?command=viewArticleBasic&amp;articleId=308800"&gt;8 Hottest IT Skills&lt;/a&gt;&lt;br /&gt;&lt;div style="MARGIN-BOTTOM:0px; PADDING-BOTTOM:0px; MARGIN-TOP:0px; PADDING-TOP:0px; margin-left: 4px;"&gt;&lt;a href="/action/article.do?command=viewArticleBasic&amp;articleId=307668"&gt;- Tech Skills Shortage Simmers&lt;/a&gt;&lt;/div&gt;   &lt;/li&gt;   &lt;li&gt;&lt;a href="/action/article.do?command=viewArticleBasic&amp;articleId=9050399"&gt;8 Ways to Boost Your Career&lt;/a&gt;&lt;/li&gt;   &lt;li&gt;&lt;a href="/action/article.do?command=viewArticleBasic&amp;articleId=9053678"&gt;Personal Tech 2008&lt;/a&gt;&lt;/li&gt;   &lt;li&gt;&lt;a href="/action/article.do?command=viewArticleBasic&amp;articleId=308811"&gt;8 Juicy Predictions&lt;/a&gt;&lt;/li&gt;   &lt;li&gt;&lt;a href="/action/article.do?command=viewArticleBasic&amp;articleId=308184"&gt;8 Hot-Button Issues to Watch&lt;/a&gt;&lt;/li&gt;   &lt;/ul&gt;      &lt;a href="/action/article.do?command=viewArticleBasic&amp;articleId=308800&amp;pageNumber=2#toc"&gt;More '08 predictions&lt;/a&gt; &lt;img src="/common/images/common/arrow_blue_right.gif" border="0" /&gt;         &lt;div class="padtop10"&gt;&lt;/div&gt;           &lt;div class="dottedline"&gt;&lt;/div&gt; &lt;/div&gt; --&gt; "Everyone has to understand security to a certain degree and apply it to their responsibilities," says Sam Helmich, vice president of technology at ADM Investor Services Inc. in Chicago. The learning requirements vary by IT positions, but Helmich recommends that you seek out security classes and certification. Finding mentors from the security team is another good way to prepare&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;2. Re-engineer processes.&lt;/strong&gt; IT has always been responsible for keeping everything running and developing new systems, says Michael Cummins, CIO at the Georgia Institute of Technology's College of Management and a clinical professor of management, but now he sees a new responsibility emerging: re-engineering business processes and workflow.&lt;/p&gt;  &lt;p&gt;"We've seen movement to business processes and workflow analysis as you try to show how systems can help re-engineer how you do the work and make it more efficient," Cummins says. "That's where we see all these big productivity gains."&lt;/p&gt;  &lt;p&gt;To deliver this, you must understand how your business-side colleagues actually do their jobs, he says. You can start by signing up as a project lead, finding a business-side mentor or working as a systems analyst.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;3. Use analytics to guide business decisions.&lt;/strong&gt; "We're seeing more and more companies that are stellar examples of using data analysis to run their business," Cummins says. Casinos, for example, collect and analyze detailed data on individual players and then tailor their marketing based on those findings. Other industries are following suit, which means you'll have to set up the systems and understand what data to mine and analyze.&lt;/p&gt;  &lt;p&gt;To brush up on analytics get onto projects that expose you to the needs and goals driving non-IT departments, study vendor information on how business intelligence applications can provide data to drive decisions, and get training in Six Sigma, a data-driven methodology for eliminating defects.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;4. Be more versatile.&lt;/strong&gt; There will always be a need for deep technical skills , but you'll be obsolete if all you can offer is one particular expertise, says Pamela Taylor, a solutions architect at a subsidiary of a Fortune 50 company and vice president of SHARE, an IBM user group.&lt;/p&gt;  &lt;p&gt;"Keep yourself open to new approaches," Taylor says. "While there is some need for specialization and to demonstrate an expertise for the particular role you're in now, you must keep yourself aware of and consistently educated in new things that are emerging."&lt;/p&gt;  &lt;!--pagebreak--&gt;  &lt;p&gt;&lt;strong&gt;5. Work on multifunctional programs and multidisciplinary teams.&lt;/strong&gt; Companies are putting together more teams of workers from diverse departments to deliver technology-related projects, says Diane Morello, an analyst at Gartner Inc. in Stamford, Conn. Getting assigned to those teams is a key to getting broad business knowledge and becoming known outside IT.&lt;/p&gt;  &lt;p&gt;"Individuals are going to work much more consistently around multidisciplinary teams, and that means their competencies need to be understood and known by people outside their skill sets," Morello says.&lt;/p&gt;  &lt;p&gt;In short, you must be skilled in teamwork, effective communication and change management. Try to work for managers who operate across business units. Or, if you can, get assigned to a boundary-spanning role, and seek some relief from daily operational duties so you can focus on the big picture.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;6. Beef up your business skills.&lt;/strong&gt; The need to do this has been building for a while, but 2008 will put an even greater emphasis on business acumen, says Kate M. Kaiser, an associate professor of IT at Marquette University and coordinator of the Society for Information Management study "The Information Technology Workforce: Trends and Implications 2005-2008."&lt;/p&gt;  &lt;p&gt;The need for business knowledge is moving farther down the IT workforce chain, she says. Even newly minted IT workers will have to have business smarts. Moreover, companies are looking for IT workers who have expertise in functional areas, such as marketing or finance, says David Foote, CEO and chief research officer of research firm Foote Partners LLC in New Canaan, Conn.&lt;/p&gt;  &lt;p&gt;Getting a degree in business management -- an MBA if you have a tech-related bachelor's degree, or a bachelor's in business if you have an associate's degree in technology -- can help prepare you for this new reality, Kaiser says. But so can on-the-job management experience, such as leading projects.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;7. Be more accountable.&lt;/strong&gt; The folks in finance, marketing, HR and other corporate departments already use data to evaluate performance. IT workers will increasingly have to do the same, Cummins says. Granted, evaluating an IT shop can be hard, because of the lack of productivity measures and because of the difficulty of measuring certain, sometimes intangible, gains. But be prepared to show your value.&lt;/p&gt;  &lt;p&gt;Learn Six Sigma-type tools and benchmarking, and learn from business managers who have reputations for running efficient departments.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;8. Manage your own career.&lt;/strong&gt; You can't rely on your manager, company or vendors to determine a path for you, because those predetermined paths might be too narrow or even obsolete, Foote says. You yourself must prepare for tomorrow by evaluating your skills and filling in what's missing through certification, education and on-the job experience.&lt;/p&gt;  &lt;p&gt;"This is the year you can no longer sleepwalk through your career," Morello adds. "Each person has to take ownership of his or her career path."&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3562210129043968367-4362041136592239440?l=crazy-programming-codes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crazy-programming-codes.blogspot.com/feeds/4362041136592239440/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3562210129043968367&amp;postID=4362041136592239440' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3562210129043968367/posts/default/4362041136592239440'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3562210129043968367/posts/default/4362041136592239440'/><link rel='alternate' type='text/html' href='http://crazy-programming-codes.blogspot.com/2007/12/8-ways-to-boost-your-career-in-08.html' title='8 Ways to Boost Your Career in &apos;08'/><author><name>roguemei</name><uri>http://www.blogger.com/profile/02630238697113270207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3562210129043968367.post-1286782946200247964</id><published>2007-12-17T08:40:00.001-08:00</published><updated>2007-12-17T08:40:56.244-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Fiber Distributed- Data Interface'/><category scheme='http://www.blogger.com/atom/ns#' term='FDDI'/><title type='text'>Fiber Distributed- Data Interface (FDDI)</title><content type='html'>&lt;span style="font-weight: bold;"&gt;FDDI (Fiber-Distributed Data Interface)&lt;/span&gt; is a standard for data transmission on fiber optic lines in that can extend in range up to 200 km (124 miles). The FDDI protocol is based on the token ring protocol. In addition to being large geographically, an FDDI local area network can support thousands of users.  &lt;div class="text"&gt; &lt;/div&gt;  &lt;div class="text"&gt;An FDDI network contains two token rings, one for possible backup in case the primary ring fails. The primary ring offers up to 100 Mbps capacity. If the secondary ring is not needed for backup, it can also carry data, extending capacity to 200 Mbps. The single ring can extend the maximum distance; a dual ring can extend 100 km (62 miles).&lt;/div&gt;  &lt;div class="text"&gt; &lt;/div&gt;  &lt;div class="text"&gt;FDDI is a product of American National Standards  Committee X3-T9 and conforms to the open system interconnect (&lt;i&gt;OSI&lt;/i&gt;) model of functional layering. It can be used to interconnect LANs using other protocols. FDDI-II is a version of FDDI that adds the capability to add circuit-switched service to the network so that voice signals can also be handled. Work is underway to connect FDDI networks to the developing Synchronous Optical Network.&lt;/div&gt;  &lt;h2 class="text"&gt;&lt;strong&gt;Function of FDDI&lt;/strong&gt;&lt;/h2&gt;  &lt;h5 class="text"&gt;&lt;strong&gt;Background&lt;/strong&gt;&lt;/h5&gt;  &lt;div class="text"&gt;The Fiber Distributed Data Interface (FDDI) specifies a 100-Mbps token-passing, dual-ring LAN using fiber-optic cable. FDDI is frequently used as high-speed backbone technology because of its support for high bandwidth and greater distances than copper. It should be noted that relatively recently, a related copper specification, called Copper Distributed Data Interface (CDDI) has emerged to provide 100-Mbps service over copper. CDDI is the implementation of FDDI protocols over twisted-pair copper wire. This chapter focuses mainly on FDDI specifications and operations, but it also provides a high-level overview of CDDI.&lt;/div&gt;  &lt;div class="text"&gt;FDDI uses a dual-ring architecture with traffic on each ring flowing in opposite directions (called &lt;em&gt;counter-rotating&lt;/em&gt;). The dual-rings consist of a primary and a secondary ring. During normal operation, the primary ring is used for data transmission, and the secondary ring remains idle. The primary purpose of the dual rings, as will be discussed in detail later in this chapter, is to provide superior reliability and robustness. Figure 1 shows the counter-rotating primary and secondary FDDI rings.&lt;/div&gt;  &lt;div class="text"&gt;&lt;br /&gt;       &lt;b&gt;Figure 1: FDDI uses counter-rotating primary and secondary rings.&lt;/b&gt;&lt;/div&gt;  &lt;div class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;br /&gt;&lt;img alt="FDDI uses counter-rotating primary and secondary rings" src="http://www.laynetworks.com/images/fddi1.gif" height="211" width="339" /&gt;&lt;/div&gt;  &lt;h5 class="text"&gt;&lt;strong&gt;FDDI Specifications&lt;/strong&gt;&lt;/h5&gt;  &lt;div class="text"&gt;FDDI specifies the physical and media-access portions of the OSI reference model. FDDI is not actually a single specification, but it is a collection of four separate specifications each with a specific function. Combined, these specifications have the capability to provide high-speed connectivity between upper-layer protocols such as TCP/IP and IPX, and media such as fiber-optic cabling.&lt;/div&gt;  &lt;div class="text"&gt; &lt;/div&gt;  &lt;div class="text"&gt;FDDI's four specifications are the Media Access Control (MAC), Physical Layer Protocol (PHY), Physical-Medium Dependent (PMD), and Station Management (SMT). The MAC specification defines how the medium is accessed, including frame format, token handling, addressing, algorithms for calculating cyclic redundancy check (CRC) value, and error-recovery mechanisms. The PHY specification defines data encoding/decoding procedures, clocking requirements, and framing, among other functions. The PMD specification defines the characteristics of the transmission medium, including fiber-optic links, power levels, bit-error rates, optical components, and connectors. The SMT specification defines FDDI station configuration, ring configuration, and ring control features, including station insertion and removal, initialization, fault isolation and recovery, scheduling, and statistics collection.&lt;/div&gt;  &lt;div class="text"&gt;FDDI is similar to IEEE 802.3 Ethernet and IEEE 802.5 Token Ring in its relationship with the OSI model. Its primary purpose is to provide connectivity between upper OSI layers of common protocols and the media used to connect network devices. Figure 3 illustrates the four FDDI specifications and their relationship to each other and to the IEEE-defined Logical-Link Control (LLC) sublayer. The LLC sublayer is a component of Layer 2, the MAC layer, of the OSI reference model.&lt;/div&gt;  &lt;div class="text"&gt;&lt;br /&gt;&lt;b&gt;Figure 2: FDDI specifications map to the OSI hierarchical model.&lt;/b&gt;&lt;/div&gt;  &lt;div class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;br /&gt;&lt;img alt="FDDI specifications map to the OSI hierarchical model" src="http://www.laynetworks.com/images/fddi2.gif" height="199" width="259" /&gt;&lt;/div&gt;  &lt;h5 class="text"&gt;&lt;strong&gt;FDDI Station-Attachment Types&lt;/strong&gt;&lt;/h5&gt;  &lt;div class="text"&gt;One of the unique characteristics of FDDI is that multiple ways actually exist by which to connect FDDI devices. FDDI defines three types of devices: single-attachment station (SAS), dual-attachment station (DAS), and a concentrator.&lt;/div&gt;  &lt;div class="text"&gt; &lt;/div&gt;  &lt;div class="text"&gt;An SAS attaches to only one ring (the primary) through a concentrator. One of the primary advantages of connecting devices with SAS attachments is that the devices will not have any effect on the FDDI ring if they are disconnected or powered off. Concentrators will be discussed in more detail in the following discussion.&lt;/div&gt;  &lt;div class="text"&gt; &lt;/div&gt;  &lt;div class="text"&gt;Each FDDI DAS has two ports, designated A and B. These ports connect the DAS to the dual FDDI ring. Therefore, each port provides a connection for both the primary and the secondary ring. As you will see in the next section, devices using DAS connections will affect the ring if they are disconnected or powered off. Figure 3 shows FDDI DAS A and B ports with attachments to the primary and secondary rings.&lt;/div&gt;  &lt;div class="text"&gt;&lt;br /&gt;&lt;b&gt;Figure 3: FDDI DAS ports attach to the primary and secondary rings.&lt;/b&gt;&lt;/div&gt;  &lt;div class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;img alt="FDDI DAS ports" src="http://www.laynetworks.com/images/fddi3.gif" height="129" width="260" /&gt;&lt;/div&gt;  &lt;div class="text"&gt;An FDDI concentrator (also called a &lt;em&gt;dual-attachment concentrator&lt;/em&gt; [DAC]) is the building block of an FDDI network. It attaches directly to both the primary and secondary rings and ensures that the failure or power-down of any SAS does not bring down the ring. This is particularly useful when PCs, or similar devices that are frequently powered on and off, connect to the ring. Figure 4 shows the ring attachments of an FDDI SAS, DAS, and concentrator.&lt;/div&gt;  &lt;div class="text"&gt;&lt;br /&gt;&lt;b&gt;Figure 4: A concentrator attaches to both the primary and secondary rings.&lt;/b&gt;&lt;/div&gt;  &lt;div class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;br /&gt;&lt;img alt="A concentrator attaches to both the primary and secondary rings" src="http://www.laynetworks.com/images/fddi4.gif" height="173" width="254" /&gt;&lt;/div&gt;  &lt;h5 class="text"&gt;&lt;strong&gt;FDDI Fault Tolerance&lt;/strong&gt;&lt;/h5&gt;  &lt;div class="text"&gt;FDDI provides a number of fault-tolerant features. In particular, FDDI's dual-ring environment, the implementation of the optical bypass switch, and dual-homing support make FDDI a resilient media technology.&lt;/div&gt;  &lt;div class="text"&gt; &lt;/div&gt;  &lt;div class="text"&gt;Dual Ring&lt;/div&gt;  &lt;div class="text"&gt; &lt;/div&gt;  &lt;div class="text"&gt;FDDI's primary fault-tolerant feature is the dual ring. If a station on the dual ring fails or is powered down, or if the cable is damaged, the dual ring is automatically &lt;em&gt;wrapped&lt;/em&gt; (doubled back onto itself) into a single ring. When the ring is wrapped, the dual-ring topology becomes a single-ring topology. Data continues to be transmitted on the FDDI ring without performance impact during the wrap condition. Figure 5 and Figure 6 illustrate the effect of a ring wrapping in FDDI.&lt;/div&gt;  &lt;div class="text"&gt;&lt;b&gt;Figure 5: A ring recovers from a station failure by wrapping.&lt;/b&gt;&lt;/div&gt;  &lt;div class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;br /&gt;&lt;img alt="A ring recovers from a station failure by wrapping" src="http://www.laynetworks.com/images/fddi5.gif" height="323" width="301" /&gt;&lt;/div&gt;  &lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;span class="text"&gt;&lt;b&gt;Figure 6: A ring also wraps to withstand a cable failure.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;  &lt;div class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;br /&gt;&lt;img alt="A ring also wraps to withstand a cable failure" src="http://www.laynetworks.com/images/fddi6.gif" height="321" width="299" /&gt;&lt;/div&gt;  &lt;div class="text"&gt;When a single station fails, as shown in Figure 5, devices on either side of the failed (or powered down) station wrap, forming a single ring. Network operation continues for the remaining stations on the ring. When a cable failure occurs, as shown in Figure 6, devices on either side of the cable fault wrap. Network operation continues for all stations.&lt;/div&gt;  &lt;div class="text"&gt; &lt;/div&gt;  &lt;div class="text"&gt;It should be noted that FDDI truly provides fault-tolerance against a single failure only. When two or more failures occur, the FDDI ring segments into two or more independent rings that are unable to communicate with each other.&lt;/div&gt;          &lt;h1 class="2"&gt;&lt;strong&gt;Optical Bypass Switch&lt;/strong&gt;&lt;/h1&gt;  &lt;div class="text"&gt;An optical bypass switch provides continuous dual-ring operation if a device on the dual ring fails. This is used both to prevent ring segmentation and to eliminate failed stations from the ring. The optical bypass switch performs this function through the use of optical mirrors that pass light from the ring directly to the DAS device during normal operation. In the event of a failure of the DAS device, such as a power-off, the optical bypass switch will pass the light through itself by using internal mirrors and thereby maintain the ring's integrity. The benefit of this capability is that the ring will not enter a wrapped condition in the event of a device failure. Figure 7 shows the functionality of an optical bypass switch in an FDDI network.&lt;/div&gt;  &lt;div class="text"&gt;&lt;br /&gt;&lt;b&gt;Figure 7: The optical  bypass switch uses internal mirrors to maintain a network.&lt;/b&gt;&lt;/div&gt;  &lt;div class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;br /&gt;&lt;img alt="The optical bypass switch" src="http://www.laynetworks.com/images/fddi7.gif" height="293" width="438" /&gt;&lt;/div&gt;  &lt;h5 class="2"&gt;Dual Homing&lt;/h5&gt;  &lt;div class="text"&gt;Critical devices, such as routers or mainframe hosts, can use a fault-tolerant technique called &lt;em&gt;dual homing&lt;/em&gt; to provide additional redundancy and to help guarantee operation. In dual-homing situations, the critical device is attached to two concentrators. Figure 8 shows a dual-homed configuration for devices such as file servers and routers.&lt;/div&gt;  &lt;div class="text"&gt;&lt;br /&gt;&lt;b&gt;Figure 8: A dual-homed configuration guarantees operation.&lt;/b&gt;&lt;/div&gt;  &lt;div class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;br /&gt;&lt;img alt="dual-homed configuration" src="http://www.laynetworks.com/images/fddi8.jpg" height="185" width="204" /&gt;&lt;/div&gt;  &lt;div class="text"&gt;One pair of concentrator links is declared the active link; the other pair is declared passive. The passive link stays in back-up mode until the primary link (or the concentrator to which it is attached) is determined to have failed. When this occurs, the passive link automatically activates.&lt;/div&gt;  &lt;div class="text"&gt;FDDI Frame Format&lt;/div&gt;  &lt;div class="text"&gt;The FDDI frame format is similar to the format of a Token Ring frame. This is one of the areas where FDDI borrows heavily from earlier LAN technologies, such as Token Ring. FDDI frames can be as large as 4,500 bytes. Figure 9 shows the frame format of an FDDI data frame and token.&lt;/div&gt;  &lt;div class="MsoNormal"&gt;&lt;br /&gt;&lt;span class="2"&gt;&lt;b&gt;&lt;span style="font-family:Verdana;"&gt;Figure 9: The FDDI frame is similar to that of a Token Ring frame.&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;  &lt;div class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;br /&gt;&lt;span style="font-family:Verdana;"&gt;&lt;img alt="FDDI frame is similar to that of a Token Ring frame." src="http://www.laynetworks.com/images/fddi9.gif" height="153" width="403" /&gt;&lt;/span&gt;&lt;/div&gt;  &lt;h5 class="2"&gt;FDDI Frame Fields&lt;/h5&gt;  &lt;div class="text"&gt;The following descriptions summarize the FDDI data frame and token fields illustrated in Figure 9.&lt;/div&gt;  &lt;div class="text"&gt;Preamble---A unique sequence that prepares each station for an upcoming frame.&lt;/div&gt;  &lt;div class="text"&gt;Start Delimiter--- Indicates the beginning of a frame by employing a signaling pattern that differentiates it from the rest of the frame.&lt;/div&gt;  &lt;div class="text"&gt;Frame Control---Indicates the size of the address fields and whether the frame contains asynchronous or synchronous data, among other control information.&lt;/div&gt;  &lt;div class="text"&gt;Destination Addres&lt;em&gt;s&lt;/em&gt;---Contains a unicast (singular), multicast (group), or broadcast (every station) address. As with Ethernet and Token Ring addresses, FDDI destination addresses are 6 bytes long.&lt;/div&gt;  &lt;div class="text"&gt;Source Address---Identifie s the single  station that sent the frame. As with Ethernet and Token Ring addresses, FDDI source addresses are 6 bytes long.&lt;/div&gt;  &lt;div class="text"&gt;Data---Contains either information destined for an upper-layer protocol or control information.&lt;/div&gt;  &lt;div class="text"&gt;Frame Check Sequence (FCS)---Filed by the source station with a calculated &lt;em&gt;cyclic redundancy check&lt;/em&gt; value dependent on frame contents (as with Token Ring and Ethernet). The destination address recalculates the value to determine whether the frame was damaged in transit. If so, the frame is discarded.&lt;/div&gt;  &lt;div class="text"&gt;End Delimiter--- Contains unique symbols, which cannot be data symbols, that indicate the end of the frame.&lt;/div&gt;  &lt;div class="text"&gt;Frame Status---Allows the source station to determine whether an error occurred and whether the frame was recognized and copied by a receiving station.&lt;span class="text"&gt;&lt;/span&gt; &lt;span class="text"&gt;&lt;/span&gt;&lt;/div&gt;  &lt;h3 class="2"&gt;FDDI  Frame Format&lt;/h3&gt;  &lt;h1 class="2"&gt;FDDI Frame&lt;/h1&gt;  &lt;div class="MsoNormal"&gt;Frame Control (FC): 8 bits&lt;/div&gt;  &lt;div class="MsoNormal"&gt;has bit format CLFFZZZZ&lt;/div&gt;  &lt;div class="MsoNormal"&gt;C indicates synchronous or asynchronous frame&lt;/div&gt;  &lt;div class="MsoNormal"&gt;L indicates use of 16 or 48 bit addresses&lt;/div&gt;  &lt;div class="MsoNormal"&gt;FF indicates whether it is a LLC, MAC control or reserved frame&lt;/div&gt;  &lt;div class="MsoNormal"&gt;in a control frame ZZZZ indicates the type of control&lt;/div&gt;  &lt;div class="MsoNormal"&gt;Destination Address (DA): 16 or 48 bits&lt;/div&gt;  &lt;div class="MsoNormal"&gt;specifies station for which the frame is intended&lt;/div&gt;  &lt;div class="MsoNormal"&gt;Source Address (SA): 16 or 48 bits&lt;/div&gt;  &lt;div class="MsoNormal"&gt;specifies station that sent the frame&lt;span style="font-size: 13.5pt;"&gt;&lt;/span&gt;&lt;/div&gt;  &lt;div class="MsoNormal"&gt;&lt;span style="font-size: 13.5pt;"&gt;Here is what the FDDI frame format looks like: &lt;/span&gt;&lt;/div&gt;          &lt;div class="MsoNormal"&gt;&lt;span style="font-size: 13.5pt;"&gt;          &lt;/span&gt;&lt;img alt="FDDI Frame Format" src="http://www.laynetworks.com/images/fddi10.gif" height="90" width="526" /&gt;&lt;span style="font-size: 13.5pt;"&gt; &lt;/span&gt;&lt;/div&gt;  &lt;div class="MsoHeading7"&gt;FDDI Frame Format&lt;span&gt; &lt;/span&gt;&lt;/div&gt;  &lt;div class="MsoNormal"&gt;PA - Preamble 16 symbols&lt;/div&gt;  &lt;div class="MsoNormal"&gt;SD - Start Delimiter 2 symbols&lt;/div&gt;  &lt;div class="MsoNormal"&gt;FC -  Frame Control 2 symbols&lt;/div&gt;  &lt;div class="MsoNormal"&gt;DA - Destination Address 4 or 12 symbols&lt;/div&gt;  &lt;div class="MsoNormal"&gt;SA - Source Address 4 or 12 symbols&lt;/div&gt;  &lt;div class="MsoNormal"&gt;FCS - Frame Check Sequence 8 symbols, covers the FC, DA, SA and Information&lt;/div&gt;  &lt;div class="MsoNormal"&gt;ED - End Delimiter 1 or 2 symbols&lt;/div&gt;  &lt;div class="MsoNormal"&gt;FS - Frame Status 3 symbols&lt;/div&gt;  &lt;div class="MsoNormal"&gt;Token is just the PA, SD, FC and ED&lt;/div&gt;  &lt;div class="MsoNormal"&gt; &lt;/div&gt;  &lt;div class="MsoNormal"&gt;&lt;b&gt;Preamble&lt;br /&gt;&lt;/b&gt;The Token owner as a minimum of transmits the preamble 16 symbols of Idle. Physical Layers of the subsequent repeating stations can change the length of the Idle pattern according to the Physical Layer requirements.  Therefore, each repeating station may see a variable length preamble from the original preamble. Tokens will be recognized as long as its preamble length is greater than zero.  If a valid token is received and cannot be processed (repeated), due to expiration of ring timing or latency constraints the station will issue a new token to be put on the ring.&lt;span&gt;            &lt;/span&gt;A given MAC implementation is not required to be capable of copying frames received with less than 12 symbols of preamble; Nevertheless, with such frames, it cannot be correctly repeated.&lt;br /&gt;Since the preamble cannot be repeated, the rest of the frame will not be repeated as well.&lt;/div&gt;  &lt;div class="MsoNormal"&gt;&lt;b&gt;Starting Delimiter&lt;/b&gt; &lt;/div&gt;This field of the frame denodes the start of the frame.  It can only have symbols 'J' and 'K'.  These symbols will not be used anywhere else but in the starting delimiter of a token or a frame. &lt;div class="MsoNormal"&gt;&lt;b&gt;Frame Control &lt;/b&gt;&lt;/div&gt; Frame Control field descibes what type of data it is carrying in&lt;span&gt; &lt;/span&gt;the INFO field.  Here are the most common values that  are allowed in the FC field:   &lt;div class="MsoNormal"&gt;&lt;span&gt;                                    &lt;/span&gt;40:                   Void Frame. &lt;/div&gt;  &lt;div class="MsoNormal"&gt;&lt;span&gt;                                    &lt;/span&gt;41,4F:        Station Management (SMT) Frame. &lt;/div&gt;  &lt;div class="MsoNormal"&gt;&lt;span&gt;                                    &lt;/span&gt;C2,C3:      MAC Frame. &lt;/div&gt;  &lt;div class="MsoNormal"&gt;&lt;span&gt;                                    &lt;/span&gt;50,51:        LLC Frame. &lt;/div&gt;  &lt;div class="MsoNormal"&gt;&lt;span&gt;                                    &lt;/span&gt;60:                    Implementor Frame. &lt;/div&gt;  &lt;div class="MsoNormal"&gt;&lt;span&gt;                                    &lt;/span&gt;70:                   Reserved Frame.&lt;/div&gt;  &lt;div class="MsoNormal"&gt;&lt;span class="text"&gt;Please note that the list here are only the most common values that can be formed by a 48 bit addressedynchronous data frames. &lt;/span&gt;&lt;/div&gt;  &lt;div class="MsoNormal"&gt;&lt;b&gt;Destination Address &lt;/b&gt;&lt;/div&gt; Destination Address field contains 12 symbols that identifies the&lt;span&gt; &lt;/span&gt;station that is receiving this particular frame.  When FDDI is first setup, each station is given a unique address that identifies themselves&lt;span&gt; &lt;/span&gt;from the  others.  When a frame passed by the station, the station will&lt;span&gt; &lt;/span&gt;compare its address against the DA field of the frame.  If it is a match, &lt;span&gt;&lt;/span&gt;station then copies the frame into its buffer area waiting to be processed.&lt;span&gt; &lt;/span&gt;There is not restriction on the number of stations that a frame can reach &lt;span&gt;            &lt;/span&gt;at a time.  If the first bit of the DA field is set to '1', then the address&lt;span&gt; &lt;/span&gt;is called a &lt;em&gt;group&lt;/em&gt; or &lt;em&gt; global &lt;/em&gt;address.  If the first bit is '0', then the address &lt;span&gt;&lt;/span&gt;is called &lt;em&gt;individual &lt;/em&gt;address.  As the name suggests, a frame with a&lt;em&gt;&lt;span&gt; &lt;/span&gt;global&lt;/em&gt; address setting can be sent to multiple stations on the network. If the frame is intended for &lt;u&gt;everyone&lt;/u&gt; on the network, the address bits will&lt;span&gt; &lt;/span&gt;be set to all  1's.  Therefore, a global address contains all 'F' symbols.&lt;span&gt; &lt;/span&gt;There are also two different ways of administer these addresses.  One's called &lt;em&gt;local&lt;/em&gt; and the other's called &lt;em&gt;universal&lt;/em&gt;.  The second bit of the address field determine whether or not the address is locally or universally administered.  If the second bit is '1' then it is locally administered address.  If the second bit is a '0', then it is universally&lt;span&gt; &lt;/span&gt;administered adress.A locally administer address are addresses that have&lt;span&gt; &lt;/span&gt;been assigned by the network administrator and a universally administered addresses are pre-assigned by the manufacturer' s OUI. &lt;div class="MsoNormal"&gt;&lt;strong&gt;Source Address&lt;/strong&gt;&lt;span style="font-size: 12pt;"&gt;&lt;/span&gt;&lt;/div&gt; A Source Address identifies the station that created the frame. This field is used for remove  frames from the ring.  Each time a frame is sent, it travels around the ring, visiting each station,&lt;span&gt; &lt;/span&gt;and eventually (hopefully) comes back to the station that originally&lt;span&gt; &lt;/span&gt;sent that frame.  If the address of a station matches the SA field in&lt;span&gt; &lt;/span&gt;the frame, the station will strip the frame off the ring.  Each station&lt;span&gt; &lt;/span&gt;is responsible for removing its own frame from the ring.   &lt;div class="MsoNormal"&gt;&lt;span class="text"&gt;&lt;strong&gt;Information Field&lt;/strong&gt;&lt;/span&gt;&lt;strong&gt;&lt;span style="font-size: 12pt;"&gt;&lt;/span&gt;&lt;span class="text"&gt;&lt;span style="font-size: 12pt;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/strong&gt;&lt;span class="text"&gt;&lt;span style="font-size: 12pt;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: 12pt;"&gt;&lt;/span&gt;&lt;/div&gt; INFO field is the heart and soul of the frame.  Every components of&lt;span&gt; &lt;/span&gt;the frame is designed around this  field;  Who to send it to, where's &lt;span&gt;&lt;/span&gt;this coming from, how it is received and so on.The type of information in the INFO field can be found by looking in the FC field of the frame.  For example:&lt;span&gt; &lt;/span&gt;'50'(hex) denodes a LLC frame.  So, the INFO field will have a&lt;span&gt; &lt;/span&gt;LLC header followed by other upper layer headers.  For example&lt;span&gt; &lt;/span&gt;SNAP, ARP, IP, TCP, SNMP, etc.&lt;span&gt; &lt;/span&gt;'41'(hex or '4F'(hex) denode s SMT (Station Management) frame. &lt;span&gt;&lt;/span&gt;Therefore, a SMT header will appear in the INFO field.   &lt;h1 class="2"&gt;&lt;span class="text"&gt;&lt;b&gt;Frame Check Sequence&lt;/b&gt;&lt;/span&gt; &lt;/h1&gt;Frame Check Sequence field is used to check or verify the traversing&lt;span&gt; &lt;/span&gt;frame for any bit errors.  FCS information is generated by the station&lt;span&gt; &lt;/span&gt;that sends the frame, using the bits in FC, DA, SA, INFO, and FCS&lt;span&gt; &lt;/span&gt;fields.  To verify if there are any  bit errors in the frame, FDDI uses &lt;span&gt;&lt;/span&gt;8 symbols (32 bits) CRC (Cyclic Redundancy Check) to ensure the transmission of a frame on the ring.   &lt;div&gt;&lt;b&gt;End Delimiter&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;As the name suggests, the end delimiter denodes the end of the frame. The ending delimiter consist of a 'T' symbol.  This 'T' symbols indicates that the frame is complete or ended.  Any data sequence that does not end with this 'T' symbol is not considered to be a frame. &lt;/div&gt;  &lt;div class="MsoNormal"&gt;&lt;span style="font-size: 13.5pt;"&gt;&lt;/span&gt;&lt;b&gt;Frame Status&lt;/b&gt;&lt;/div&gt;&lt;b&gt;&lt;span&gt;&lt;/span&gt;&lt;/b&gt; Frame Status (FS) contains 3 indicators that dictates the condition of the frame.  Each indicator can have two values: &lt;em&gt;Set&lt;/em&gt; ('S') or Reset ('R').  The indicators could possibly be corrupted.  In this case, the&lt;span&gt; &lt;/span&gt;indicators is neither 'S' nor 'R'.  All frame are initially set to  'R'.&lt;span&gt; &lt;/span&gt;Three types of indicators are as follows:&lt;span&gt; &lt;/span&gt;Error (E):This indicator is set if a station determines an error for that frame.  Might be a CRC failiure or other causes.  If a frame has its E indicator set, then, that frame is discarded&lt;span&gt; &lt;/span&gt;by the first station that encounters the frame.&lt;span&gt; &lt;/span&gt;Acknowledge( A): Sometime this indicator is called 'address recognized'.  This indicator is set whenever a frame in properly received; meaning the frame has reached its destination address. Copy (C): This indicator is set whenever a station is able to copy the received frame into its buffer section.  Thus, Copy and Acknowledge indicators are usually set at the same time. But, sometimes when a station is receiving too many frames and cannot copy all the incoming frames.  If this happens, it would re-transmit the frame with indicator 'A' set indicator 'C' left on reset.&lt;br /&gt;&lt;br /&gt;        &lt;!--~-|**|PrettyHtmlStart|**|-~--&gt;         &lt;span style="color: white;"&gt;__._,_.___&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3562210129043968367-1286782946200247964?l=crazy-programming-codes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crazy-programming-codes.blogspot.com/feeds/1286782946200247964/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3562210129043968367&amp;postID=1286782946200247964' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3562210129043968367/posts/default/1286782946200247964'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3562210129043968367/posts/default/1286782946200247964'/><link rel='alternate' type='text/html' href='http://crazy-programming-codes.blogspot.com/2007/12/fiber-distributed-data-interface-fddi.html' title='Fiber Distributed- Data Interface (FDDI)'/><author><name>roguemei</name><uri>http://www.blogger.com/profile/02630238697113270207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3562210129043968367.post-8866187549563509084</id><published>2007-11-12T05:51:00.000-08:00</published><updated>2007-11-12T05:52:23.058-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Text Search'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>MS SQL Server 2005 full-text indexing</title><content type='html'>Instead of buying Visual Developer Studio 2005 and SQL Server, I made my database-driven website using the free versions: Visual Web Developer Express and SQL Server Express. However, I still wanted to be able to search my database of product reviews using a full-text search, because I was sure that Microsoft had put a lot of work into developing this, and so it must be infinitely better than any crummy search mechanism I could cook up myself. Here's how I did it, and what I found...&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Getting started with full-text search&lt;/strong&gt;&lt;br /&gt;Make sure that you download the version of SQL Server Express with the additional full-text search capabilities. This is the larger one of the two downloads possible.&lt;br /&gt;Read up a bit on &lt;a href="http://msdn2.microsoft.com/en-us/library/ms142571.aspx"&gt;Full Text Search&lt;/a&gt; concepts.&lt;br /&gt;Making the CatalogNow you need to create a full-text catalog. The catalog seems to be a container to put all your full-text indexes into. So, if you are going to need to search the text of three tables, you make three indexes (one for each table) and put all three indexes in the one catalog.WARNING: Some of the information of the Microsoft website relates to the full version of SQL Server, such as the "Storage folder" that Express doesn't have. Don't panic, you just need to create the catalog by hand, rather than through the Management Interface.For my application, I just made one catalog and put two of my indexes into it. From what I understand, if your indexes are going to be huge, you should make a separate catalog for each index. Here is how to make a catalog:&lt;br /&gt;&lt;br /&gt;Start SQL Server Management Studio Express, and connect to your database.&lt;br /&gt;Click on New Query to get a box where you can type raw SQL.&lt;br /&gt;Type:use mydatabasegoEXEC sp_fulltext_database 'enable'goCREATE FULLTEXT CATALOG mycatalog go&lt;br /&gt;Click "Execute" to run the SQL. This will enable fulltext searching on the database, and create the catalog, which is in fact a folder on your computer called "mycatalog" somewhere within the Microsoft SQL Server folder. If your catalog is going to be HUGE, it may be worth researching some extra parameters for this command to tell it where to put the catalog, e.g. on a different disk to the database itself. This would be for performance improvement more than anything else.&lt;br /&gt;&lt;br /&gt;Making the Index&lt;br /&gt;Next we are going to create a full-text index. But if you want to create a full-text index on a table, the table must have a "unique, single-column, non-nullable index". In most cases this will be your primary key. What Microsoft is saying here is that you must have a non-null index on the table (all primary keys automatically are this), and that the index must be on just one column. Oh Drat! My table has a primary key that is on two columns, so I have to make an index that is on a single unique column in order to use full-text searching. What to do, what to do? Well, my solution was to add a new column to the table called "text_id". I made this an int column, and also made it an identity column. This way, the text_id field gets automatically filled with a unique integer for each record that is entered, without me needing to change any of my existing aspx pages.Also, if you already have a primary key, but it is on a really long field, I suggest you make an int field and use that instead, because the full-text index that gets created will be huge if the primary key you use is big, such as a GUID.&lt;br /&gt;Ok, here is how to create the full-text index:&lt;br /&gt;If you need to add an identity column, do this first.&lt;br /&gt;Make sure you have an index on the identity column. I called mine "myindex".&lt;br /&gt;Type in and execute this SQL:CREATE FULLTEXT INDEX ON mydatabase.dbo.mytable(column_to_index Language 0X0)KEY INDEX myindex ON mycatalogWITH CHANGE_TRACKING AUTOWhere mytable is the name of the table, column_to_index is the name of the column that is full of text you want to be able to search on, myindex is the name of the index (could be PK_something if you used your primary key), and mycatalog is the name of the catalog you created earlier. The "Language" bit just tells SQL Server to not treat this as being in any specific language. I don't know how to specify another language here, but you can change it later by using the SQL Server Manager interface. I didn't notice any difference between a UK English index and a language-neutral index. I suspect it is only important for languages other than English.&lt;br /&gt;I did discover that sometimes when you try to make the index, it doesn't get fully made until you do a little bit through the user interface. To verify that things have worked, start the SQL Server Manager interface, right-click on the table name and choose "Modify". Right-click on the column and choose "Full text index...". In here you need to check that "Columns" is set to the column name you want to index. Also check whether "Active" is Yes — if not, it means the index isn't built yet.&lt;br /&gt;You may have to wait a while for the index to be created. If you have a large table, the CPU usage on your PC will probably go up to 100% while this happens. If you get problems, see the troubleshooting section below...&lt;br /&gt;Performing a FindThe actual SELECT statement to find records is then very easy. Here is an example:SELECT descriptionFROM mytableWHERE CONTAINS(description, '"shark attack"') (You need to put the search terms in double-quotes, within the single-quotes needed for the SQL)&lt;br /&gt;Eliminating Noise WordsIf your text fields are in HTML, then you should add things lik "BR" and "P" to the list of noise words.&lt;br /&gt;What I discovered&lt;br /&gt;At first, full-text search queries were taking about 30 seconds to return results. This was pretty disappointing, and I started looking for ways to tune the system up. But while I was looking, the whole thing sorted itself out, and suddenly queries became almost instant. It is very impressive, I can search for a phrase like "african drumming" on my 20,000 record database almost instantly. I don't know what caused this delay then speed-up. Presumably the SQL Server was building the indexes, and it took a while. I'm not sure how come I could do queries while the index was being built though. It's a puzzle.&lt;br /&gt;Also, I discovered that searching for "drum* lesson*" returns better results than searching for "drum lesson", because the first one will also find "drumming lessons". So, I made it so that queries that people enter automatically have a * put after each word.&lt;br /&gt;A Bit of Troubleshooting&lt;br /&gt;If it doesn't work, here are some of the problems I encountered, and the ways of debugging and solving the problems:&lt;br /&gt;Application Events&lt;br /&gt;Right Click on My Computer, choose Manage, then Event Viewer, then Application. This shows you the Application Event Log. In here you will see any error messages from the Full Text service. Usually one of these errors will just redirect you to the server logs themselves.&lt;br /&gt;SQL Server Logfile &amp;amp; Fulltext Index Log-file&lt;br /&gt;Have a look in the logs. I found mine in C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG. The fulltext logs are called SQLFTxxxxxx.LOG. They are hard to understand, but they may help.&lt;br /&gt;Try ReBooting&lt;br /&gt;You need to reboot after you install FullText Indexing, and a reboot is always a good place to start when troubleshooting. I had the error message "Error '0x80040e09' occurred during full-text index population" appearing in my logfiles, and no fulltext indexes created at all until I figured out that I needed to reboot.&lt;br /&gt;Commands &amp;amp; Queries that you can type into SQL Server 2005:&lt;br /&gt;How to check the status of the full-text indexes in a catalog:&lt;br /&gt;USE mydatabase;GOEXEC sp_help_fulltext_tables mycatalog;GO&lt;br /&gt;Enable fulltext search on a table:&lt;br /&gt;USE mydatabase;GOALTER FULLTEXT INDEX ON mytable ENABLE;GO&lt;br /&gt;Check if full text indexing is enabled:&lt;br /&gt;USE mydatabase;GOSELECT DATABASEPROPERTY('mydatabase', 'IsFullTextEnabled');GO&lt;br /&gt;Update&lt;br /&gt;I've been looking at this a bit more recently, and worked out a few things:&lt;br /&gt;You can have more than one fulltext indexed column per table. Old SQL Server versions prevented this, but 2005 allows it. So, you can have a table with a title and a summary column, and both can be full-text indexed.&lt;br /&gt;The language setting is important, despite what I wrote above. I now use the code '2057' to set my indexes to be in UK English. This means that searches on "dogs" will also find "dog".&lt;br /&gt;You can find the status of your fulltext indexes like this:exec sp_help_fulltext_columns mytableThis shows you which columns in a table are set up for full-text searching.select * from sys.fulltext_indexesThis shows you the status of the current indexes and when they were last updated. I think the key is to make sure that change_tracking_state_desc is set to "AUTO" and that has_crawl_completed is "1". You can also see the time of the last crawl, i.e. when the index was last updated, which can help you see why things aren't working.&lt;br /&gt;Here is my example .sql statement, that sets up three columns of a table for fulltext indexing, and sorts out the change tracking state, and starts a full crawl:&lt;br /&gt;use contentexec sp_fulltext_database 'enable'goexec sp_fulltext_catalog 'cmscatalog', 'create'goexec sp_fulltext_table 'document', 'create', 'cmscatalog', 'PK_document'goexec sp_fulltext_column 'document', 'title', 'add', '2057'exec sp_fulltext_column 'document', 'keywords', 'add', '2057'exec sp_fulltext_column 'document', 'search_text', 'add', '2057'goexec sp_fulltext_table 'document', 'activate'goEXEC sp_fulltext_table 'document', 'Start_background_updateindex';goexec sp_fulltext_table 'document', 'start_full'go&lt;br /&gt;Conclusion&lt;br /&gt;Full Text Searching is easy to set up and use in SQL Server Express. When it works, it works fast!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3562210129043968367-8866187549563509084?l=crazy-programming-codes.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://crazy-programming-codes.blogspot.com/feeds/8866187549563509084/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3562210129043968367&amp;postID=8866187549563509084' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3562210129043968367/posts/default/8866187549563509084'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3562210129043968367/posts/default/8866187549563509084'/><link rel='alternate' type='text/html' href='http://crazy-programming-codes.blogspot.com/2007/11/ms-sql-server-2005-full-text-indexing.html' title='MS SQL Server 2005 full-text indexing'/><author><name>roguemei</name><uri>http://www.blogger.com/profile/02630238697113270207</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
