<?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-6523593068804526842</id><updated>2011-04-21T14:35:49.500-07:00</updated><category term='Visual Basic'/><title type='text'>Mahdi Arahman</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://mahdi-arahman.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6523593068804526842/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://mahdi-arahman.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Mahdi Arahman</name><uri>http://www.blogger.com/profile/18040585124379709546</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_ZC4ToBb4zUI/SIDFnxf-L9I/AAAAAAAAAAc/LIEAQPbcsTU/S220/b45.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>1</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6523593068804526842.post-2190375403596662593</id><published>2008-07-18T09:20:00.000-07:00</published><updated>2008-07-18T09:28:09.148-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Basic'/><title type='text'>Scramble Kata / acak kata</title><content type='html'>&lt;span style="font-family:arial;"&gt;akhirnya dpt jg caranya... meskipun ga ada algoritmanya sih :P&lt;br /&gt;neh......&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-style: italic;"&gt;Private Sub Command1_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    Dim x, pos As Integer&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    Dim char As String&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    Dim s() As String&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    'Re-dimension the array to the size of the string in the textbox&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    ReDim s(Len(TextBox1.Text)) As String&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    'Assign each character to an element in the array&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    For x = 1 To Len(TextBox1.Text)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;        s(x) = Mid(TextBox1.Text, x, 1)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    Next&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    'For 1 to the size of the array, mix up the letters&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    For x = 1 To UBound(s)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;         'Pos is a random place in the array&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;               pos = Int((Len(TextBox1.Text) - 1) * Rnd) + 1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;        &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;     'temporarily assign the temp character to our random letter&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;               char = s(pos)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;        &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;     'Swap the characters, using the temp character to assign from the overwriten&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;     'element&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;        s(pos) = s(x)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;        s(x) = char&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    Next&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    'Clear the textbox and concat the value with each element in the array&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    TextBox1.Text = ""&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    For x = 1 To UBound(s)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;        TextBox1.Text = TextBox1.Text &amp;amp; s(x)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;    Next&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;End Sub&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;selengkapnya di : &lt;/span&gt;&lt;span&gt;http://digiassn.blogspot.com/&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/6523593068804526842-2190375403596662593?l=mahdi-arahman.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mahdi-arahman.blogspot.com/feeds/2190375403596662593/comments/default' title='Poskan Komentar'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=6523593068804526842&amp;postID=2190375403596662593' title='0 Komentar'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6523593068804526842/posts/default/2190375403596662593'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6523593068804526842/posts/default/2190375403596662593'/><link rel='alternate' type='text/html' href='http://mahdi-arahman.blogspot.com/2008/07/scramble-kata-acak-kata.html' title='Scramble Kata / acak kata'/><author><name>Mahdi Arahman</name><uri>http://www.blogger.com/profile/18040585124379709546</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://bp3.blogger.com/_ZC4ToBb4zUI/SIDFnxf-L9I/AAAAAAAAAAc/LIEAQPbcsTU/S220/b45.jpg'/></author><thr:total>0</thr:total></entry></feed>
