<?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-8720089400708057271</id><updated>2011-11-28T07:01:42.068+07:00</updated><category term='Others'/><category term='PHP'/><category term='VB.Net'/><category term='Good Idea'/><title type='text'>Database and Web Development</title><subtitle type='html'>To share general knowledge with technology</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://soksong.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8720089400708057271/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://soksong.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Mr. Song</name><uri>http://www.blogger.com/profile/17664450785665137238</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/__Id2wWZQAbA/SL_Kyiq1UkI/AAAAAAAAAAQ/n7y8DFhUhSc/S220/song1_.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>15</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8720089400708057271.post-834513258433662435</id><published>2011-04-30T08:35:00.000+07:00</published><updated>2011-04-30T08:35:02.359+07:00</updated><title type='text'>What is .htaccess?</title><content type='html'>&lt;blockquote&gt;&lt;b&gt;.htaccess&lt;/b&gt; is a configuration file for use on web servers running the Apache Web Server software. When a .htaccess file is placed in a directory which is in turn 'loaded via the Apache Web Server', then the .htaccess file is detected and executed by the Apache Web Server software. These .htaccess files can be used to alter the configuration of the Apache Web Server software to enable/disable additional functionality and features that the Apache Web Server software has to offer. These facilities include basic redirect functionality, for instance if a 404 file not found error occurs, or for more advanced functions such as content password protection or image hot link prevention .........&lt;a href="http://www.htaccess-guide.com/"&gt;http://www.htaccess-guide.com/&lt;/a&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8720089400708057271-834513258433662435?l=soksong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://soksong.blogspot.com/feeds/834513258433662435/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8720089400708057271&amp;postID=834513258433662435' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8720089400708057271/posts/default/834513258433662435'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8720089400708057271/posts/default/834513258433662435'/><link rel='alternate' type='text/html' href='http://soksong.blogspot.com/2011/04/what-is-htaccess.html' title='What is .htaccess?'/><author><name>Mr. Song</name><uri>http://www.blogger.com/profile/17664450785665137238</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/__Id2wWZQAbA/SL_Kyiq1UkI/AAAAAAAAAAQ/n7y8DFhUhSc/S220/song1_.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8720089400708057271.post-1450321815887032282</id><published>2011-04-26T14:46:00.001+07:00</published><updated>2011-04-26T14:51:49.672+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>Free Download Scripts and Source Code</title><content type='html'>&lt;blockquote&gt;&lt;b&gt;Free Download Scripts and Source Code &lt;/b&gt;Free Download Scripts and Source Code, Clone Script, Nulled Script, Script Example, Flash Action Script, Javascript, Java, JQuery, Ajax, PHP, CSS, HTML, etc.&lt;/blockquote&gt;&lt;blockquote&gt;&lt;i&gt;Reference:&lt;/i&gt;&lt;a href="http://scriptexample.blogspot.com/2010/10/21-amazing-jquery-tabs-collection.html"&gt;http://scriptexample.blogspot.com/2010/10/21-amazing-jquery-tabs-collection.html&lt;/a&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8720089400708057271-1450321815887032282?l=soksong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://soksong.blogspot.com/feeds/1450321815887032282/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8720089400708057271&amp;postID=1450321815887032282' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8720089400708057271/posts/default/1450321815887032282'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8720089400708057271/posts/default/1450321815887032282'/><link rel='alternate' type='text/html' href='http://soksong.blogspot.com/2011/04/free-download-scripts-and-source-code.html' title='Free Download Scripts and Source Code'/><author><name>Mr. Song</name><uri>http://www.blogger.com/profile/17664450785665137238</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/__Id2wWZQAbA/SL_Kyiq1UkI/AAAAAAAAAAQ/n7y8DFhUhSc/S220/song1_.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8720089400708057271.post-5842953898976185877</id><published>2010-06-25T23:44:00.000+07:00</published><updated>2010-06-25T23:44:59.444+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Good Idea'/><title type='text'>Working Hard Is not Enough. Here's 18 Ways to Work Smart</title><content type='html'>&lt;blockquote&gt;&lt;OL&gt;  &lt;LI&gt;Get   clear on the objective. &lt;BR&gt;    Everything has an objective. It's just a   matter of whether you know it or not. What is the &lt;A href="http://celestinechua.com/blog/2009/02/keep-your-end-objective-in-mind/"&gt;end   objective you are looking for&lt;/A&gt;? The people who don't know the objective of   what they are doing are the ones who &lt;SPAN id="IL_AD1"&gt;waste&lt;/SPAN&gt; the most time. &lt;SPAN id="IL_AD5"&gt;If you know&lt;/SPAN&gt; your objective,   you can be laser-focused and cut right to the chase. The clearer you are, the   better.&lt;/LI&gt;  &lt;BR&gt;  &lt;LI&gt;Create a   vision. &lt;BR&gt;    Now that you know your objective, what is your vision? See   the objective as your direction, and your vision as your destination. Knowing   your objective lets you know where to travel in, while knowing your vision helps   you charge forward.&lt;/LI&gt;  &lt;BR&gt;  &lt;LI&gt;Take   the 80/20 route. &lt;BR&gt;    There are always many different ways to achieve the   same outcome. 80/20 route refers to the route that takes the least effort but   gives you the maximum results. What's the most effective route that will get you   from where you are to where you want to be? Take that path.&lt;/LI&gt;  &lt;BR&gt;  &lt;LI&gt;Go   for high impact items. &lt;BR&gt;    There are endless number of things you can do   to achieve a goal. Go for the most important tasks - the ones that cause the   highest impact. For example in school, I would not attend lectures if I felt   they would not make a difference to my learning. As I develop my blog, I   concentrate on the key tasks that make the most difference such as writing high   quality content for my readers and spreading the word about my   articles.&lt;/LI&gt;  &lt;BR&gt;  &lt;LI&gt;Create   structures to maintain your flow. &lt;BR&gt;    If you know &lt;A href="http://www.dumblittleman.com/2010/05/9-proven-ways-to-charge-up-your.html"&gt;how   motivation works&lt;/A&gt;, you will know it comes in bursts and waves. It's not   possible to maintain a 100% full motivated state every single second. Hence, you   need to create/leverage on your environment to maintain your flow. Examples are   your physical environment, people you hang out with, your routine and   communities you are a part of.&lt;/LI&gt;  &lt;BR&gt;  &lt;LI&gt;Stop   being a perfectionist. &lt;BR&gt;      &lt;A href="http://www.lifehack.org/articles/productivity/why-being-a-perfectionist-may-not-be-so-perfect.html"&gt;Being   a perfectionist isn't all that perfect&lt;/A&gt; if it prevents you from achieving   more. Release the perfectionist mindset. Stop obsessing about the details and   specifics; they often take care of themselves.&lt;/LI&gt;  &lt;BR&gt;  &lt;LI&gt;Learn from   others. &lt;BR&gt;    There are great resources, smart people, direct &lt;SPAN id="IL_AD3"&gt;opportunities&lt;/SPAN&gt; and &lt;SPAN id="IL_AD2"&gt;top   books&lt;/SPAN&gt; around you all the time. Learn to make use of them. When I started   out in my personal development industry and with my blog, I read materials from   the experts and consulted the top &lt;SPAN id="IL_AD6"&gt;bloggers&lt;/SPAN&gt;,   which helped me gain important insights immediately. Even today, I continue to   do so as I expand my work. There is never a stop to how much you can learn from   others.&lt;/LI&gt;  &lt;BR&gt;  &lt;LI&gt;If   it works, stick to it. &lt;BR&gt;    If there is already a success formula that's   working, then reapply that formula. There's no need to innovate or reinvent the   wheel for the sake of it. Innovate only if there's value in doing so.&lt;/LI&gt;  &lt;BR&gt;  &lt;LI&gt;Ask   for help. &lt;BR&gt;    Most of us prefer to do things by ourselves and not disturb   others. That's a great work ethic, but sometimes asking for help gets us further   than just doing it alone. People love to help. Many readers often email me at   The Personal Excellence Blog for advice/help and I make an effort to answer   their questions, because I want to see them do well too. Ask and you might get   an answer. If you don't ask, you'll never get.&lt;/LI&gt;  &lt;BR&gt;  &lt;LI&gt;Cut   out the fluff. &lt;BR&gt;    Going for high impact items (#4) means you have to cut   out the fluff. There are the things that need to be done, and then there are the   nice-to-do things that don't exactly contribute to anything in the long-run.   Don't do things unless they are absolutely needed.&lt;/LI&gt;  &lt;BR&gt;  &lt;LI&gt;Automate. &lt;BR&gt;    Is there anyway to automate your tasks, especially labor intensive   ones? It can be the simplest things such as setting up &lt;A href="http://www.lifehack.org/articles/technology/20-ways-to-use-gmail-filters.html"&gt;filters   in your emails&lt;/A&gt; and using more functional applications that get the job done   better. With The Personal Excellence Blog, I've &lt;SPAN id="IL_AD4"&gt;automated&lt;/SPAN&gt; several processes such as filtering specific emails   to respective labels, having my new articles automatically feed to   Twitter/Facebook, and having automatic thumbnails for my articles. That saves a   lot of time so I can get right to creating quality content for readers.&lt;/LI&gt;  &lt;BR&gt;  &lt;LI&gt;Delegate. &lt;BR&gt;    For the lower impact items that need to get done (such as   administrative activities), delegate them to someone else. If you are running a   business, hire someone to take care of them.&lt;/LI&gt;  &lt;BR&gt;  &lt;LI&gt;Outsource. &lt;BR&gt;    If something is not your area of expertise or it can be better done   by someone else, then &lt;A href="http://www.dumblittleman.com/2008/12/5-ways-to-find-hire-and-use-virtual.html"&gt;outsource   it&lt;/A&gt;. You only have 24 hours a day; your limited time should be spent only in   places where you can add the most value. If you are running a business, examine   if there are any aspects of your work (such as accounting, designing,   programming) that can be outsourced to others. There's no need for you to learn   and get hands-on on every single thing, especially if it's not the core of your   work.&lt;/LI&gt;  &lt;BR&gt;  &lt;LI&gt;Wait. &lt;BR&gt;    Sometimes, waiting may be the best solution. Things resolve   themselves when you wait for a little while longer. I have experienced fixes   that rectify themselves when I waited a while longer. If you are stuck in a   dilemma, new solutions may pop in if you pause your steps.&lt;/LI&gt;  &lt;BR&gt;  &lt;LI&gt;Pick   your battles. &lt;BR&gt;    We often face roadblocks in things we do. Go up against   the roadblocks only if they are worth the time and effort. That means you need   to consciously weigh out the pros and cons first. Don't try to ram up against   every barrier you face, especially if there's nothing much on the other   side.&lt;/LI&gt;  &lt;BR&gt;  &lt;LI&gt;Always lookout   for a better way. &lt;BR&gt;    Don't restrict yourself to a certain set rule of   doing things just for the sake of status quo. Study others and learn from them   (#7). Review your situation regularly (#18) and look for ways to improve what   you are doing. Be flexible to usher in changes that can help you get more   results.&lt;/LI&gt;  &lt;BR&gt;  &lt;LI&gt;Stop   when you are tired.&lt;BR&gt;    I've realized from experience that trying to press   on when you are tired only leads to slumps and ruts. Resting is paramount to   accomplishing more. A tired person can't do meaningful work. When you are   well-rested, you work faster and better.&lt;/LI&gt;  &lt;BR&gt;  &lt;LI&gt;Review   regularly. &lt;BR&gt;    Do a regular review of what you have done in the past week   and the corresponding results. Then analyze the things that are working and the   things that aren't working. With the former, keep them; with the latter, remove   them. Very soon you will have a very streamlined list of things that   work.&lt;BR&gt;  &lt;/LI&gt;&lt;/OL&gt;&lt;BR&gt;&lt;DIV id="write"&gt;  &lt;TABLE&gt;    &lt;TBODY&gt;      &lt;TR&gt;        &lt;TD vAlign="left"&gt;&lt;A href="http://www.dumblittleman.com/"&gt;&lt;IMG src="http://i7.photobucket.com/albums/y281/irw2003/CelestineChua.jpg" alt="18 good points" align="left" title="Celestine Chua"&gt;&lt;/A&gt;&lt;/TD&gt;        &lt;TD&gt;Written on 6/24/2010 by &lt;A href="http://celestinechua.com/about/" rel="nofollow"&gt;Celestine Chua&lt;/A&gt;. Celestine writes at&lt;A href="http://celestinechua.com/blog/" rel="nofollow" target="_blank"&gt;The Personal   Excellence Blog&lt;/A&gt;, where she shares her best advice on how to achieve personal   excellence and live your best life. Get her &lt;A href="http://feeds.feedburner.com/celestinechua/" rel="nofollow" target="_blank"&gt;RSS   feed here&lt;/A&gt;and add her on Twitter &lt;A href="http://twitter.com/celestinechua" rel="nofollow" target="_blank"&gt;@celestinechua&lt;/A&gt;.&lt;/TD&gt;        &lt;TD vAlign="bottom" align="right"&gt;Photo Credit: &lt;A href="http://www.flickr.com/photos/goincase/3772817986/" rel="nofollow"&gt;Incase.&lt;/A&gt;&lt;/TD&gt;      &lt;/TR&gt;    &lt;/TBODY&gt;  &lt;/TABLE&gt;&lt;/DIV&gt;Reference soure:&amp;nbsp;&lt;a href="http://www.dumblittleman.com/2010/06/working-hard-is-not-enough-heres-18.html"&gt;Source Link&lt;/a&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8720089400708057271-5842953898976185877?l=soksong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://soksong.blogspot.com/feeds/5842953898976185877/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8720089400708057271&amp;postID=5842953898976185877' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8720089400708057271/posts/default/5842953898976185877'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8720089400708057271/posts/default/5842953898976185877'/><link rel='alternate' type='text/html' href='http://soksong.blogspot.com/2010/06/working-hard-is-not-enough-heres-18.html' title='Working Hard Is not Enough. Here&apos;s 18 Ways to Work Smart'/><author><name>Mr. Song</name><uri>http://www.blogger.com/profile/17664450785665137238</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/__Id2wWZQAbA/SL_Kyiq1UkI/AAAAAAAAAAQ/n7y8DFhUhSc/S220/song1_.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8720089400708057271.post-5523360194936429636</id><published>2010-06-24T15:30:00.000+07:00</published><updated>2010-06-24T15:30:07.052+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='VB.Net'/><title type='text'>Using Khmer Unicode and Save Image to SQL Server in VB 2008</title><content type='html'>&lt;blockquote&gt;'Please attach the database to your SQL Server 2000 Database first.&lt;br /&gt;Public pubCnn As New OleDb.OleDbConnection&lt;br /&gt;Public strCnn As String = "Provider=SQLOLEDB.1; Data Source=.; " &amp;amp; _&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; " Initial Catalog=SCHOOLSTAT; User ID=sa; Password=;"&lt;br /&gt;'insert data to table&lt;br /&gt;Dim cmd As New OleDb.OleDbCommand&lt;br /&gt;Dim arrImage As Byte()&lt;br /&gt;Dim myMS As New IO.MemoryStream&lt;br /&gt;Dim strImage As String = ""&lt;br /&gt;If Not IsNothing(Me.picPhoto.Image) Then&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Me.picPhoto.Image.Save(myMS, Me.picPhoto.Image.RawFormat)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arrImage = myMS.GetBuffer&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strImage = "?"&lt;br /&gt;Else&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arrImage = Nothing&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; strImage = "NULL"&lt;br /&gt;End If&lt;br /&gt;--------------&lt;br /&gt;cmd.Connection = pubCnn&lt;br /&gt;If Me.id = 0 Then&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id = GetSchoolID()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cmd.CommandText = "INSERT INTO school(id, schoolcode, name" &amp;amp; _&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ",provinceid,phone,type, photo) " &amp;amp; _&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; " VALUES(" &amp;amp; id &amp;amp; "," &amp;amp; SQLString(Me.txtSchoolCode.Text) &amp;amp; _&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "," &amp;amp; SQLString(Me.txtSchoolName.Text) &amp;amp; _&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "," &amp;amp; prID &amp;amp; "," &amp;amp; _&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SQLString(Me.txtPhone.Text) &amp;amp; "," &amp;amp; schtype &amp;amp; _&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "," &amp;amp; strImage &amp;amp; ")"&lt;br /&gt;If strImage &amp;lt;&amp;gt; "NULL" Then&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Dim cmdPar As New OleDb.OleDbParameter&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cmdPar = cmd.Parameters.Add("?", OleDb.OleDbType.Binary)&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cmdPar.Value = arrImage&lt;br /&gt;End If &lt;br /&gt;&lt;a href="http://krookroo.com/it/vb2008/it-vb9-7.rar"&gt;Download Source Code and Database&amp;nbsp;Here&lt;/a&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8720089400708057271-5523360194936429636?l=soksong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://soksong.blogspot.com/feeds/5523360194936429636/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8720089400708057271&amp;postID=5523360194936429636' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8720089400708057271/posts/default/5523360194936429636'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8720089400708057271/posts/default/5523360194936429636'/><link rel='alternate' type='text/html' href='http://soksong.blogspot.com/2010/06/using-khmer-unicode-and-save-image-to.html' title='Using Khmer Unicode and Save Image to SQL Server in VB 2008'/><author><name>Mr. Song</name><uri>http://www.blogger.com/profile/17664450785665137238</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/__Id2wWZQAbA/SL_Kyiq1UkI/AAAAAAAAAAQ/n7y8DFhUhSc/S220/song1_.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8720089400708057271.post-316895633433529050</id><published>2010-06-24T15:11:00.000+07:00</published><updated>2010-06-24T15:11:28.222+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Good Idea'/><title type='text'>The New Rules of Money</title><content type='html'>&lt;div&gt;&lt;h3&gt;THE OLD RULES:&lt;/h3&gt;&lt;ol&gt;&lt;li&gt;&lt;strong&gt;Go to school so you can get a safe, secure job.&lt;/strong&gt; During my dad’s time, people did this. They went to school, got a job, and stayed with the company until they retired. Today, we all know that job security is a myth, especially as jobs are exported. Billions of people in the third world enter the global market competing for your job at a lower wage, and technology wipes out companies that do not stay competitive. Today, rather than having a job for life, those born after 1970 will probably have four to seven jobs in their lifetime.&lt;br /&gt;&amp;nbsp; &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Work hard, climb the ladder, and earn more money.&lt;/strong&gt; The problem with working hard as an employee is the tax laws are written against employees. The more money an employee makes, the higher the percentage in taxes the government takes. &lt;br /&gt;&amp;nbsp; &lt;br /&gt;Most of us have heard Warren Buffett say that he thought it unfair that he pays a lower percentage in taxes than his secretary.&lt;br /&gt;&amp;nbsp; &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Save money.&lt;/strong&gt; Savers are losers, especially if you are saving U.S. dollars. Since 1971, the U.S. has been able to print money faster than the country earns it. This causes the value of savings to erode as prices increase. Adolf Hitler was elected Chancellor of Germany after the middle class had their savings wiped out due to hyperinflation. Stalin and Mao also rose to power when the previous leaders devalued their money.&lt;br /&gt;&amp;nbsp; &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Get out of debt.&lt;/strong&gt; Because the value of the U.S. dollar is falling rapidly, it is important to know the difference between good debt and bad debt. Unfortunately, even the U.S. banks are loaded with bad debt, a.k.a. subprime debt. If you want to become wealthy in a subprime world, it is important to know how to use good debt to offset the falling value of the U.S. dollar. If they are smart, debtors can be winners.&lt;br /&gt;&amp;nbsp; &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Invest in a well-diversified portfolio of mutual funds through your company’s 401(k).&lt;/strong&gt; First of all, Warren Buffett does not diversify. He says, “Diversification is for people who do not know what they are doing.” Second of all, John Bogle, founder of The Vanguard Group and one of the more brilliant minds in investing today, says that mutual fund companies have been ripping investors off. He states that investors in mutual funds put up 100% of the capital, absorb 100% of the risk, and receive only 20% of the rewards. The 80% in investor gains goes to the mutual fund company. On top of that, the Wall Street Journal called the last ten years “the lost decade” because there have been no real profits in stocks for the past ten years. &lt;/li&gt;&lt;/ol&gt;&lt;h3&gt;THE NEW RULES:&lt;/h3&gt;&lt;ol&gt;&lt;li&gt;&lt;strong&gt;Keep your daytime job but start a part-time business.&lt;/strong&gt; In other words, become an entrepreneur at home. Not only will you learn a lot, but the tax rules of the rich swing to your favor. If your business grows and can replace the income from your job, you may be ready to spread your wings and fly. As you may know, the richest people on earth are entrepreneurs who invest in real estate.&lt;br /&gt;&amp;nbsp; &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Become an entrepreneur.&lt;/strong&gt; The world’s most successful entrepreneurs did not go to school nor did they climb the corporate ladder. Many of the most famous entrepreneurs did not do well in school. Some of them are: Henry Ford, founder of Ford Motor Company. Ford could use the old man today. Thomas Edison, the founder of General Electric, was called “addled” by his teachers. Others include Bill Gates of Microsoft, Michael Dell of Dell Computers, Steve Jobs of Apple, Richard Branson of Virgin. &lt;br /&gt;&amp;nbsp; &lt;br /&gt;Today, for a country to remain competitive, we need more entrepreneurs and fewer employees. With more entrepreneurs and fewer employees, wages could go back up. Unfortunately, most parents still say to their kids, “Go to school so you can get a job.” In other words, many people and our schools program kids to be employees – rather than entrepreneurs. &lt;br /&gt;&amp;nbsp; &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Hedge your money.&lt;/strong&gt; Instead of saving money, keep your money liquid in assets that increase in value as the dollar drops in value. Personally, I keep my liquidity in gold and silver ETFs. I buy every time the price of gold or silver goes down. Today, as I write, I believe gold is a good price under $1000 and silver a bargain at under $25. If I need cash in a hurry, I sell my gold or silver ETFs.&lt;br /&gt;&amp;nbsp; &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Use debt as leverage.&lt;/strong&gt; I am deeply in debt… good debt. I use debt to make me richer. I could pay off my home, but my effective interest is only 6%. As long as I can earn a 15% or higher return on my money, I’ll invest my money rather than pay off debt. &lt;br /&gt;&amp;nbsp; &lt;br /&gt;If you are a professional investor, a 50% to an infinite return on your money is possible. If you would like to find out how I achieve an infinite return, read my latest book, Rich Dad’s Increase Your Financial IQ. &lt;br /&gt;&amp;nbsp; &lt;br /&gt;One reason I do not diversify is because diversification is like going to the racetrack and betting on every horse. The only way you win by diversifying at the racetrack is if the dark horse wins. I would prefer to focus and pick winners. One myth in investing is that higher returns require higher risks. That is a huge myth. As Buffett says, “Risk comes from not knowing what you are doing.” &lt;br /&gt;&amp;nbsp; &lt;/li&gt;&lt;li&gt;&lt;strong&gt;Know the difference between salespeople and rich people.&lt;/strong&gt; One of the reasons so many people are in trouble financially today is because they get their financial advice from sales people. Today, I cringe whenever I hear so-called investment gurus, who are really sales people, recommending the old rules of money. As Warren Buffett says, “Wall Street is the only place that people ride to in a Rolls Royce to get advice from those who take the subway.” &lt;br /&gt;&amp;nbsp; &lt;br /&gt;Steve Forbes is a rich person who knows what he is talking about. His column in Forbes magazine, Fact and Comment, is a column I look forward to every month. If you want to grow rich – and stay rich – investing a few moments with Mr. Forbes is a priceless investment of your time. &lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;div align="right"&gt;&lt;em&gt;by: by Robert Kiyosaki&lt;/em&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/8720089400708057271-316895633433529050?l=soksong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://soksong.blogspot.com/feeds/316895633433529050/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8720089400708057271&amp;postID=316895633433529050' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8720089400708057271/posts/default/316895633433529050'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8720089400708057271/posts/default/316895633433529050'/><link rel='alternate' type='text/html' href='http://soksong.blogspot.com/2010/06/new-rules-of-money.html' title='The New Rules of Money'/><author><name>Mr. Song</name><uri>http://www.blogger.com/profile/17664450785665137238</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/__Id2wWZQAbA/SL_Kyiq1UkI/AAAAAAAAAAQ/n7y8DFhUhSc/S220/song1_.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8720089400708057271.post-6467146111977911992</id><published>2010-06-24T15:04:00.000+07:00</published><updated>2010-06-24T15:04:42.144+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='VB.Net'/><title type='text'>VB.Net 2008 OleDb Connect to MS-Access with Password (Visual Basic 2008)</title><content type='html'>To day i have found the way, how to make connection from VB.Net 2008 to Ms. Access from my friend block then i would like to keep on my block as well, if you interest then please try it with me here below.&lt;br /&gt;&lt;blockquote&gt;&lt;/font&gt;&lt;span style="color: blue; font-size: x-small;"&gt;&lt;span style="color: blue; font-size: x-small;"&gt;As&lt;/span&gt;&lt;/span&gt;&lt;span style="color: black; font-size: x-small;"&gt; &lt;/span&gt;&lt;span style="color: blue; font-size: x-small;"&gt;&lt;span style="color: blue; font-size: x-small;"&gt;New&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;span style="color: black;"&gt; OleDb.OleDbConnection&lt;/span&gt;con.ConnectionString = &lt;/span&gt;&lt;span style="color: #a31515; font-size: x-small;"&gt;&lt;span style="color: #a31515; font-size: x-small;"&gt;"Provider=Microsoft.Jet.OLEDB.4.0; Data Source="&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &amp;amp; _&lt;br /&gt;Application.StartupPath &amp;amp; &lt;/span&gt;&lt;span style="color: #a31515; font-size: x-small;"&gt;&lt;span style="color: #a31515; font-size: x-small;"&gt;"\dbstudent.mdb;"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &amp;amp; _&lt;/span&gt;&lt;span style="color: #a31515; font-size: x-small;"&gt;&lt;span style="color: #a31515; font-size: x-small;"&gt;"Jet OLEDB:Database Password=12345"&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;&lt;/span&gt;&lt;br /&gt;con.Open()&lt;br /&gt;&lt;span style="color: green; font-size: x-small;"&gt;&lt;span style="color: green; font-size: x-small;"&gt;'----------------------&lt;/span&gt;&lt;/span&gt;&lt;span style="color: blue; font-size: x-small;"&gt;&lt;span style="color: blue; font-size: x-small;"&gt;Dim&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; da &lt;/span&gt;&lt;span style="color: blue; font-size: x-small;"&gt;&lt;span style="color: blue; font-size: x-small;"&gt;As&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;span style="color: blue; font-size: x-small;"&gt;&lt;span style="color: blue; font-size: x-small;"&gt;New&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt; OleDb.OleDbDataAdapter(&lt;/span&gt;&lt;span style="color: #a31515; font-size: x-small;"&gt;&lt;span style="color: #a31515; font-size: x-small;"&gt;"SELECT * FROM tblstudent"&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size: x-small;"&gt;, con)&lt;/span&gt;&lt;span style="color: green; font-size: x-small;"&gt;&lt;span style="color: green; font-size: x-small;"&gt;'----------&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;con.Close()&lt;br /&gt;con.Dispose()&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;em&gt;Refference source&lt;/em&gt;:&amp;nbsp;&lt;a href="http://krookroo.com/programming-languages/ms-visual-basic-20052008/87-it-vb9-8.html"&gt;Iech Setha&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8720089400708057271-6467146111977911992?l=soksong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://soksong.blogspot.com/feeds/6467146111977911992/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8720089400708057271&amp;postID=6467146111977911992' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8720089400708057271/posts/default/6467146111977911992'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8720089400708057271/posts/default/6467146111977911992'/><link rel='alternate' type='text/html' href='http://soksong.blogspot.com/2010/06/vbnet-2008-oledb-connect-to-ms-access.html' title='VB.Net 2008 OleDb Connect to MS-Access with Password (Visual Basic 2008)'/><author><name>Mr. Song</name><uri>http://www.blogger.com/profile/17664450785665137238</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/__Id2wWZQAbA/SL_Kyiq1UkI/AAAAAAAAAAQ/n7y8DFhUhSc/S220/song1_.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8720089400708057271.post-3827790594088884601</id><published>2010-06-22T13:35:00.002+07:00</published><updated>2010-06-24T00:28:24.222+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>copy all files from 1 folder to another folder</title><content type='html'>Here is the function which is used for copy all files from 1 folder to another folder&lt;br /&gt;=======================================&lt;br /&gt;function copydir($dirname1,$dirname2) {&lt;br /&gt;&lt;br /&gt;if (is_dir($dirname1))&lt;br /&gt;&lt;br /&gt;$dir_handle = opendir($dirname1);&lt;br /&gt;if (!$dir_handle)&lt;br /&gt;return false;&lt;br /&gt;while($file = readdir($dir_handle)) {&lt;br /&gt;if ($file != "." &amp;amp;&amp;amp; $file != "..") {&lt;br /&gt;if (!is_dir($dirname1."/".$file))&lt;br /&gt;$tempfile=fopen($dirname2."/".$file,"w+");&lt;br /&gt;copy($dirname1."/".$file,$dirname2."/".$file); &lt;br /&gt;//unlink($dirname1."/".$file);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;closedir($dir_handle);&lt;br /&gt;return true;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Here are the files which contain upload file function and you can upload your file by using these files.&lt;br /&gt;=======================================&lt;br /&gt;&lt;br /&gt;1./ http://www.esnips.com/doc/1bc71467-47d8-4085-9afd-d2073c725513/upload&lt;br /&gt;2./ http://www.esnips.com/doc/33d8a913-5bc7-498b-9c26-74f59af4dc07/upload-file&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8720089400708057271-3827790594088884601?l=soksong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://soksong.blogspot.com/feeds/3827790594088884601/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8720089400708057271&amp;postID=3827790594088884601' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8720089400708057271/posts/default/3827790594088884601'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8720089400708057271/posts/default/3827790594088884601'/><link rel='alternate' type='text/html' href='http://soksong.blogspot.com/2010/06/here-is-function-which-is-used-for-copy.html' title='copy all files from 1 folder to another folder'/><author><name>Mr. Song</name><uri>http://www.blogger.com/profile/17664450785665137238</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/__Id2wWZQAbA/SL_Kyiq1UkI/AAAAAAAAAAQ/n7y8DFhUhSc/S220/song1_.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8720089400708057271.post-6025764721140699702</id><published>2010-06-22T00:23:00.001+07:00</published><updated>2010-06-24T00:28:03.330+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='VB.Net'/><title type='text'>Export Data from VB 2008 to Excel</title><content type='html'>&lt;blockquote&gt;Private Sub btnExcel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExcel.Click&lt;br /&gt;&lt;br /&gt;Dim ExcelApp As Object, ExcelBook As Object&lt;br /&gt;Dim ExcelSheet As Object&lt;br /&gt;Dim i As Integer&lt;br /&gt;Dim j As Integer&lt;br /&gt;&lt;br /&gt;'create object of excel&lt;br /&gt;&lt;br /&gt;ExcelApp = CreateObject("Excel.Application")&lt;br /&gt;ExcelBook = ExcelApp.WorkBooks.Add&lt;br /&gt;ExcelSheet = ExcelBook.WorkSheets(1) &lt;br /&gt;With ExcelSheet&lt;br /&gt;For i = 1 To Me.DataGridView1.RowCount&lt;br /&gt;.cells(i, 1) = Me.DataGridView1.Rows(i - 1).Cells("id").Value&lt;br /&gt;For j = 1 To DataGridView1.Columns.Count - 1&lt;br /&gt;.cells(i, j + 1) = DataGridView1.Rows(i - 1).Cells(j).Value&lt;br /&gt;Next&lt;br /&gt;Next&lt;br /&gt;End With&lt;br /&gt;&lt;br /&gt;ExcelApp.Visible = True&lt;br /&gt;'set page margin&lt;br /&gt;ExcelSheet.PageSetup.PaperSize = 9&lt;br /&gt;ExcelSheet.PageSetup.LeftMargin = ExcelApp.InchesToPoints(0.3)&lt;br /&gt;ExcelSheet.PageSetup.RightMargin = ExcelApp.InchesToPoints(0.3)&lt;br /&gt;ExcelSheet.PageSetup.TopMargin = ExcelApp.InchesToPoints(0.3)&lt;br /&gt;ExcelSheet.PageSetup.BottomMargin = ExcelApp.InchesToPoints(0.3) &lt;br /&gt;ExcelSheet.PageSetup.CenterHorizontally = True&lt;br /&gt;&lt;br /&gt;'&lt;br /&gt;ExcelSheet = Nothing&lt;br /&gt;ExcelBook = Nothing&lt;br /&gt;ExcelApp = Nothing&lt;br /&gt;&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;&lt;a href="http://krookroo.com/it/vb2008/exporttoexcelvb2008.rar"&gt;Download Source Code Here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8720089400708057271-6025764721140699702?l=soksong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://soksong.blogspot.com/feeds/6025764721140699702/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8720089400708057271&amp;postID=6025764721140699702' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8720089400708057271/posts/default/6025764721140699702'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8720089400708057271/posts/default/6025764721140699702'/><link rel='alternate' type='text/html' href='http://soksong.blogspot.com/2010/06/export-data-from-vb-2008-to-excel.html' title='Export Data from VB 2008 to Excel'/><author><name>Mr. Song</name><uri>http://www.blogger.com/profile/17664450785665137238</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/__Id2wWZQAbA/SL_Kyiq1UkI/AAAAAAAAAAQ/n7y8DFhUhSc/S220/song1_.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8720089400708057271.post-1522752256097603849</id><published>2010-06-21T22:42:00.001+07:00</published><updated>2010-06-24T00:29:08.552+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Others'/><title type='text'>They can because they think they can</title><content type='html'>&lt;em&gt;They can because they think they can.&lt;/em&gt;&lt;br /&gt;--Virgil &lt;br /&gt;&lt;br /&gt;If you think you can, you can! Do you think you can? I think you can.&lt;br /&gt;&lt;br /&gt;this above idea, only the concept to get understand more how the complicated work we have faced and then then try to solve it step by step with our smarty brand.... hope everything you faced complicated be smoothly solve, i also wish for myselt too... hehehehe....... ha.. good luck for all.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8720089400708057271-1522752256097603849?l=soksong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://soksong.blogspot.com/feeds/1522752256097603849/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8720089400708057271&amp;postID=1522752256097603849' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8720089400708057271/posts/default/1522752256097603849'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8720089400708057271/posts/default/1522752256097603849'/><link rel='alternate' type='text/html' href='http://soksong.blogspot.com/2010/06/they-can-because-they-think-they-can.html' title='They can because they think they can'/><author><name>Mr. Song</name><uri>http://www.blogger.com/profile/17664450785665137238</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/__Id2wWZQAbA/SL_Kyiq1UkI/AAAAAAAAAAQ/n7y8DFhUhSc/S220/song1_.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8720089400708057271.post-7530134008223145063</id><published>2009-06-24T16:08:00.003+07:00</published><updated>2010-06-24T00:31:37.226+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>A Complete E-mail Validation Function</title><content type='html'>Today, I have something to do with an email validate then I had search by google to find all requirement i need to use, a few menuts later I have found this below:&lt;br /&gt;but I am not still main hope of you, however it it the main concept for the email validation and easy use in PHP and not complicated in thinking, coz everything is completed.&lt;br /&gt;//===============================================&lt;br /&gt;&lt;br /&gt;Validate an email address.&lt;br /&gt;Provide email address (raw input)&lt;br /&gt;Returns true if the email address has the email&lt;br /&gt;address format and the domain exists.&lt;br /&gt;*/&lt;br /&gt;function validEmail($email)&lt;br /&gt;{&lt;br /&gt;$isValid = true;&lt;br /&gt;$atIndex = strrpos($email, "@");&lt;br /&gt;if (is_bool($atIndex) &amp;amp;&amp;amp; !$atIndex)&lt;br /&gt;{&lt;br /&gt;$isValid = false;&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;$domain = substr($email, $atIndex+1);&lt;br /&gt;$local = substr($email, 0, $atIndex);&lt;br /&gt;$localLen = strlen($local);&lt;br /&gt;$domainLen = strlen($domain);&lt;br /&gt;if ($localLen &amp;lt;&amp;gt; 64)&lt;br /&gt;{&lt;br /&gt;// local part length exceeded&lt;br /&gt;$isValid = false;&lt;br /&gt;}&lt;br /&gt;else if ($domainLen &amp;lt;&amp;gt; 255)&lt;br /&gt;{&lt;br /&gt;// domain part length exceeded&lt;br /&gt;$isValid = false;&lt;br /&gt;}&lt;br /&gt;else if ($local[0] == '.' || $local[$localLen-1] == '.')&lt;br /&gt;{&lt;br /&gt;// local part starts or ends with '.'&lt;br /&gt;$isValid = false;&lt;br /&gt;}&lt;br /&gt;else if (preg_match('/\\.\\./', $local))&lt;br /&gt;{&lt;br /&gt;// local part has two consecutive dots&lt;br /&gt;$isValid = false;&lt;br /&gt;}&lt;br /&gt;else if (!preg_match('/^[A-Za-z0-9\\-\\.]+$/', $domain))&lt;br /&gt;{&lt;br /&gt;// character not valid in domain part&lt;br /&gt;$isValid = false;&lt;br /&gt;}&lt;br /&gt;else if (preg_match('/\\.\\./', $domain))&lt;br /&gt;{&lt;br /&gt;// domain part has two consecutive dots&lt;br /&gt;$isValid = false;&lt;br /&gt;}&lt;br /&gt;else if&lt;br /&gt;(!preg_match('/^(\\\\.|[A-Za-z0-9!#%&amp;amp;`_=\\/$\'*+?^{}|~.-])+$/',&lt;br /&gt;str_replace("\\\\","",$local)))&lt;br /&gt;{&lt;br /&gt;// character not valid in local part unless&lt;br /&gt;// local part is quoted&lt;br /&gt;if (!preg_match('/^"(\\\\"|[^"])+"$/',&lt;br /&gt;str_replace("\\\\","",$local)))&lt;br /&gt;{&lt;br /&gt;$isValid = false;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;if ($isValid &amp;amp;&amp;amp; !(checkdnsrr($domain,"MX") ||&lt;br /&gt;↪checkdnsrr($domain,"A")))&lt;br /&gt;{&lt;br /&gt;// domain not found in DNS&lt;br /&gt;$isValid = false;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;return $isValid;&lt;br /&gt;}&lt;br /&gt;//===============================================&lt;br /&gt;Reference: &lt;a href="http://www.linuxjournal.com/article/9585"&gt;http://www.linuxjournal.com/article/9585&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8720089400708057271-7530134008223145063?l=soksong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://soksong.blogspot.com/feeds/7530134008223145063/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8720089400708057271&amp;postID=7530134008223145063' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8720089400708057271/posts/default/7530134008223145063'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8720089400708057271/posts/default/7530134008223145063'/><link rel='alternate' type='text/html' href='http://soksong.blogspot.com/2009/06/complete-e-mail-validation-function.html' title='A Complete E-mail Validation Function'/><author><name>Mr. Song</name><uri>http://www.blogger.com/profile/17664450785665137238</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/__Id2wWZQAbA/SL_Kyiq1UkI/AAAAAAAAAAQ/n7y8DFhUhSc/S220/song1_.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8720089400708057271.post-6897278900506720718</id><published>2009-06-18T16:21:00.006+07:00</published><updated>2010-06-24T00:30:43.382+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>calculate (year, month, date) with  PHP DateDiff Function</title><content type='html'>Today, I am really stress with the calculate the number of year, month, date which calcuated from the expired date with the current date, that so, I have search by google then making decision on the following style to improve my problem, and I am still on hesitat it yet, coz it's not fully requirement which I need, but this below function also the rest of solving problem with date... By this point, it show the number of year, or month, or date, .....&lt;code&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;function datediff($interval, $datefrom, $dateto, $using_timestamps = false) {&lt;/code&gt;&lt;br /&gt;&lt;code&gt;/*&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$interval can be:&lt;/code&gt;&lt;br /&gt;&lt;code&gt;yyyy - Number of full years&lt;/code&gt;&lt;br /&gt;&lt;code&gt;q - Number of full quarters&lt;/code&gt;&lt;br /&gt;&lt;code&gt;m - Number of full months&lt;/code&gt;&lt;br /&gt;&lt;code&gt;y - Difference between day numbers&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(eg 1st Jan 2004 is "1", the first day. 2nd Feb 2003 is "33". The datediff is "-32".)&lt;/code&gt;&lt;br /&gt;&lt;code&gt;d - Number of full days&lt;/code&gt;&lt;br /&gt;&lt;code&gt;w - Number of full weekdays&lt;/code&gt;&lt;br /&gt;&lt;code&gt;ww - Number of full weeks&lt;/code&gt;&lt;br /&gt;&lt;code&gt;h - Number of full hours&lt;/code&gt;&lt;br /&gt;&lt;code&gt;n - Number of full minutes&lt;/code&gt;&lt;br /&gt;&lt;code&gt;s - Number of full seconds (default)&lt;/code&gt;&lt;br /&gt;&lt;code&gt;*/&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;if (!$using_timestamps) {&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$datefrom = strtotime($datefrom, 0);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$dateto = strtotime($dateto, 0);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;}&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$difference = $dateto - $datefrom; // Difference in seconds&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;switch($interval) {&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;case 'yyyy': // Number of full years&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$years_difference = floor($difference / 31536000);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;if (mktime(date("H", $datefrom), date("i", $datefrom), date("s", $datefrom), date("n", $datefrom), date("j", $datefrom), date("Y", $datefrom)+$years_difference) &amp;gt; $dateto) {&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$years_difference--;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;}&lt;/code&gt;&lt;br /&gt;&lt;code&gt;if (mktime(date("H", $dateto), date("i", $dateto), date("s", $dateto), date("n", $dateto), date("j", $dateto), date("Y", $dateto)-($years_difference+1)) &amp;gt; $datefrom) {&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$years_difference++;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;}&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$datediff = $years_difference;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;break;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;case "q": // Number of full quarters&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$quarters_difference = floor($difference / 8035200);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;while (mktime(date("H", $datefrom), date("i", $datefrom), date("s", $datefrom), date("n", $datefrom)+($quarters_difference*3), date("j", $dateto), date("Y", $datefrom)) &amp;lt; $dateto) {&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$months_difference++;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;}&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$quarters_difference--;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$datediff = $quarters_difference;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;break;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;case "m": // Number of full months&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$months_difference = floor($difference / 2678400);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;while (mktime(date("H", $datefrom), date("i", $datefrom), date("s", $datefrom), date("n", $datefrom)+($months_difference), date("j", $dateto), date("Y", $datefrom)) &amp;lt; $dateto) {&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$months_difference++;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;}&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$months_difference--;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$datediff = $months_difference;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;break;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;case 'y': // Difference between day numbers&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$datediff = date("z", $dateto) - date("z", $datefrom);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;break;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;case "d": // Number of full days&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$datediff = floor($difference / 86400);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;break;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;case "w": // Number of full weekdays&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$days_difference = floor($difference / 86400);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$weeks_difference = floor($days_difference / 7); // Complete weeks&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$first_day = date("w", $datefrom);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$days_remainder = floor($days_difference % 7);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$odd_days = $first_day + $days_remainder; // Do we have a Saturday or Sunday in the remainder?&lt;/code&gt;&lt;br /&gt;&lt;code&gt;if ($odd_days &amp;gt; 7) { // Sunday&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$days_remainder--;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;}&lt;/code&gt;&lt;br /&gt;&lt;code&gt;if ($odd_days &amp;gt; 6) { // Saturday&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$days_remainder--;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;}&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$datediff = ($weeks_difference * 5) + $days_remainder;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;break;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;case "ww": // Number of full weeks&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$datediff = floor($difference / 604800);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;break;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;case "h": // Number of full hours&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$datediff = floor($difference / 3600);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;break;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;case "n": // Number of full minutes&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$datediff = floor($difference / 60);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;break;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;default: // Number of full seconds (default)&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;$datediff = $difference;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;break;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;} &lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;return $datediff;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;}&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;?&amp;gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;reference : &lt;a href="http://www.addedbytes.com/php/php-datediff-function/"&gt;http://www.addedbytes.com/php/php-datediff-function/&lt;/a&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8720089400708057271-6897278900506720718?l=soksong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://soksong.blogspot.com/feeds/6897278900506720718/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8720089400708057271&amp;postID=6897278900506720718' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8720089400708057271/posts/default/6897278900506720718'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8720089400708057271/posts/default/6897278900506720718'/><link rel='alternate' type='text/html' href='http://soksong.blogspot.com/2009/06/calculate-year-month-date-with-php.html' title='calculate (year, month, date) with  PHP DateDiff Function'/><author><name>Mr. Song</name><uri>http://www.blogger.com/profile/17664450785665137238</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/__Id2wWZQAbA/SL_Kyiq1UkI/AAAAAAAAAAQ/n7y8DFhUhSc/S220/song1_.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8720089400708057271.post-3035210422581386878</id><published>2009-06-15T17:03:00.002+07:00</published><updated>2010-06-24T00:31:10.515+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Others'/><title type='text'>10 ways to Promote</title><content type='html'>by &lt;a class="more" href="http://www.yourhtmlsource.com/about/" title="Yep."&gt;Ross Shannon&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: lucida grande;"&gt;Most people think “website promotion — you mean search engines and stuff, right?” They go and submit to the search engines, do nothing else, and are left staring in disbelief at their barely-twitching hit counter. If only they thought about it some more, they’d realise that the other ‘stuff’ they were talking about is hugely important if you want your site to be attracting the big hits. Let's have a look at 10 easy steps to hit count heaven.&lt;/span&gt;&lt;br /&gt;Reference : &lt;a href="http://www.yourhtmlsource.com/promotion/10ways.html"&gt;http://www.yourhtmlsource.com/promotion/10ways.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8720089400708057271-3035210422581386878?l=soksong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://soksong.blogspot.com/feeds/3035210422581386878/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8720089400708057271&amp;postID=3035210422581386878' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8720089400708057271/posts/default/3035210422581386878'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8720089400708057271/posts/default/3035210422581386878'/><link rel='alternate' type='text/html' href='http://soksong.blogspot.com/2009/06/10-ways-to-promote.html' title='10 ways to Promote'/><author><name>Mr. Song</name><uri>http://www.blogger.com/profile/17664450785665137238</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/__Id2wWZQAbA/SL_Kyiq1UkI/AAAAAAAAAAQ/n7y8DFhUhSc/S220/song1_.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8720089400708057271.post-3308257616738100814</id><published>2009-05-26T16:04:00.009+07:00</published><updated>2010-06-24T00:33:50.751+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>website title randomization</title><content type='html'>Here, this a smallest website tilte randomization code in php which not complicated but it also important for the first step learning with php, I just got it from the website and want to keep it as properties for the general&lt;br /&gt;learning, and still hope that it also concerning with the rest of studying. let me detail code as below:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;&lt;span style="font-family: courier new;"&gt;// get a random number &lt;/span&gt;&lt;span style="font-family: courier new;"&gt;$randomize = rand(0, 4); // Change four to how many arrays you have&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;echo ($title[$randomize]); &lt;/span&gt;&lt;span style="font-family: courier new;"&gt;?&amp;gt;&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;see it in action.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;&lt;span style="font-family: courier new;"&gt;$title[0] = "Web title 0"; // Title 0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;$title[1] = "Web title 1"; // Title 1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;$title[2] = "Web title 2"; // Title 2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;$title[3] = "Web title 3"; // Title 3&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;$title[4] = "Web title 4"; // Title 4&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;// get a random number &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;$randomize = rand(0, 4); // Change four to how many arrays you have &lt;/span&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/8720089400708057271-3308257616738100814?l=soksong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://soksong.blogspot.com/feeds/3308257616738100814/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8720089400708057271&amp;postID=3308257616738100814' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8720089400708057271/posts/default/3308257616738100814'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8720089400708057271/posts/default/3308257616738100814'/><link rel='alternate' type='text/html' href='http://soksong.blogspot.com/2009/05/website-title-randomization.html' title='website title randomization'/><author><name>Mr. Song</name><uri>http://www.blogger.com/profile/17664450785665137238</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/__Id2wWZQAbA/SL_Kyiq1UkI/AAAAAAAAAAQ/n7y8DFhUhSc/S220/song1_.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8720089400708057271.post-4852786389567325951</id><published>2008-09-18T11:55:00.002+07:00</published><updated>2010-06-24T00:30:16.439+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>Method #1</title><content type='html'>The first method is using Pager to create the links only, and let you fetch the relevant records on your own. Instead of passing the array of data to paginate to Pager, you just pass the number of records. In the following example, we'll fetch the records from a table containing some products. The PEAR::MDB2 DBAL is used here, but how you fetch the records isn't relevant.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;require_once 'Pager/Pager.php';&lt;br /&gt;require_once 'MDB2.php';&lt;br /&gt;&lt;br /&gt;//skipped the db connection code...&lt;br /&gt;//let's just suppose we have a valid db connection in $db.&lt;br /&gt;&lt;br /&gt;//first, we use Pager to create the links&lt;br /&gt;$num_products = $db-&amp;gt;queryOne('SELECT COUNT(*) FROM products');&lt;br /&gt;$pager_options = array(&lt;br /&gt;'mode' =&amp;gt; 'Sliding',&lt;br /&gt;'perPage' =&amp;gt; 10,&lt;br /&gt;'delta' =&amp;gt; 2,&lt;br /&gt;'totalItems' =&amp;gt; $num_products,&lt;br /&gt;);&lt;br /&gt;&lt;br /&gt;$pager = Pager::factory($pager_options);&lt;br /&gt;&lt;br /&gt;//then we fetch the relevant records for the current page&lt;br /&gt;list($from, $to) = $pager-&amp;gt;getOffsetByPageId();&lt;br /&gt;//set the OFFSET and LIMIT clauses for the following query&lt;br /&gt;$db-&amp;gt;setLimit($pager_options['perPage'], $from - 1);&lt;br /&gt;$query = 'SELECT prod_name, prod_description FROM products';&lt;br /&gt;$products = $db-&amp;gt;queryAll($query, null, MDB2_FETCHMODE_ASSOC);&lt;br /&gt;&lt;br /&gt;//show the results&lt;br /&gt;echo '&lt;br /&gt;&lt;ul&gt;';&lt;br /&gt;foreach ($products as $product) {&lt;br /&gt;echo '&lt;li&gt;'.$product['prod_name'].': '.$product['prod_description'].'&lt;/li&gt;';&lt;br /&gt;}&lt;br /&gt;echo '&lt;/ul&gt;';&lt;br /&gt;&lt;br /&gt;//show the links&lt;br /&gt;echo $pager-&amp;gt;links;&lt;br /&gt;?&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.alberton.info/pear_pager_tutorial_database_results.html"&gt;Reference&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8720089400708057271-4852786389567325951?l=soksong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://soksong.blogspot.com/feeds/4852786389567325951/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8720089400708057271&amp;postID=4852786389567325951' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8720089400708057271/posts/default/4852786389567325951'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8720089400708057271/posts/default/4852786389567325951'/><link rel='alternate' type='text/html' href='http://soksong.blogspot.com/2008/09/method-1.html' title='Method #1'/><author><name>Mr. Song</name><uri>http://www.blogger.com/profile/17664450785665137238</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/__Id2wWZQAbA/SL_Kyiq1UkI/AAAAAAAAAAQ/n7y8DFhUhSc/S220/song1_.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8720089400708057271.post-6017148079446255909</id><published>2008-09-18T11:15:00.003+07:00</published><updated>2010-06-24T00:29:41.314+07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><title type='text'>Paginating Database Records (PHP)</title><content type='html'>class Users extends Model{&lt;br /&gt;&lt;br /&gt;function Users(){&lt;br /&gt;&lt;br /&gt;// call the Model constructor&lt;br /&gt;&lt;br /&gt;parent::Model();&lt;br /&gt;&lt;br /&gt;// load database class and connect to MySQL&lt;br /&gt;&lt;br /&gt;$this-&amp;gt;load-&amp;gt;database();&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function getAllUsers(){&lt;br /&gt;&lt;br /&gt;$query=$this-&amp;gt;db-&amp;gt;get('users');&lt;br /&gt;&lt;br /&gt;if($query-&amp;gt;num_rows()&amp;gt;0){&lt;br /&gt;&lt;br /&gt;// return result set as an associative array&lt;br /&gt;&lt;br /&gt;return $query-&amp;gt;result_array();&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function getUsersWhere($field,$param){&lt;br /&gt;&lt;br /&gt;$this-&amp;gt;db-&amp;gt;where($field,$param);&lt;br /&gt;&lt;br /&gt;$query=$this-&amp;gt;db-&amp;gt;get('users');&lt;br /&gt;&lt;br /&gt;// return result set as an associative array&lt;br /&gt;&lt;br /&gt;return $query-&amp;gt;result_array();&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// get 5 rows at a time&lt;br /&gt;&lt;br /&gt;function getUsers($row){&lt;br /&gt;&lt;br /&gt;$query=$this-&amp;gt;db-&amp;gt;get('users',5,$row);&lt;br /&gt;&lt;br /&gt;if($query-&amp;gt;num_rows()&amp;gt;0){&lt;br /&gt;&lt;br /&gt;// return result set as an associative array&lt;br /&gt;&lt;br /&gt;return $query-&amp;gt;result_array();&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;// get total number of users&lt;br /&gt;&lt;br /&gt;function getNumUsers(){&lt;br /&gt;&lt;br /&gt;return $this-&amp;gt;db-&amp;gt;count_all('users');&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.devshed.com/c/a/PHP/Paginating-Database-Records-with-the-Code-Igniter-PHP-Framework/1/"&gt;Reference&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8720089400708057271-6017148079446255909?l=soksong.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://soksong.blogspot.com/feeds/6017148079446255909/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8720089400708057271&amp;postID=6017148079446255909' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8720089400708057271/posts/default/6017148079446255909'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8720089400708057271/posts/default/6017148079446255909'/><link rel='alternate' type='text/html' href='http://soksong.blogspot.com/2008/09/paginating-database-records.html' title='Paginating Database Records (PHP)'/><author><name>Mr. Song</name><uri>http://www.blogger.com/profile/17664450785665137238</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='25' height='32' src='http://1.bp.blogspot.com/__Id2wWZQAbA/SL_Kyiq1UkI/AAAAAAAAAAQ/n7y8DFhUhSc/S220/song1_.jpg'/></author><thr:total>1</thr:total></entry></feed>
