<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-364943231029974825</id><updated>2026-03-20T12:11:45.043+05:00</updated><category term="jQuery"/><category term="form"/><category term="form validation"/><category term="java"/><category term="javascript"/><category term="win 7"/><category term="ADO.NET"/><category term="PHP"/><category term="adapter"/><category term="button"/><category term="c#"/><category term="code"/><category term="custom"/><category term="date"/><category term="html"/><category term="image"/><category term="nice"/><category term=".flv"/><category term="3rd party"/><category term="90-10 rule"/><category term="ArrayAdapter"/><category term="Injection"/><category term="ListView"/><category term="SQL"/><category term="VMPlayer"/><category term="VirtualKD"/><category term="WinDbg"/><category term="algorithm"/><category term="android"/><category term="architecture"/><category term="bluetooth"/><category term="box model"/><category term="c++"/><category term="codes"/><category term="cool"/><category term="css"/><category term="customization"/><category term="debugging"/><category term="design"/><category term="dial-up"/><category term="dllhell"/><category term="downloader"/><category term="driver"/><category term="edge"/><category term="event"/><category term="feature list"/><category term="fedora"/><category term="flash video"/><category term="flv"/><category term="function"/><category term="gimp"/><category term="gprs"/><category term="jdk 7"/><category term="js"/><category term="kernel"/><category term="lan"/><category term="linux"/><category term="looking"/><category term="message box"/><category term="mfc"/><category term="modal message box"/><category term="modem"/><category term="mtk"/><category term="multiple"/><category term="necessary"/><category term="nic"/><category term="optimization"/><category term="picker"/><category term="plugins"/><category term="resize"/><category term="rollover"/><category term="side by side configuration"/><category term="slide show"/><category term="software"/><category term="stack"/><category term="theme"/><category term="time"/><category term="validation"/><category term="windows"/><category term="wp"/><category term="xp"/><category term="you tube downloader"/><title type='text'>diGital eFFects</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://yourdigitaleffects.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default'/><link rel='alternate' type='text/html' href='http://yourdigitaleffects.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default?start-index=26&amp;max-results=25'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09514196229867295024</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>27</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-364943231029974825.post-8726462903728740257</id><published>2013-03-27T23:26:00.000+07:00</published><updated>2013-03-27T23:26:10.580+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="adapter"/><category scheme="http://www.blogger.com/atom/ns#" term="android"/><category scheme="http://www.blogger.com/atom/ns#" term="ArrayAdapter"/><category scheme="http://www.blogger.com/atom/ns#" term="custom"/><category scheme="http://www.blogger.com/atom/ns#" term="ListView"/><title type='text'>Android: Custom ListView</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;br /&gt;
Android provides a rich development environment for the developers. It has many widgets built in which can satisfy the needs of the developer. Even if those element cannot full fill developer&#39;s requirements; they can still be easily extended to fit the requirement.&lt;br /&gt;
&lt;br /&gt;
One such example would be the Custom ListView. Android provides ListView element to display items in a vertical scrolling list. User can navigate through that list and can perform action such as Tap, Long Tap or double Tap.&lt;br /&gt;
&lt;br /&gt;
But what if we need to change the default list view? What if we need to add custom element into the view along with the text? This can be easily achieved through extending the Adapter class in android.&lt;br /&gt;
&lt;br /&gt;
One popular Adapter type is ArrayAdapter which can be extended to provide custom view to the list view.&lt;br /&gt;
&lt;br /&gt;
You can think the Adapter class as the Content Provider for the list view. Every listview has an associated Adapter which provides data to populate it&#39;s view. If the ListView requires to display a item on it&#39;s list, it asks the Adapter to fill it&#39;s view for that position. Adapter then fill up the view and return the view to the list view. That view is shown to the user.&lt;br /&gt;
&lt;br /&gt;
So lets get down to business !!!&lt;br /&gt;
&lt;br /&gt;
You will need to define two layout xml for your custom layout. Because the layout works like just below -&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRF_Z0jFoCpJlAIZR3D-je4fCGZj57fEHPd10ht_2Bubv3BzMic4kgkoGp6dVaoFfseKfoLhEQonGwMfAHAUjVsAdgL8mbTYI6vZllcCus-sEVRJ_kbFIGW7MxxYBYglUDGjhZsp4QEDF3/s1600/layout_system.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRF_Z0jFoCpJlAIZR3D-je4fCGZj57fEHPd10ht_2Bubv3BzMic4kgkoGp6dVaoFfseKfoLhEQonGwMfAHAUjVsAdgL8mbTYI6vZllcCus-sEVRJ_kbFIGW7MxxYBYglUDGjhZsp4QEDF3/s320/layout_system.png&quot; width=&quot;316&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span id=&quot;goog_1595321966&quot;&gt;&lt;/span&gt;&lt;span id=&quot;goog_1595321967&quot;&gt;&lt;/span&gt;&lt;br /&gt;
So, Generally ListView will reside in the main.xml which is our view for this Activity.&lt;br /&gt;
And rowlayout.xml will be used by our extended ArrayAdapter to populate and return a single row element in the list whenever the list asks for it.&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;main.xml&lt;/span&gt;&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;br /&gt;&amp;lt;LinearLayout&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_width=&quot;fill_parent&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_height=&quot;fill_parent&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; android:orientation=&quot;vertical&quot;&amp;gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ListView&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;u&gt;&lt;span style=&quot;color: red;&quot;&gt;android:id=&quot;@+id/countryLV&quot;&lt;/span&gt;&lt;/u&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_width=&quot;fill_parent&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; android:layout_height=&quot;fill_parent&quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/ListView&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;/LinearLayout&amp;gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;br /&gt;
And our row element layout - &lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;rowlayout.xml &lt;/span&gt;&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&amp;nbsp;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;br /&gt;&amp;lt;LinearLayout&lt;br /&gt;&amp;nbsp; xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&lt;br /&gt;&amp;nbsp; &lt;u&gt;&lt;span style=&quot;color: red;&quot;&gt;android:orientation=&quot;horizontal&quot;&lt;/span&gt;&lt;/u&gt;&lt;br /&gt;&amp;nbsp; android:layout_width=&quot;fill_parent&quot;&lt;br /&gt;&amp;nbsp; android:layout_height=&quot;wrap_content&quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ImageView&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;u&gt;&lt;span style=&quot;color: red;&quot;&gt;android:id=&quot;@+id/imgV&quot;&lt;/span&gt;&lt;/u&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;android:maxWidth=&quot;100dip&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;android:maxHeight=&quot;75dip&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;android:layout_width=&quot;100dip&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;android:layout_height=&quot;75dip&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;LinearLayout&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;xmlns:andxmlns=&quot;http://schemas.android.com/apk/res/android&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;u&gt;&lt;span style=&quot;color: red;&quot;&gt;android:orientation=&quot;vertical&quot;&lt;/span&gt;&lt;/u&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;android:layout_width=&quot;wrap_content&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;android:layout_height=&quot;wrap_content&quot; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;TextView&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;u&gt;&lt;span style=&quot;color: red;&quot;&gt;android:id=&quot;@+id/txtV&quot;&lt;/span&gt;&lt;/u&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;android:layout_width=&quot;wrap_content&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;android:layout_height=&quot;wrap_content&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;android:textSize=&quot;40px&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;android:textStyle=&quot;bold&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;TextView&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;u&gt;&lt;span style=&quot;color: red;&quot;&gt;android:id=&quot;@+id/txtVDescription&quot;&lt;/span&gt;&lt;/u&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;android:layout_width=&quot;fill_parent&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;android:layout_height=&quot;wrap_content&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;android:textSize=&quot;20px&quot;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;android:textStyle=&quot;italic&quot; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/LinearLayout&amp;gt;&lt;br /&gt;&amp;lt;/LinearLayout&amp;gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;br /&gt;
&amp;nbsp;Important lines are marked red with underline to highlight them. Most of them are under &quot;android:id&quot; tag, this tag is used to reference back to this element in java code.&lt;br /&gt;
&lt;br /&gt;
Thing to notice is how the layout is formed, First we took a horizontal layout, this way our elements will be added horizontally. Then we add our image, which will be left of our row. Next again we add a vertical layout; this ensures the addition of two text elements will be arranged vertically just beside the image. &lt;br /&gt;
&lt;br /&gt;
Next is our Java Code, we need two classes. One is our version of ArrayAdapter and another is the actual Activity class.&lt;br /&gt;
&lt;br /&gt;
First our version of ArrayAdapter&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;MySimpleAdapter.java&lt;/span&gt;&lt;/b&gt;&lt;/u&gt; &lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;public class MySimpleAdapter extends ArrayAdapter&amp;lt;String&amp;gt;{&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private final Context context;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; private final String [] values;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public MySimpleAdapter(Context context,&amp;nbsp;&amp;nbsp;&amp;nbsp; String [] values) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; super(context, R.layout.rowlayout, values);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; this.context = context;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; this.values = values;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;u&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;public View getView(int position, View convertView, ViewGroup parent)&lt;/span&gt;&lt;/b&gt;&lt;/u&gt; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; LayoutInflater inflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; View myView = inflater.inflate(R.layout.rowlayout, parent, false);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; TextView tView = (TextView)myView.findViewById(R.id.txtV);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; TextView tVD = (TextView)myView.findViewById(R.id.txtVDescription);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; tVD.setText(values[position]);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ImageView imgView = (ImageView) myView.findViewById(R.id.imgV);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; tView.setText(values[position]);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; imgView.setImageResource(R.drawable.icon);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return myView;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;}&lt;/span&gt;&lt;/blockquote&gt;
&lt;br /&gt;
As you can see that our Adapter class extends the ArrayAdapter&amp;lt;String&amp;gt;. We passed the elements in the constructor of this class which is again passed to the super class.&lt;br /&gt;
&lt;br /&gt;
The most important function to override is the &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;u&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;getView&lt;/span&gt;&lt;/b&gt;&lt;/u&gt;&lt;span style=&quot;color: red;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;method. Whenever the list view wants to populate its view, it will ask our adapter through this method. In this method we inflate a view based on row layout and fill up the elements in it. And then return the inflated view. This view is then shown by the listview element. 2nd parameter of this method, convertView, is used to recycle the view. But we left it for simplicity.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Last class will be our actual activity -&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;ListViewLearn2Activity.java &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;font-family: Times,&amp;quot;Times New Roman&amp;quot;,serif;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;public class ListViewLearn2Activity extends Activity {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; /** Called when the activity is first created. */&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @Override&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void onCreate(Bundle savedInstanceState) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; super.onCreate(savedInstanceState);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; setContentView(R.layout.main);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ListView lv = (ListView) findViewById(R.id.countryLV);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String[] values = new String[] { &quot;Item1&quot;, &quot;Item2&quot;, &quot;Item3&quot;, &quot;Item4&quot;, &quot;Item5&quot;, &quot;Item6&quot;, &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;&quot;Item7&quot;, &quot;Item8&quot;, &quot;Item9&quot;, &quot;Item10&quot;, &quot;Item11&quot;, &quot;Item12&quot;};&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;MySimpleAdapter adapter = new MySimpleAdapter(this, values);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;nbsp;lv.setAdapter(adapter);&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;br /&gt;
Trivial stuffs here.&lt;br /&gt;
So, this concludes the demonstration of how easily you can create your own custom list view in android.&lt;br /&gt;
&lt;br /&gt;
Let me know your thoughts.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.mediafire.com/?o222q9ukd42ata9&quot;&gt;Download entire project here. &lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://yourdigitaleffects.blogspot.com/feeds/8726462903728740257/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourdigitaleffects.blogspot.com/2013/03/android-custom-listview.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/8726462903728740257'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/8726462903728740257'/><link rel='alternate' type='text/html' href='http://yourdigitaleffects.blogspot.com/2013/03/android-custom-listview.html' title='Android: Custom ListView'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09514196229867295024</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRF_Z0jFoCpJlAIZR3D-je4fCGZj57fEHPd10ht_2Bubv3BzMic4kgkoGp6dVaoFfseKfoLhEQonGwMfAHAUjVsAdgL8mbTYI6vZllcCus-sEVRJ_kbFIGW7MxxYBYglUDGjhZsp4QEDF3/s72-c/layout_system.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-364943231029974825.post-4481034459794821589</id><published>2012-10-20T00:39:00.000+07:00</published><updated>2012-10-20T00:39:23.138+07:00</updated><title type='text'>Implicitly linking DLL with VS2010 or earlier </title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
You may be wondering what is &quot;Implicit DLL linking&quot;. There are two 
way to link to a DLL one is &quot;Implicit&quot; another one is &quot;explicit&quot;.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
When
 you are the builder of the DLL or you have the exported symbol 
definition file or the exported lib, you can add the DLL simply by 
incorporating the .DEF (definition file) or the .lib file to the project
 properties.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
But when you do not have the any of the things 
mentioned above, you have to load the DLL explicitly by using 
&quot;LoadLibrary&quot; win32 API, get the function pointer by calling 
&quot;GetProcAddress&quot; and the calling the function using the function 
pointer.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Today I am going to discuss how to &quot;Implicit&quot; link DLL file into your application.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
First open a DLL project - usually a win32 project.&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a data-mce-href=&quot;http://yourdigitaleffects.files.wordpress.com/2012/04/dll-project-01.png&quot; href=&quot;http://yourdigitaleffects.files.wordpress.com/2012/04/dll-project-01.png&quot;&gt;&lt;img alt=&quot;win32 DLL project window&quot; class=&quot;aligncenter size-full wp-image-48&quot; data-mce-src=&quot;http://yourdigitaleffects.files.wordpress.com/2012/04/dll-project-01.png&quot; height=&quot;315&quot; src=&quot;http://yourdigitaleffects.files.wordpress.com/2012/04/dll-project-01.png&quot; title=&quot;dll-project-01&quot; width=&quot;490&quot; /&gt;&lt;/a&gt; &lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Then select DLL from the next window to open the project as a DLL project.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Next
 I am going to add a header file called Math.h and add some basic 
function there. which I will export through DLL and use it in a console 
application.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
the Math.h file&lt;/div&gt;
&lt;blockquote&gt;
&lt;strong&gt;&lt;span data-mce-style=&quot;color: #888888;&quot; style=&quot;color: #888888;&quot;&gt;#pragma once&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span data-mce-style=&quot;color: #888888;&quot; style=&quot;color: #888888;&quot;&gt;class __declspec(dllexport) Math {&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt; &lt;strong&gt;&lt;span data-mce-style=&quot;color: #888888;&quot; style=&quot;color: #888888;&quot;&gt;public:&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt; &lt;strong&gt;&lt;span data-mce-style=&quot;color: #888888;&quot; style=&quot;color: #888888;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;int add(int a, int b);&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt; &lt;strong&gt;&lt;span data-mce-style=&quot;color: #888888;&quot; style=&quot;color: #888888;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;double sqr(double a);&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt; &lt;strong&gt;&lt;span data-mce-style=&quot;color: #888888;&quot; style=&quot;color: #888888;&quot;&gt;}&lt;/span&gt;&lt;/strong&gt;&lt;/blockquote&gt;
and the cpp file&lt;br /&gt;
&lt;blockquote&gt;
&lt;strong&gt;&lt;span data-mce-style=&quot;color: #888888;&quot; style=&quot;color: #888888;&quot;&gt;#include &quot;Math.h&quot;&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span data-mce-style=&quot;color: #888888;&quot; style=&quot;color: #888888;&quot;&gt;int Math::add(int a, int b) {&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt; &lt;strong&gt;&lt;span data-mce-style=&quot;color: #888888;&quot; style=&quot;color: #888888;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;return (a+b);&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt; &lt;strong&gt;&lt;span data-mce-style=&quot;color: #888888;&quot; style=&quot;color: #888888;&quot;&gt;}&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;span data-mce-style=&quot;color: #888888;&quot; style=&quot;color: #888888;&quot;&gt;double Math::sqr(double a) {&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt; &lt;strong&gt;&lt;span data-mce-style=&quot;color: #888888;&quot; style=&quot;color: #888888;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;return (a*a);&lt;/span&gt;&lt;/strong&gt;&lt;br /&gt; &lt;strong&gt;&lt;span data-mce-style=&quot;color: #888888;&quot; style=&quot;color: #888888;&quot;&gt;}&lt;/span&gt;&lt;/strong&gt;&lt;/blockquote&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;strong&gt;&lt;span data-mce-style=&quot;color: #888888;&quot; style=&quot;color: #888888;&quot;&gt;__declspec(dllexport)&lt;/span&gt;&lt;/strong&gt; will tell the compiler that this class should be exported by the DLL for use in application.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Building this project will generate two components.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
1. the DLL file itselfv [myDLL.dll]&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
2. a lib file which holds the necessary stubs and initializations to call appropriate DLL function&amp;nbsp; [myDLL.lib]&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
to incorporate DLL into an application one has to include the .lib into project dependencies.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a data-mce-href=&quot;https://yourdigitaleffects.files.wordpress.com/2012/04/dll-project-03.png&quot; href=&quot;https://yourdigitaleffects.files.wordpress.com/2012/04/dll-project-03.png&quot;&gt;&lt;img alt=&quot;&quot; class=&quot;aligncenter size-full wp-image-50&quot; data-mce-src=&quot;https://yourdigitaleffects.files.wordpress.com/2012/04/dll-project-03.png&quot; height=&quot;340&quot; src=&quot;https://yourdigitaleffects.files.wordpress.com/2012/04/dll-project-03.png&quot; title=&quot;dll-project-03&quot; width=&quot;490&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br data-mce-bogus=&quot;1&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Thats all. Now you can build your application and use the DLL function very easily.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
Hope this helps.&lt;/div&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;
If you have any queries or suggestions, please leave a comment.&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://yourdigitaleffects.blogspot.com/feeds/4481034459794821589/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourdigitaleffects.blogspot.com/2012/10/implicitly-linking-dll-with-vs2010-or.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/4481034459794821589'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/4481034459794821589'/><link rel='alternate' type='text/html' href='http://yourdigitaleffects.blogspot.com/2012/10/implicitly-linking-dll-with-vs2010-or.html' title='Implicitly linking DLL with VS2010 or earlier '/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09514196229867295024</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-364943231029974825.post-8752229355335404929</id><published>2012-04-08T03:24:00.001+07:00</published><updated>2012-04-08T03:24:30.298+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="90-10 rule"/><category scheme="http://www.blogger.com/atom/ns#" term="design"/><category scheme="http://www.blogger.com/atom/ns#" term="optimization"/><title type='text'>Optimizing the Code ... Optimizing the Solution</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;Sometimes developers are over excited about creating an optimized solution by optimizing &amp;amp; refactoring the code. They try to optimize every bit and line to their heart&#39;s content. Optimization is an art, but sometimes you gotta admit that overdoing any art, loses it&#39;s beauty. So, what optimization process should be followed? Well, I want to share my view on that matter.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;&lt;i&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Create a solution but don&#39;t bother about the &quot;Perfect solution&quot;&lt;/b&gt;&lt;/span&gt;&lt;/i&gt;&amp;nbsp;&lt;/blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; What good a highly optimized, well written &amp;amp; well maintained code base can do, when it can not solve the problem? The simple answer is nothing. Every solution is written so that it could solve a problem. If you are given a non working but nicely written application will you choose it over a badly coded working solution? I guess, you got the point.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&lt;i&gt;Optimize the solution but never over do it&lt;/i&gt;&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Then next state would be optimize the solution. After you have a solution you can make it more better. Break the function into small functions. Group the class into a module. Apply DP where appropriate.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;&lt;i&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;The 90 - 10 rule&lt;/b&gt;&lt;/span&gt;&lt;/i&gt;&lt;/blockquote&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Try to optimize the section which consumes most of the time. The 90 - 10 rule follows as -&amp;nbsp; 10% of code constitutes 90% of total running time of the application. Have you ever think of any solution not having a loop? Have you seen a complex algorithm not having several loops? These loops are the CPU cycle hogger. They are the 10% out of 100% code. Try to optimize &lt;i&gt;&lt;b&gt;that&lt;/b&gt; &lt;/i&gt;10% before optimizing other sections. Slight improvement over that 10% will leave a mark on the performance of your application.&lt;br /&gt;
&lt;br /&gt;
Thank you for reading.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yourdigitaleffects.blogspot.com/feeds/8752229355335404929/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourdigitaleffects.blogspot.com/2012/04/optimizing-code-optimizing-solution.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/8752229355335404929'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/8752229355335404929'/><link rel='alternate' type='text/html' href='http://yourdigitaleffects.blogspot.com/2012/04/optimizing-code-optimizing-solution.html' title='Optimizing the Code ... Optimizing the Solution'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09514196229867295024</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-364943231029974825.post-3040024329260451120</id><published>2011-06-11T14:36:00.013+07:00</published><updated>2011-06-11T14:44:30.502+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="date"/><category scheme="http://www.blogger.com/atom/ns#" term="feature list"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="jdk 7"/><category scheme="http://www.blogger.com/atom/ns#" term="picker"/><title type='text'>DateTime Picker in JDK 7</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;JDK 7 is in draft stage. The &lt;a href=&quot;http://openjdk.java.net/projects/jdk7/features/&quot;&gt;feature list&lt;/a&gt; of JDK 7 is great. Existing Java developer will instantly notice the feature list as a blessing :D .&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;Today I am going to show a JDK 7 SwingX Component, JXDatePicker. As JDK 7 is still in draft phase, You cannot get official JDK7 release. Instead you can &lt;a href=&quot;http://jdk7.java.net/download.html&quot;&gt;download JDK7 Snapshot from this Link&lt;/a&gt;.&lt;br /&gt;
Now once you have got the JDK7 release you can test out the DatePicker.&lt;/div&gt;&lt;blockquote style=&quot;background-color: #cccccc;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;JXDatePicker dtPicker = new JXDatePicker(System.currentTimeMillis());&lt;br /&gt;
dtPicker.addActionListener(new ActionListener() {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;  public void actionPerformed(ActionEvent e) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;   JOptionPane.showMessageDialog(null, datePicker.getDate().toString());&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;  }&lt;br /&gt;
});&lt;/span&gt;&lt;/blockquote&gt;Let the JDK prevail ...&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yourdigitaleffects.blogspot.com/feeds/3040024329260451120/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourdigitaleffects.blogspot.com/2011/06/datetime-picker-in-jdk-7.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/3040024329260451120'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/3040024329260451120'/><link rel='alternate' type='text/html' href='http://yourdigitaleffects.blogspot.com/2011/06/datetime-picker-in-jdk-7.html' title='DateTime Picker in JDK 7'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09514196229867295024</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-364943231029974825.post-3465665041013097511</id><published>2011-06-04T23:41:00.000+07:00</published><updated>2011-06-04T23:41:24.798+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="debugging"/><category scheme="http://www.blogger.com/atom/ns#" term="kernel"/><category scheme="http://www.blogger.com/atom/ns#" term="VirtualKD"/><category scheme="http://www.blogger.com/atom/ns#" term="VMPlayer"/><category scheme="http://www.blogger.com/atom/ns#" term="WinDbg"/><category scheme="http://www.blogger.com/atom/ns#" term="windows"/><title type='text'>SpeedUp Windows Kernel Debugging - VirtualKD + VMPlayer + WinDbg</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Traditional windows kernel debugging requires two PC ( host &amp;amp; target ) to be connected via serial null modem. As this connection is an emulated modem, the debugging speed is very low. Also you need two PC in order to perform debugging.&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;a href=&quot;http://virtualkd.sysprogs.org/#downloading&quot;&gt;VirtualKD&lt;/a&gt; &amp;amp; &lt;a href=&quot;http://downloads.vmware.com/d/&quot;&gt;VMPlayer&lt;/a&gt; together now made it possible to speedup debugging in same PC !!!&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Steps to the speedup debugging -&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;1. Install VMPlayer.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;2. Install the target system (which you want to use for debugging) in the VMPlayer.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;3. Run the guest OS (target system) in VMPlayer.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;4. Install VirtualKD in guest OS&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnYFv7vzye-4hkxddvFubgODHJyFE0y8TlYIAcNj0ob5Y8-u5KYIfPOHWFu4JVPhsVEy_1644u2h6x71yWlBCydTtdNCfREFoK0dpDjEcasOBtk5jaabnBccAbDotyW8a2aVURzaEsOoeS/s1600/001.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;135&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnYFv7vzye-4hkxddvFubgODHJyFE0y8TlYIAcNj0ob5Y8-u5KYIfPOHWFu4JVPhsVEy_1644u2h6x71yWlBCydTtdNCfREFoK0dpDjEcasOBtk5jaabnBccAbDotyW8a2aVURzaEsOoeS/s400/001.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
5. Make sure you have selected &quot;Make new boot entry&quot; while installing the VirtualKD&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghrspcpRLrEYlxtrpUDvkxH4AXCwLfIWvLjblAiUNjc-VPBEJlXFeP7YIMoDVj6b9RdxIxBcyAVh4LYVPDbuxumDY0ZmXqNRmKyLwWLNun0mDbvEnnFOV7zwNsk_SvmmZQipAhxe9J1XKX/s1600/002.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;161&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghrspcpRLrEYlxtrpUDvkxH4AXCwLfIWvLjblAiUNjc-VPBEJlXFeP7YIMoDVj6b9RdxIxBcyAVh4LYVPDbuxumDY0ZmXqNRmKyLwWLNun0mDbvEnnFOV7zwNsk_SvmmZQipAhxe9J1XKX/s400/002.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;6. Now your guest OS be restarted. Open the vmmon.exe or vmmon64.exe (based on your OS) in the host (original PC). This application will try to patch the VMPlayer to make the debugging possible on the VMPlayer.&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiw-tUZ-wpXQ0wkdeVdlLEfr7JR6nWRncZpBLqMSQ6C88oqnn747RIr9X9nQLv_26vTf07e5jGeVEp5FZs8FpQLnMozEiA1Xcm2Gw0g3o0Ra6HQHLYst3QC4mqzTZ3l2aaBpp_45WqDw_qd/s1600/003.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;250&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiw-tUZ-wpXQ0wkdeVdlLEfr7JR6nWRncZpBLqMSQ6C88oqnn747RIr9X9nQLv_26vTf07e5jGeVEp5FZs8FpQLnMozEiA1Xcm2Gw0g3o0Ra6HQHLYst3QC4mqzTZ3l2aaBpp_45WqDw_qd/s400/003.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
7. Set up the debugger path in the vmmon.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEij_LXB25WNKT0EEUGotaZDTctsGRSkdEGiUjOhB3uYZ2thk1N4P__PupT1YErNqDcmnVOn4qxTMsJ2evkJeOmj1LyWkf3qPyKTnamJO4Rn1mxaiRg7jxjom8YERLUVhrUxLlYu7hvy79JD/s1600/005.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;265&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEij_LXB25WNKT0EEUGotaZDTctsGRSkdEGiUjOhB3uYZ2thk1N4P__PupT1YErNqDcmnVOn4qxTMsJ2evkJeOmj1LyWkf3qPyKTnamJO4Rn1mxaiRg7jxjom8YERLUVhrUxLlYu7hvy79JD/s400/005.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0XzKI3My8OKi4fDAIC0rkFtP17wxMErkL3TvYghQWlreF-k2cU2GnA63-y3zB6J832WbVx3KO9zJlsHDsehCTTGLz9MfCQOPq350K0EsGnEpCvYP4SfQ8BfF452T8bvuqMcybD7F7Uuc4/s1600/006.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;263&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj0XzKI3My8OKi4fDAIC0rkFtP17wxMErkL3TvYghQWlreF-k2cU2GnA63-y3zB6J832WbVx3KO9zJlsHDsehCTTGLz9MfCQOPq350K0EsGnEpCvYP4SfQ8BfF452T8bvuqMcybD7F7Uuc4/s400/006.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
8. Now run the guest OS and select the entry which has &quot;[debugger enabled]&quot; prefix entry.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3Yxeii1Gfxk0kLtuUQWHD1UITYupnRDS15wsiejBU5CxfK9jVLT-TF3nC06Fm4EAsm9lNd3zllGoQr_evrLBvxJ2Tm5PV0SX7FvwHIocxSIt9BbKtMjABPdatO-DWXACNuLbaXRp5io7o/s1600/004.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;250&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj3Yxeii1Gfxk0kLtuUQWHD1UITYupnRDS15wsiejBU5CxfK9jVLT-TF3nC06Fm4EAsm9lNd3zllGoQr_evrLBvxJ2Tm5PV0SX7FvwHIocxSIt9BbKtMjABPdatO-DWXACNuLbaXRp5io7o/s400/004.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
9. Running the guestOS will bring up the Debugger and it will try to connect with the ruuning os.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEnvnyxUBNOICUcazfOYBT1ksQWMVd69Yo4CAtU4tZZwgk-zrTyj7ezzE_xebYHRXe39C49BobTWn-Sz42zL_fBT6V74brcQtBxkvjy6gJk4LPoaOscCoVK_1CqAWz52uu5KXM5C6epUR0/s1600/007.png&quot; imageanchor=&quot;1&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEnvnyxUBNOICUcazfOYBT1ksQWMVd69Yo4CAtU4tZZwgk-zrTyj7ezzE_xebYHRXe39C49BobTWn-Sz42zL_fBT6V74brcQtBxkvjy6gJk4LPoaOscCoVK_1CqAWz52uu5KXM5C6epUR0/s400/007.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;10. The debugger will automatically connect with the VirtualKD driver and execution of the windows kernel will be in break mode. Enter g (go) to resume the loading of the windows.&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCH3tONTk31PDYuPQMiRmpxMPGTE-6iOlclMvBcAempsJ-eiChttq7CrK40x4uDP_m3Fi2eRYCnwqSk-_2C4EApVuM-xaASKiSPKraMV0pkxksZFD1A93cVbw_rnFzSlimypt8_gtoJyOQ/s1600/008.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;238&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhCH3tONTk31PDYuPQMiRmpxMPGTE-6iOlclMvBcAempsJ-eiChttq7CrK40x4uDP_m3Fi2eRYCnwqSk-_2C4EApVuM-xaASKiSPKraMV0pkxksZFD1A93cVbw_rnFzSlimypt8_gtoJyOQ/s400/008.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP5lCjd9__Vt5aG_DPWp5yIXiDbH_xrSH48K9j7TqefayMw2IRVPsSAT5LWNwcU8HJRxliQJEmIk7wPmxblbDRZM0Kb8QQYOaV4XGWITyZDBCZ8svCVWUZ7OQTiBJy-AvewS4dhQN5_gmI/s1600/009.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;256&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP5lCjd9__Vt5aG_DPWp5yIXiDbH_xrSH48K9j7TqefayMw2IRVPsSAT5LWNwcU8HJRxliQJEmIk7wPmxblbDRZM0Kb8QQYOaV4XGWITyZDBCZ8svCVWUZ7OQTiBJy-AvewS4dhQN5_gmI/s400/009.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;11. to stop execution of the windows kernel press Ctrl+Break in the WinDBG. This will stop the kernel execution and let you to enter command to the WinDbg like step, dataview , setting breakpoint etc.&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiatowZocUMk-2naIZyhmkUubJMSxsaoBlohVEfI6A5AUGPMOSzYI_QAWMkAGwxpAU7qiPu3CmRSSvzb7KDwMQMusm7tFbXtiEM6n-CGKk0vgRLsB_el8VG716FtoCmWJ7WCZORramC57EB/s1600/010.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;253&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiatowZocUMk-2naIZyhmkUubJMSxsaoBlohVEfI6A5AUGPMOSzYI_QAWMkAGwxpAU7qiPu3CmRSSvzb7KDwMQMusm7tFbXtiEM6n-CGKk0vgRLsB_el8VG716FtoCmWJ7WCZORramC57EB/s400/010.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;12. To enable debugging we need to first setup the symbol file (.pdb). You can set the symbol path from &quot;File&quot; menu. Or you can enter the command &lt;b style=&quot;color: red;&quot;&gt;.sympath+ &amp;lt;symbolpath&amp;gt;&lt;/b&gt; to extend symbol search path.&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjWG2-ic5blsCnmixLShMyZmCJ61RU_2RnS4K6KN_ZAd2OrGfDo6KNWvujpTr2ukHGxOcuy28E6QQozwsW5gQzYcHUzrAVwodqn38ZOd8MX9p2XktHew6710vJSwg2Fyt7KKYu6s-OnTv6/s1600/011.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;255&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjWG2-ic5blsCnmixLShMyZmCJ61RU_2RnS4K6KN_ZAd2OrGfDo6KNWvujpTr2ukHGxOcuy28E6QQozwsW5gQzYcHUzrAVwodqn38ZOd8MX9p2XktHew6710vJSwg2Fyt7KKYu6s-OnTv6/s400/011.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;13. Next step is to set the source file search path. This is needed to debug line by line (step or p).&amp;nbsp;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYIpcxU2j3YFhmPjbVu8EuNKSglKYvnC544zTGk7DVSv_lM3eEG5U-mwbrBkwf093oOhAGZDI3GQrzLuwxvFUbcCT7S3XRJ5JyUkNpKQ_ICC-z8quABkzLDJhcAWqqW4iGwaXXAf_bpwVs/s1600/012.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;252&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYIpcxU2j3YFhmPjbVu8EuNKSglKYvnC544zTGk7DVSv_lM3eEG5U-mwbrBkwf093oOhAGZDI3GQrzLuwxvFUbcCT7S3XRJ5JyUkNpKQ_ICC-z8quABkzLDJhcAWqqW4iGwaXXAf_bpwVs/s400/012.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;That&#39;s it. Your high speed debugging environment is setup perfectly. Now if you load a program &amp;amp; set breakpoint, the debugger will automatically break execution on that point. If the correct symbols are shown to the debugger with the correct source code, you will be able to see which line is executing from the WinDBG (just like VS debugging).&lt;/div&gt;&lt;br /&gt;
To speed up more, you need to learn basic WinDBG commands.&lt;br /&gt;
&lt;br /&gt;
Hope this article will help you. If you have any question or suggestion, please leave a comment.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yourdigitaleffects.blogspot.com/feeds/3465665041013097511/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourdigitaleffects.blogspot.com/2011/06/speedup-windows-kernel-debugging.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/3465665041013097511'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/3465665041013097511'/><link rel='alternate' type='text/html' href='http://yourdigitaleffects.blogspot.com/2011/06/speedup-windows-kernel-debugging.html' title='SpeedUp Windows Kernel Debugging - VirtualKD + VMPlayer + WinDbg'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09514196229867295024</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnYFv7vzye-4hkxddvFubgODHJyFE0y8TlYIAcNj0ob5Y8-u5KYIfPOHWFu4JVPhsVEy_1644u2h6x71yWlBCydTtdNCfREFoK0dpDjEcasOBtk5jaabnBccAbDotyW8a2aVURzaEsOoeS/s72-c/001.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-364943231029974825.post-7603035596606672513</id><published>2011-05-27T00:34:00.000+07:00</published><updated>2011-05-27T00:34:20.295+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="c++"/><category scheme="http://www.blogger.com/atom/ns#" term="dllhell"/><category scheme="http://www.blogger.com/atom/ns#" term="mfc"/><category scheme="http://www.blogger.com/atom/ns#" term="side by side configuration"/><category scheme="http://www.blogger.com/atom/ns#" term="win 7"/><title type='text'>Understanding &amp; Solving the &quot;Side by Side Configuration&quot; (DLL Hell) Problem - C++</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Many developer has seen the &quot;Side by Side Configuration Error&quot; problem. They build their executable in one system and after transferring the application to another system they got this error. Just by seeing that error one might think - &quot;WTH, does C++ application need dependencies?&quot;. The answer is yes if you build Win32 application.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxPx1IEAA01nSG4qOR6KEgpmZyNF6MaEzIvqIRfkpxCYO0BrbPlDw1naIr5pWqlL3Lg1Qkkhjtia8RY3IzUPdEjWUhRXw5Sjbha4sUZCipMz-2OQ7AFSNMeShJpK-_EwYQP-Keaylwc0X6/s1600/Side+by+Side+Config+Error.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;125&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxPx1IEAA01nSG4qOR6KEgpmZyNF6MaEzIvqIRfkpxCYO0BrbPlDw1naIr5pWqlL3Lg1Qkkhjtia8RY3IzUPdEjWUhRXw5Sjbha4sUZCipMz-2OQ7AFSNMeShJpK-_EwYQP-Keaylwc0X6/s400/Side+by+Side+Config+Error.gif&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&amp;nbsp;In win32 application we use the header file to use the function in our application and the library file to successfully link the application to external functions (library functions). This problem occurs due to MS&#39;s dynamic link feature. When you build the application the VS linker perform a shared dynamic link to the system library. This linking reduces the size of the executable because the library resides in the OS. Now when you transfer the application to another system &amp;amp; try to run it, you have a high chance of getting the &quot;Side by Side Configuration Error&quot; due to mismatched version of system library resided in the target OS.&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;The easiest way to solve this problem is to reinstall the MSVC redist package. Most of the time it may save your day. But sometime it may not.&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;Lets jump into the heart of the problem. Usually the VC redist resides in &quot;%windir%\winsxs&quot;. In that folder you will see all the required library to run Win32 C++ application.&amp;nbsp;&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;Now the question is which library do we need? Lets get back to our MSVC project. I have created a sample test Win32 application and build it. Now if you go to the debug folder you will see many files. Among them you will see a &quot;.manifest&quot; file. Now open it with a text editor. You will see that that is an xml file. The important part of this file is -&lt;/div&gt;&lt;blockquote&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;dependentAssembly&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;assemblyIdentity type=&quot;win32&quot; name=&quot;Microsoft.VC90.DebugCRT&quot; version=&quot;9.0.21022.8&quot; processorArchitecture=&quot;x86&quot; publicKeyToken=&quot;1fc8b3b9a1e18e3b&quot;&amp;gt;&amp;lt;/assemblyIdentity&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/dependentAssembly&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp; &amp;lt;/dependency&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;This section tells us which library &amp;amp; which version we will need to run the program. In the winsxs folder you will get the library in this format -&lt;br /&gt;
&lt;blockquote&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;processorArchitecture_name_publicKeyToken_version&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&amp;nbsp;That folder contains the required library files. I hope you have understood the dependency search. Now I am going to share another working solution.&amp;nbsp;&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;In MSVC you can link the required library as static. To do so go to solution&#39;s properties --&amp;gt; Expand the Configuration Properties --&amp;gt; General. You will see use of MFC, ATL configuration entries under the project defaults.&amp;nbsp;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvWvt3_oBtLrjmvMowRx4P1wKgEu-s0L0iDxS756FVUJLAQCIpm-0qgXvs5xyzu6eDdVFS8Hlog2kAQT6gDGfXxWlQ1HZy5esT0ybkmgYZqB6N3ctBMtIHRJkGu6InnE8T7QbK8rB2w8BU/s1600/static+link.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;277&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvWvt3_oBtLrjmvMowRx4P1wKgEu-s0L0iDxS756FVUJLAQCIpm-0qgXvs5xyzu6eDdVFS8Hlog2kAQT6gDGfXxWlQ1HZy5esT0ybkmgYZqB6N3ctBMtIHRJkGu6InnE8T7QbK8rB2w8BU/s400/static+link.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;The default value for the entry is &quot;Use standard windows library&quot;. Change it to &quot;Use MFC in a static library&quot;. You should set this option in ATL configuration entry if you use ATL. Now build the solution and thats it. Now your executable will be bigger but it won&#39;t require the windows library from winsxs folder. &lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;The &quot;Side by Side Configuration&quot; error snapshot is by courtesy of google :). And the later snapshot is taken from MSVS 2008.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Hope this article will help you. If you have any question or queries please leave a comment.&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yourdigitaleffects.blogspot.com/feeds/7603035596606672513/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourdigitaleffects.blogspot.com/2011/05/understanding-solving-side-by-side.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/7603035596606672513'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/7603035596606672513'/><link rel='alternate' type='text/html' href='http://yourdigitaleffects.blogspot.com/2011/05/understanding-solving-side-by-side.html' title='Understanding &amp; Solving the &quot;Side by Side Configuration&quot; (DLL Hell) Problem - C++'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09514196229867295024</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxPx1IEAA01nSG4qOR6KEgpmZyNF6MaEzIvqIRfkpxCYO0BrbPlDw1naIr5pWqlL3Lg1Qkkhjtia8RY3IzUPdEjWUhRXw5Sjbha4sUZCipMz-2OQ7AFSNMeShJpK-_EwYQP-Keaylwc0X6/s72-c/Side+by+Side+Config+Error.gif" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-364943231029974825.post-3559234918983857864</id><published>2011-05-21T00:50:00.001+07:00</published><updated>2012-04-08T02:19:05.899+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ADO.NET"/><category scheme="http://www.blogger.com/atom/ns#" term="c#"/><category scheme="http://www.blogger.com/atom/ns#" term="code"/><title type='text'>C# - ComboBox + DataSet, ADO.NET</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;&lt;a href=&quot;http://www.mediafire.com/download.php?nj9dd22hjqrjc9n&quot;&gt;Source&lt;/a&gt;&lt;/b&gt;&lt;/span&gt; &lt;br /&gt;
&lt;br /&gt;
In my &lt;a href=&quot;http://yourdigitaleffects.blogspot.com/2011/05/adonet-microsofts-data-abstraction.html&quot;&gt;last post&lt;/a&gt; I talked about the ADO.NET. Today I am going to demonstrate how fast you can build the application using the ADO.NET.&amp;nbsp;&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;My example will have two solution one is a class library (DLL) which will implement the database functionalities. Another solution will use that DLL to talk to the database and do some work with it.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;I am using MySQL database. You can use any database instead of MySQL. My database (mydb) contains only two tables. These table follows -&lt;/div&gt;---- info -----&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ---- detailed_info ----&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; id(pk) | name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; id(fk) | email&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;Now first let us focus on database implementation. I took an abstract class which has two member. One is IdbConnection &amp;amp; another is String. It also has two virtual method open &amp;amp; fillDataSet. The code looks like below -&amp;nbsp;&lt;/div&gt;&lt;br /&gt;
&lt;blockquote&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; abstract public class DB&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IDbConnection _connection;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String _connStr;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public IDbConnection Connection { set { this._connection = value; } get { return _connection; } }&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public String ConnStr { set { _connStr = value; } get { return _connStr; } }&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public abstract void open();&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public abstract void fillDataSet(ref DataSet dtSet, String query, String dataTableName);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&amp;nbsp;This is our base class &amp;amp; we will inherit this class to make database specific implementation. I have took another class named MySQLDB and made it a child of DB class. As MySQL connection string is specific to MySQL database only. So that information is loaded to base classes ConnStr variable whenever we create an instance of MySQLDB class. Implementation of the class looks like this -&lt;/div&gt;&lt;br /&gt;
&lt;blockquote&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;public class MySQLDB : DB&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private String[] strMySQL = new String[] { &quot;localhost&quot;, &quot;root&quot;, &quot;123&quot;, &quot;mydb&quot; };&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public MySQLDB() &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.ConnStr = String.Format(&quot;server={0};userid={1};password={2};Database={3};Character Set=utf8;&quot;, strMySQL[0], strMySQL[1], strMySQL[2], strMySQL[3]);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; override public void open()&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Debug.Assert(ConnStr != null);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Connection = new MySql.Data.MySqlClient.MySqlConnection(ConnStr);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Debug.Assert(Connection != null);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; override public void fillDataSet(ref DataSet dtSet, String query, String dataTableName)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MySql.Data.MySqlClient.MySqlDataAdapter Adapter = new MySql.Data.MySqlClient.MySqlDataAdapter(query, (MySql.Data.MySqlClient.MySqlConnection)Connection);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Debug.Assert(Adapter != null);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Adapter.Fill(dtSet, dataTableName);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&amp;nbsp;As you can see that I have overrode the two virtual function declared in base class. In the open function the main task was to create the connection to the database using a connection string. In the fillDataSet function we took a dataadapter object and fill the given dataset with appropriate data by querying the database using the provided query.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Now we will introduce an interface which will contain the database function and a class which will actually implement the interface.&lt;/div&gt;&lt;br /&gt;
&lt;blockquote&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&amp;nbsp;&amp;nbsp; public enum DBTYPE&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MYSQL&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;public interface DBFunctions&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; void getUserInfo(ref DataSet dtSet);&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; void getUserDetailedInfo(ref DataSet dtSet);&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public class DBAccessHandler: DBFunctions&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DB dbase;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DBTYPE dbType;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public DBAccessHandler(DBTYPE dbtype)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; this.dbType = dbtype;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; switch (this.dbType)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&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; case DBTYPE.MYSQL:&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&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; dbase = new MySQLDB();&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&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; break;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&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; default:&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&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; // fall back to your default db&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&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; break;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void getUserInfo(ref DataSet dtSet)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String query = &quot;SELECT id,name FROM info&quot;;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dbase.fillDataSet(ref dtSet, query, &quot;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;info&lt;/span&gt;&lt;/b&gt;&quot;);&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void getUserDetailedInfo(ref DataSet dtSet)&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String query = &quot;SELECT id,email FROM detail_info&quot;;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dbase.fillDataSet(ref dtSet, query, &quot;&lt;b style=&quot;color: red;&quot;&gt;d_info&lt;/b&gt;&quot;);&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;These classes are so basic. There is not much to discuss. The two main points are the name of the datatable used in calling the fillDataSet. We will create same named datatable inside a dataset. Now we are done implementing our database implementation source file. Now we will move to the Windows form application.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;I have created a very basic user interface just like the picture below -&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQyHvsUKEozPRyW0OBh_L6kBNChyphenhyphenBfSTqMBddBEum8tbIj7mdMu4vpuBIGWV-yd30Rd1qcJoaT8jI91eqRryxg79TrMpfhX8I4crLvgEF1QArwQ8geZVrau3B7qmO3SPncWz6gn9Tt_eUj/s1600/name_email.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;148&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQyHvsUKEozPRyW0OBh_L6kBNChyphenhyphenBfSTqMBddBEum8tbIj7mdMu4vpuBIGWV-yd30Rd1qcJoaT8jI91eqRryxg79TrMpfhX8I4crLvgEF1QArwQ8geZVrau3B7qmO3SPncWz6gn9Tt_eUj/s320/name_email.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Now we will make a dataset which will represent the database we are using. This dataset will be our transparent disconnected database. The dataset will look like below -&amp;nbsp;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiM3t3x4q57wZFD2LtknqGkJcc1i5ONUUqabYMUcUjdqrn2U3hS-QVcujzi-rGe5D5DKn1L7eVEiffvEZJqRH95RQlJb1tb321cNnGKK_BXGieW0KDmHvHYhh05b49bwlbmOzTSp62sePs1/s1600/dtset.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;83&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiM3t3x4q57wZFD2LtknqGkJcc1i5ONUUqabYMUcUjdqrn2U3hS-QVcujzi-rGe5D5DKn1L7eVEiffvEZJqRH95RQlJb1tb321cNnGKK_BXGieW0KDmHvHYhh05b49bwlbmOzTSp62sePs1/s320/dtset.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;As you can see that, the name of the datatable matches with the implemented interface function in DBAccessHandler class. &lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Now the codes -&lt;/div&gt;&lt;br /&gt;
&lt;blockquote&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;public partial class Form1 : Form&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public ComboBox ComboName { get { return _comboName; } }&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public ComboBox ComboEmail { get { return _comboEmail; } }&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private DBAccess.DBAccessHandler dbHandler = null;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private DtSet dtSet = null;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public Form1()&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; InitializeComponent();&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dbHandler = new DBAccessHandler(DBTYPE.MYSQL);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dtSet = new DtSet();&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GetDatas();&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FillComboBox();&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SetupHandlers();&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private void SetupHandlers()&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ComboName.SelectedIndexChanged += new EventHandler(ComboName_SelectedIndexChanged);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; void ComboName_SelectedIndexChanged(object sender, EventArgs e)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DataView tempView = dtSet.Tables[1].DefaultView;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tempView.RowFilter = String.Format(&quot;id={0}&quot;, (int)((ComboBox)sender).SelectedValue);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ComboEmail.DataSource = tempView;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ComboEmail.DisplayMember = &quot;email&quot;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private void FillComboBox()&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ComboName.DataSource = dtSet;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ComboName.DisplayMember = &quot;info.name&quot;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ComboName.ValueMember = &quot;info.id&quot;;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; private void GetDatas()&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DataSet tempDtSet = (DataSet)dtSet;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dbHandler.getUserInfo(ref tempDtSet);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dbHandler.getUserDetailedInfo(ref tempDtSet);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&amp;nbsp;As you can see that inside the GetDatas function we called our database functions which handles the MySQL native query for this methods. After we populate data in the dataset we set ComboName combobox&#39;s datasource as that dataset. Now our dataset acts as the transparent database. We have access to detached database through it.&amp;nbsp;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;The DisplayMember property tells which member of the datatable to be displayed &amp;amp; the ValueMember property let us map a value against the currently displaying DisplayMember. In this way we will get the associated id against a name easily.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Next we registered the selectedindexchanged event and add a filter based on the current selected value (i,e id of the name) and make a new dataview from the existing datatable. We then sets this dataview in the ComboEmail.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Hope this tutorial gives you an idea of how to use the ADO.NET. If you have any suggestion or query please leave a comment.&amp;nbsp;&lt;/div&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.mediafire.com/download.php?nj9dd22hjqrjc9n&quot;&gt;Source Code.&lt;/a&gt; &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yourdigitaleffects.blogspot.com/feeds/3559234918983857864/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourdigitaleffects.blogspot.com/2011/05/c-combobox-dataset-adonet.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/3559234918983857864'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/3559234918983857864'/><link rel='alternate' type='text/html' href='http://yourdigitaleffects.blogspot.com/2011/05/c-combobox-dataset-adonet.html' title='C# - ComboBox + DataSet, ADO.NET'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09514196229867295024</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQyHvsUKEozPRyW0OBh_L6kBNChyphenhyphenBfSTqMBddBEum8tbIj7mdMu4vpuBIGWV-yd30Rd1qcJoaT8jI91eqRryxg79TrMpfhX8I4crLvgEF1QArwQ8geZVrau3B7qmO3SPncWz6gn9Tt_eUj/s72-c/name_email.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-364943231029974825.post-5879238274941158345</id><published>2011-05-18T22:58:00.000+07:00</published><updated>2011-05-18T22:59:24.472+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ADO.NET"/><category scheme="http://www.blogger.com/atom/ns#" term="architecture"/><title type='text'>ADO.NET - Microsoft&#39;s Data Abstraction Architecture</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;What an application do in a computer? It plays with data, data &amp;amp; data using logic. And databases are versatile storage for the data. Application talks to the database to get the desired data quickly. One application can talk to Oracle database, another may talk to MySQL. The communication system between these db is db specific.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;These leads us to a common question, isn&#39;t it possible to implement an architecture which can talk to any db with minimum implementation &amp;amp; logic level transparency? It was possible via JDBC. Now it is possible through C#/VB using .Net framework. ADO.NET is the Microsoft&#39;s implementation similar to JDBC, but with some great features. The main backbone of ADO.NET is the DataSet, DataTable &amp;amp; DataAdapter. ADO.NET architecture looks like this -&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidGzju2zKhcvxWz7SYvs6Gs0e_823zAuEsYSfmIg5d-kNbVonHdWem0C8GvdfIMoc0rzw1QWAP1uuS26xzqwi8Z64_S5ixtiMg9apKzpTmULYTcnWq4XOVil2vxyZnI38EgXf302nhUOUR/s1600/ado.net.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;230&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidGzju2zKhcvxWz7SYvs6Gs0e_823zAuEsYSfmIg5d-kNbVonHdWem0C8GvdfIMoc0rzw1QWAP1uuS26xzqwi8Z64_S5ixtiMg9apKzpTmULYTcnWq4XOVil2vxyZnI38EgXf302nhUOUR/s400/ado.net.png&quot; width=&quot;400&quot; /&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;As you can see that the Data Provider provides database specific implementation. DataSet &amp;amp; DataTable grants the application a transparent view of the database.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;Data Provider consist of Connection, Command &amp;amp; DataReader. IdbConnection, IdbCommand &amp;amp; IdbDataReader provides interfaces to implement database specific Connection, Command &amp;amp; DataReader. The Connection is responsible for connecting to the specific db. Command takes the query to execute against an open Connection &amp;amp; sets up the parameter of the query. DataReader is responsible to read the returned value from the database after executing the Command.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;Now DataSet, DataTable &amp;amp; DataAdapter comes into play. DataAdapter is a provider which can create DataSet on the fly. It uses database specific Connection &amp;amp; Command to execute a query against the database and creates the transparent database DataSet on the fly. DataSet can hold many DataTable. These DataTables are the logical representation of database tables. After creating the DataSet, application use the DataSet as the database itself. Thus ADO.NET provides the logic level transparency.&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: justify;&quot;&gt;DataSet is also used for RAD. If you know what will be the content of a DataTable inside a DataSet you can design that DataTable graphically and the attach it to a controller. This way you create a forward declaration to your DataTable content &amp;amp; can leverage that information to build application more quickly.&lt;/div&gt;&lt;br /&gt;
Another great power of ADO.NET is the XML / LINQ. You can use XML input as database.&lt;br /&gt;
&lt;br /&gt;
Hope this article gives you an overview on ADO.NET architecture. If you have any query or suggestion please fill free to leave a comment. Next time I will try to give demonstrate a sample program using ADO.NET.&lt;br /&gt;
Till then, goodbye. :)&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yourdigitaleffects.blogspot.com/feeds/5879238274941158345/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourdigitaleffects.blogspot.com/2011/05/adonet-microsofts-data-abstraction.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/5879238274941158345'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/5879238274941158345'/><link rel='alternate' type='text/html' href='http://yourdigitaleffects.blogspot.com/2011/05/adonet-microsofts-data-abstraction.html' title='ADO.NET - Microsoft&#39;s Data Abstraction Architecture'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09514196229867295024</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidGzju2zKhcvxWz7SYvs6Gs0e_823zAuEsYSfmIg5d-kNbVonHdWem0C8GvdfIMoc0rzw1QWAP1uuS26xzqwi8Z64_S5ixtiMg9apKzpTmULYTcnWq4XOVil2vxyZnI38EgXf302nhUOUR/s72-c/ado.net.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-364943231029974825.post-2579998415625251157</id><published>2011-05-01T19:19:00.000+07:00</published><updated>2011-05-01T19:19:02.107+07:00</updated><title type='text'>Desiging your way to Implementation</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Many young developer has a liking to solve a problem brute forcibly rather than solving it elegantly. From SDLC we know that Designing a system takes much time rather than implementing the system. Yet many developer just jumped into implementing the solution without designing the whole system in first place. Many developer design and develop at the same time without knowing the upcoming risks they may incur. A bad designed solution will not stay in the long run.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilOGe_pqzUahMfogAKIOlx2A168K6gDyPMgJZZ0JCncHj7Ag0_CjPm8uynHFGe-3ljRIgcEb_z8YCAWRQZKAcZgeMielDqR-yYDzqRgtvopAYupOzWTtNPLFG9L33WF9_pmOBbcfiKy0zq/s1600/soft+development.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;212&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilOGe_pqzUahMfogAKIOlx2A168K6gDyPMgJZZ0JCncHj7Ag0_CjPm8uynHFGe-3ljRIgcEb_z8YCAWRQZKAcZgeMielDqR-yYDzqRgtvopAYupOzWTtNPLFG9L33WF9_pmOBbcfiKy0zq/s320/soft+development.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;The brute force approach has a benefit. If a problem is small and does not required to be maintained in future then brute force approach save time. But whenever it is a long term project then the fruit of a good design starts to come. Good designed solutions always have a room for future improvement. The maintainability is one of the major benefits.&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;Though I am a very new developer but I have worked with some excellent senior people in my company. And I learned from them &amp;amp; also by participating in design phase of some solutions. Today I am gonna share my experience &amp;amp; thought on design with you -&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b style=&quot;color: red;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;1. Decoupled modules:&lt;/span&gt;&lt;/b&gt; While designing a solution always try to decouple the modules. decoupled modules can work independently. Which enables the developer to modify the specific module without worrying about the whole system. If someone to change an implementation within a module, he/she doesn&#39;t have to concern about the interactions with other modules.&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: red; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;2. Minimize the expose of Class implementation:&lt;/span&gt;&lt;/b&gt; Try to minimize the details of the class implementation. Because if you use too much implementation details of a class then changing the class will seriously increase development time. Say In one class A, we are using B&#39;s x property which is a integer type. Now for some requirement we need to change the property type from integer to char. In this scenario, if we previously used that statement 1000 times then we have to change the code manually in 1000 places.&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;b style=&quot;color: red;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;3. Revise &amp;amp; Revise:&lt;/span&gt;&lt;/b&gt; Over and over revise your design to check if there is room for improvement and try to clear out the design flaws. The sooner you can cancel out the bugs the better and extensible solution you will make.&lt;/div&gt;&lt;br /&gt;
&lt;b style=&quot;color: red;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;4. Do not think about implementation details when design, think about the requirement and solution:&lt;/span&gt;&lt;/b&gt; Well I think this is a common mistake we made while designing. Implementation depends on design. But while designing you should never think about implementation details. You should think about the requirement &amp;amp; solution while designing because you are trying to make the solution a better one not the implementation of a certain solution better.&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;5. Trade &amp;amp; Decisions:&lt;/span&gt;&lt;/b&gt; Design is somewhat making trades and decision. Choosing the better decision is a matter of requirement &amp;amp; situation. But never rule out a decision as bad because what is a bad decision in one context will be the best in another context. Choosing wisely the trade-offs will surely prove to be useful later.&lt;br /&gt;
&lt;br /&gt;
I think that&#39;s about it. I am not in a position to defend that my concept about the design is totally right. But it is what I have learned from my seniors. If you think some of them are wrong, please feel free to comment. Because through decision may be I can improve my concept of designing.&lt;br /&gt;
&lt;br /&gt;
Happy designing. &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yourdigitaleffects.blogspot.com/feeds/2579998415625251157/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourdigitaleffects.blogspot.com/2011/05/desiging-your-way-to-implementation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/2579998415625251157'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/2579998415625251157'/><link rel='alternate' type='text/html' href='http://yourdigitaleffects.blogspot.com/2011/05/desiging-your-way-to-implementation.html' title='Desiging your way to Implementation'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09514196229867295024</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilOGe_pqzUahMfogAKIOlx2A168K6gDyPMgJZZ0JCncHj7Ag0_CjPm8uynHFGe-3ljRIgcEb_z8YCAWRQZKAcZgeMielDqR-yYDzqRgtvopAYupOzWTtNPLFG9L33WF9_pmOBbcfiKy0zq/s72-c/soft+development.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-364943231029974825.post-2375519033038265789</id><published>2010-10-28T20:26:00.000+07:00</published><updated>2010-10-28T20:26:44.057+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="box model"/><category scheme="http://www.blogger.com/atom/ns#" term="css"/><category scheme="http://www.blogger.com/atom/ns#" term="html"/><title type='text'>How CSS Box Model Works - Beginner</title><content type='html'>Well it has been may days since I wrote my last blog. I was busy with  my work and it was very messy. It has crossed my mind several times to write a blog,  but I couldn&#39;t find any luxury time to write one.&lt;br /&gt;
&lt;br /&gt;
So, I have came up with a small topic regarding the CSS Box Model.&lt;br /&gt;
&lt;br /&gt;
CSS box model is a model where you treat your every component as a box. Then you using these box (i,e your html element) and put it around the page to setup the layout. Well most of the beginner coder knows how the CSS box model works.&lt;br /&gt;
&lt;br /&gt;
But still I think it might be good idea for those who didn&#39;t to know how the CSS box model actually works. So, that they can actually begin to understand the CSS positioning and styling by themselves.&lt;br /&gt;
&lt;br /&gt;
Now let us see the box model&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgz5GhdVfaAnoiP9RV3oU7kLQTQsiy40NTxCfIEtAtt-I3X-Ettv1pCs3Sb6pbzsZDYZ9iWLlVxsjwk8367IUEkRyg5sW6Zmfb5WYdH7T6Why3V5kEaXUH3tPmi2nI75zEvlTkxiM5r4F2o/s1600/box+model.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;275&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgz5GhdVfaAnoiP9RV3oU7kLQTQsiy40NTxCfIEtAtt-I3X-Ettv1pCs3Sb6pbzsZDYZ9iWLlVxsjwk8367IUEkRyg5sW6Zmfb5WYdH7T6Why3V5kEaXUH3tPmi2nI75zEvlTkxiM5r4F2o/s400/box+model.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
As you can see the HTML element is surrounded by Padding.&lt;br /&gt;
Padding is the space around the HTML element. In CSS tag you can use the Padding property as below&lt;br /&gt;
&lt;ul style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;li&gt;padding:value;&amp;nbsp; [this will put free space equal to the value (say 3px) around the HTML element.]&lt;/li&gt;
&lt;li&gt;padding:val1 val2; [this syntax will set free space equal to val1 in up-down direction and val2 in left-right direction]&lt;/li&gt;
&lt;li&gt;padding-left:value; [to explicitly define the left padding value for the html element]&lt;/li&gt;
&lt;li&gt;padding-right:value; [to explicitly define the right padding value for the html element]&lt;/li&gt;
&lt;li&gt;padding-top:value; [to explicitly define the top padding value for the html element]&lt;/li&gt;
&lt;li&gt;padding-bottom:value; [to explicitly define the bottom padding value for the html element]&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
The Margin property is also like the padding property but unlike the padding free space, which cannot be filled with other elements, margin space can contain other elements.&lt;br /&gt;
You can think padding and the HTML element as a HTML element itself. But that is not necessarily true for the margin property.&lt;br /&gt;
Margin property will put up margin equal to the value you set in the margin property.&lt;br /&gt;
You can use many form of margin property and they all like padding property usage.&lt;br /&gt;
&lt;ul style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;li&gt;margin:value;&amp;nbsp; [this will put margin space equal to the value (say 3px) around the HTML element.]&lt;/li&gt;
&lt;li&gt;margin:val1 val2; [this syntax will set margin space equal to val1 in up-down direction and val2 in left-right direction]&lt;/li&gt;
&lt;li&gt;margin-left:value; [to explicitly define the left margin value for the html element]&lt;/li&gt;
&lt;li&gt;margin-right:value; [to explicitly define the right margin value for the html element]&lt;/li&gt;
&lt;li&gt;margin-top:value; [to explicitly define the top margin value for the html element]&lt;/li&gt;
&lt;li&gt;margin-bottom:value; [to explicitly define the bottom margin value for the html element]&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
Now the offset is used to put the element into the right position and usually have four properties-&lt;br /&gt;
&lt;ul style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;li&gt;left:value;&lt;/li&gt;
&lt;li&gt;right:value;&lt;/li&gt;
&lt;li&gt;bottom:value;&lt;/li&gt;
&lt;li&gt;top:value;&lt;/li&gt;
&lt;/ul&gt;All of them takes a single value or percentage of the total width of the document on the screen (generally screen resolution).&amp;nbsp; They tells the browser about the elements to be placed according to the given offset value.&lt;br /&gt;
&lt;br /&gt;
Very basic stuff discussed here, but I think if any one has clear idea how the model works they can understand how to place the element rightly.&lt;br /&gt;
&lt;br /&gt;
One last point, different browser handles the box model differently. The model here I describe works best with firefox browser. There is only one big difference with the IE&#39;s box model is that, in &lt;u style=&quot;color: red;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;IE&#39;s box model the padding isn&#39;t included in to the element itself. But in firefox (gecko to be more exact) box model consider padding as associated with the html element itself.&lt;/span&gt;&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;
&lt;br /&gt;
Thank you for reading the post. If you have any question, suggestion or anything, please leave a comment. Keep in touch.</content><link rel='replies' type='application/atom+xml' href='http://yourdigitaleffects.blogspot.com/feeds/2375519033038265789/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourdigitaleffects.blogspot.com/2010/10/how-css-box-model-works-beginner.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/2375519033038265789'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/2375519033038265789'/><link rel='alternate' type='text/html' href='http://yourdigitaleffects.blogspot.com/2010/10/how-css-box-model-works-beginner.html' title='How CSS Box Model Works - Beginner'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09514196229867295024</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgz5GhdVfaAnoiP9RV3oU7kLQTQsiy40NTxCfIEtAtt-I3X-Ettv1pCs3Sb6pbzsZDYZ9iWLlVxsjwk8367IUEkRyg5sW6Zmfb5WYdH7T6Why3V5kEaXUH3tPmi2nI75zEvlTkxiM5r4F2o/s72-c/box+model.jpg" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-364943231029974825.post-5616653015484518793</id><published>2010-08-13T01:21:00.000+07:00</published><updated>2010-08-13T01:21:58.450+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Injection"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="SQL"/><title type='text'>PHP SQL Injection Prevention</title><content type='html'>The old school SQL Injection probably does not work in today&#39;s modern websites. But those who are new to PHP website development find themselves wondering around the web to learn to eliminate the SQL injection.&lt;br /&gt;
&lt;br /&gt;
There is a very simple function in PHP to stop SQL injection. Consider We have a table :-&lt;br /&gt;
Table fake_customers&lt;br /&gt;
===============&lt;br /&gt;
id&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; name&lt;br /&gt;
--&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ------&lt;br /&gt;
1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; X&lt;br /&gt;
2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Y&lt;br /&gt;
3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Z&lt;br /&gt;
&lt;br /&gt;
If we pass the ID by the get method the following code is prone to SQL injection -&lt;br /&gt;
&lt;blockquote style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;$q = &quot;select * from fake_customers where id = $id&quot;;&lt;/blockquote&gt;now what if we pass &quot;1 and id&amp;gt;1&quot; in the id parameter? Then the query will be like&lt;br /&gt;
&lt;blockquote style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;$q = &quot;select * from fake_customers where id = $id&quot;; &lt;span style=&quot;color: #274e13;&quot;&gt;// select * from fake_customers where id = 1 and id&amp;gt;1 -- SQL injected !!!&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;
A better approach is to use the &lt;b style=&quot;color: red;&quot;&gt;mysql_real_escape_string()&lt;/b&gt; to escape the SQL escape characters.&lt;br /&gt;
here is the solution -&lt;br /&gt;
&lt;blockquote style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;$q = sprintf(&quot;select * from fake_customers where id = %d&quot;, mysql_real_escape_string($id));&lt;/blockquote&gt;&lt;br /&gt;
Pretty easy, isn&#39;t it?&lt;br /&gt;
&lt;br /&gt;
For any suggestion or question, please leave a comment.</content><link rel='replies' type='application/atom+xml' href='http://yourdigitaleffects.blogspot.com/feeds/5616653015484518793/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourdigitaleffects.blogspot.com/2010/08/php-sql-injection-prevention.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/5616653015484518793'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/5616653015484518793'/><link rel='alternate' type='text/html' href='http://yourdigitaleffects.blogspot.com/2010/08/php-sql-injection-prevention.html' title='PHP SQL Injection Prevention'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09514196229867295024</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-364943231029974825.post-4679363969831539346</id><published>2010-08-09T03:24:00.000+07:00</published><updated>2010-08-09T03:24:58.385+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="date"/><category scheme="http://www.blogger.com/atom/ns#" term="function"/><category scheme="http://www.blogger.com/atom/ns#" term="PHP"/><category scheme="http://www.blogger.com/atom/ns#" term="time"/><title type='text'>PHP Date Tips &amp; Usage</title><content type='html'>We all need the current date now and then. Today I will review some of the usage of PHP date functions.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: large;&quot;&gt;&lt;span style=&quot;background-color: #93c47d; color: #cc0000;&quot;&gt;$array = getdate();&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;ul&gt;&lt;li&gt;There are many ways to get the current date. Probably the easiest one is &lt;b style=&quot;color: red;&quot;&gt;getdate()&lt;/b&gt; function.&lt;/li&gt;
&lt;li&gt;The return type of the getdate() is an &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;array&lt;/span&gt;&lt;/b&gt;. So the values of the current time is mapped into a (key =&amp;gt; value) pair. i,e for every value there will be a mapped key.&lt;/li&gt;
&lt;li&gt;Useful Keys are &lt;/li&gt;

&lt;ul style=&quot;color: #38761d; font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;minutes&amp;nbsp; - returns minutes&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;seconds&amp;nbsp; - returns seconds&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt; hours&amp;nbsp;&amp;nbsp;&amp;nbsp; - returns hours&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;mday&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - returns day of the month (no of the day of current month) (between 1-31)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;yday&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - returns day of the year (between 1-365)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;month&amp;nbsp;&amp;nbsp;&amp;nbsp; - textual representation of the current month&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;mon&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - returns the current month number (between 1-12)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;year&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; - returns the current year&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;e,g -&lt;/li&gt;
&lt;/ul&gt;&lt;blockquote style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;$today = getdate();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;echo $today[&#39;mon&#39;] . &#39;/&#39; . $today[&#39;mday&#39;] . &#39;/&#39; . $today[&#39;year&#39;];&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: #6aa84f;&quot;&gt;&lt;span style=&quot;color: #38761d;&quot;&gt;// outputs --&amp;gt; mm/dd/yyyy&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;Another way of getting the date is the date function itself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;background-color: #93c47d; color: #cc0000; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: large;&quot;&gt;$string = date($format);&lt;/span&gt;&lt;/b&gt; &lt;br /&gt;
&lt;div style=&quot;background-color: #93c47d; color: #cc0000; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;background-color: #93c47d; color: #cc0000; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;The format is a string which defines the format of the date&lt;/li&gt;
&lt;li&gt;The useful formats are -&lt;/li&gt;

&lt;ul style=&quot;color: #38761d;&quot;&gt;&lt;li&gt;d&amp;nbsp;&amp;nbsp; - the day of the month (between 1-31)&lt;/li&gt;
&lt;li&gt;D&amp;nbsp; - short textual representation of the day of the month (e,g Sun, Mon etc.)&lt;/li&gt;
&lt;li&gt;t &amp;nbsp;&amp;nbsp; -&amp;nbsp; no of days in that month (e,g 28 for feb, 31 for jan etc.) &lt;/li&gt;
&lt;li&gt;m&amp;nbsp; - the month of the year (between 1-12)&lt;/li&gt;
&lt;li&gt;M - short textual representation of the month of the year (e,g Jan, Feb etc.)&lt;/li&gt;
&lt;li&gt;y&amp;nbsp; - two digit representation of the year (e,g 99)&lt;/li&gt;
&lt;li&gt;Y - four digit representation of the year (e,g 2099)&lt;/li&gt;
&lt;li&gt;L - 1 if this year is a leap year, 0 otherwise&lt;/li&gt;
&lt;li&gt;h&amp;nbsp; - hours (in 12 hrs format)&lt;/li&gt;
&lt;li&gt;H - hours (in 24 hrs format)&lt;/li&gt;
&lt;li&gt;i - minutes&lt;/li&gt;
&lt;li&gt;s - seconds&lt;/li&gt;
&lt;/ul&gt;
&lt;li&gt;e,g -&lt;/li&gt;
&lt;/ul&gt;&lt;blockquote&gt;&lt;span style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif; font-size: small;&quot;&gt;echo date(&quot;D, d-M, Y : H:i:s&quot;);&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #38761d;&quot;&gt;// we are telling the php parser that we will use short textual day name first then the actual day number of that month. Then we will show the short name of the month with a dash in between the day and the month. Lastly we will show the year in full 4 digit format. the last part shows the time. We used the H for showing the time in 24 hrs format i and s for minutes and seconds. We have to add &#39;a&#39; or &#39;A&#39; to get the AM/PM display in the format.&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;&amp;nbsp;If you have any suggestion or question, please feel free to drop a comment.</content><link rel='replies' type='application/atom+xml' href='http://yourdigitaleffects.blogspot.com/feeds/4679363969831539346/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourdigitaleffects.blogspot.com/2010/08/php-date-tips-usage.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/4679363969831539346'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/4679363969831539346'/><link rel='alternate' type='text/html' href='http://yourdigitaleffects.blogspot.com/2010/08/php-date-tips-usage.html' title='PHP Date Tips &amp; Usage'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09514196229867295024</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-364943231029974825.post-740311158975582781</id><published>2010-07-06T14:20:00.000+07:00</published><updated>2010-08-18T17:44:00.181+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="codes"/><category scheme="http://www.blogger.com/atom/ns#" term="fedora"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="necessary"/><category scheme="http://www.blogger.com/atom/ns#" term="plugins"/><category scheme="http://www.blogger.com/atom/ns#" term="software"/><title type='text'>Bringing Life to your fedora</title><content type='html'>I am a newbie user of linux, particularly fedora. I liked fedora when I first used it. From my linux experience I know that sometimes it can be pretty frustrating. So I am here to share my experience with you guys.&lt;br /&gt;
&lt;br /&gt;
Today I am going to discuss some important tools necessary to bring life to your fedora box.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;b style=&quot;color: red;&quot;&gt;[ RPM FUSION REPOSITORY - &lt;span style=&quot;font-size: x-small;&quot;&gt;A Must&lt;/span&gt; ]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpRa6UWBNiCFGDhT1lrUCUsiZkGTNKJFmU1uJwaYRxmNg6eB_WF7NfDriOBtC9Z_0rlLrJP9MEGNXKuXT1JZ6MJuK1Op-3IxzkYoAGtUX1AGF-Z5CTtq9wa0AfvzIjRdtiKmLRFryxMiGZ/s1600/rpmfusion-logo-64.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpRa6UWBNiCFGDhT1lrUCUsiZkGTNKJFmU1uJwaYRxmNg6eB_WF7NfDriOBtC9Z_0rlLrJP9MEGNXKuXT1JZ6MJuK1Op-3IxzkYoAGtUX1AGF-Z5CTtq9wa0AfvzIjRdtiKmLRFryxMiGZ/s320/rpmfusion-logo-64.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;1. RPM Fusion Repository: We are going to install a lot of software through YUM, which downloads and installs software into your system. The fedora system comes with default repositories. But we need the RPM fusion repository. Follow the lead -&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;Go to &lt;a href=&quot;http://rpmfusion.org/Configuration&quot;&gt;RPM FUSION&lt;/a&gt; and select the RPM Fusion Free (because we will be installing only free softwares :) ) or&lt;/li&gt;
&lt;li&gt; You can do the following -&lt;/li&gt;
&lt;/ul&gt;&lt;blockquote&gt;&lt;div style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;su -c &#39;rpm -Uvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm&#39;&lt;/span&gt;&lt;/div&gt;&lt;/blockquote&gt;Now you have a &quot;really needed weapon&quot; in your arsenal. RPM fusion has a database of free software which are not included in the fedora repository (default repository). You can install free codes from the RPM fusion database. Now you can install the codes and listen to your favorite mp3 file. :) -- &lt;b style=&quot;color: red;&quot;&gt;Really the Life Saver!&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;&lt;b style=&quot;color: red;&quot;&gt;[ GStreamer - Ultimate OpenSource Multimedia FrameWork]&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWmjq-p9CYQKLyFpZyNh52Co0KmCW842OOOUzlJ4DeplzPe514hoGsd8Wr5YgrITaU2fTasazwrzpPatgMEU3bCYccuHJt6xN9RmCjzxIyAYfMIO-adnYpzk1p822V5KbwStXCm6WgDkPM/s1600/gstreamer-family.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWmjq-p9CYQKLyFpZyNh52Co0KmCW842OOOUzlJ4DeplzPe514hoGsd8Wr5YgrITaU2fTasazwrzpPatgMEU3bCYccuHJt6xN9RmCjzxIyAYfMIO-adnYpzk1p822V5KbwStXCm6WgDkPM/s320/gstreamer-family.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;b style=&quot;color: red;&quot;&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;We all need to listen to musics or watch movies. But alas!!! in fedora they removed all the decoders which has licensing issue (most of them do). So, fedora left you with some opensource solution i guess (ogg vorbis). Don&#39;t worry. fedora uses GStreamer Framework for multimedia purpose. So, you are just one command away from listening to mp3 or watching mkv video or even dvd files :).&lt;br /&gt;
&lt;br /&gt;
Just open your terminal and type these magic words -&lt;br /&gt;
&lt;blockquote&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;yum install gstreamer-plugins-good-0.10.16-7.fc12.i686&lt;/span&gt;&lt;/span&gt;&lt;/blockquote&gt;After installation just try to open a mp3 file with your rhythm box and listen to your favourite multimedia. &lt;b style=&quot;color: red;&quot;&gt;Enjoy the Life! &lt;/b&gt;&lt;br /&gt;
&lt;div style=&quot;color: red; text-align: center;&quot;&gt;&lt;b&gt;&lt;br /&gt;
&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;color: red; text-align: center;&quot;&gt;&lt;b&gt;[ Download Manager Solution (FlashGot + Prozilla) ]&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicCgkiWwgQkAZB3Ddwp4sT1iV0B8fGeuIYoHqqHuyAHZJYY5noAypjMwm9UkMizmDi4uPSsNEj7WhjsRatPEtvP_54oekl3-5N2J_yjL_J2bnhlymxaJljMf1O-0gMdDP7UDODJ2UIASly/s1600/prozilla204gif.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicCgkiWwgQkAZB3Ddwp4sT1iV0B8fGeuIYoHqqHuyAHZJYY5noAypjMwm9UkMizmDi4uPSsNEj7WhjsRatPEtvP_54oekl3-5N2J_yjL_J2bnhlymxaJljMf1O-0gMdDP7UDODJ2UIASly/s1600/prozilla204gif.gif&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaq7zETJqGEyyajZrSysMwx3kT8Pfd-jMSUewy9nSWEjitr6hKx7Sw0CgVDZuLHhzcD5WasfdQEPM9A4wUvRLJGcArPRHo_9pZPPSYFq-M1jH75S-_dvAyGo3J1CM5Mb6SYLkHW-7VESCS/s1600/flashget.gif&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaq7zETJqGEyyajZrSysMwx3kT8Pfd-jMSUewy9nSWEjitr6hKx7Sw0CgVDZuLHhzcD5WasfdQEPM9A4wUvRLJGcArPRHo_9pZPPSYFq-M1jH75S-_dvAyGo3J1CM5Mb6SYLkHW-7VESCS/s1600/flashget.gif&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Fedora comes with one of the best browser &quot;Firefox&quot;. Your tension of which browser to use is gone. But what about the download manager? Well Firefox&#39;s built in browser is not good enough. Don&#39;t worry - &quot;where there is a problem there&#39;s a way also&quot;. You can use the ultimate combo of FlashGot and Prozilla or any other good DM. FlashGot is a firefox plugin which enables one to redirect download URL from firefox to another 3rd party download manager.&lt;br /&gt;
&lt;br /&gt;
1. Install the &lt;a href=&quot;https://addons.mozilla.org/en-US/firefox/addon/220/&quot;&gt;FlashGot Plugin&lt;/a&gt;&lt;br /&gt;
2. Install the Prozilla DM using Yum&lt;br /&gt;
&lt;blockquote&gt;yum install proz&lt;/blockquote&gt;This command will automatically download and install the prozilla into your system.&lt;br /&gt;
3. &lt;a href=&quot;http://yourdigitaleffects.blogspot.com/2010/03/your-ultimate-you-tube-flash-video-flv.html&quot;&gt;Configure the FlashGot to transfer the download URL to Prozilla&lt;/a&gt;&lt;br /&gt;
Ahhh. All done. Enjoy the net ...&lt;br /&gt;
&lt;br /&gt;
I am going to add more and more tools to the fedora. For the time being, Keep in touch.</content><link rel='replies' type='application/atom+xml' href='http://yourdigitaleffects.blogspot.com/feeds/740311158975582781/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourdigitaleffects.blogspot.com/2010/07/bringing-life-to-your-fedora.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/740311158975582781'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/740311158975582781'/><link rel='alternate' type='text/html' href='http://yourdigitaleffects.blogspot.com/2010/07/bringing-life-to-your-fedora.html' title='Bringing Life to your fedora'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09514196229867295024</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgpRa6UWBNiCFGDhT1lrUCUsiZkGTNKJFmU1uJwaYRxmNg6eB_WF7NfDriOBtC9Z_0rlLrJP9MEGNXKuXT1JZ6MJuK1Op-3IxzkYoAGtUX1AGF-Z5CTtq9wa0AfvzIjRdtiKmLRFryxMiGZ/s72-c/rpmfusion-logo-64.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-364943231029974825.post-1645673238792655445</id><published>2010-07-03T04:34:00.000+07:00</published><updated>2010-07-03T04:34:55.673+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="customization"/><category scheme="http://www.blogger.com/atom/ns#" term="theme"/><category scheme="http://www.blogger.com/atom/ns#" term="wp"/><title type='text'>Wordpress Theme Customization Video Tutorial</title><content type='html'>Many of my friends were asking about Wordpress theme customization. Well I have used WP before, but I never customized theme for it. So, I wonder around the net to find a good WP tutorial site, which can be used to quickly learn the theme customization of the WP.&lt;br /&gt;
&lt;br /&gt;
Today I am going to share two site with you which contains good WP learning material for theme customization.&lt;br /&gt;
&lt;br /&gt;
For those who are eager to learn it very quickly they have to use the video tutorial site. And I found&lt;br /&gt;
&lt;a href=&quot;http://css-tricks.com/designing-for-wordpress-complete-series-downloads/&quot;&gt;CSS TRICKS&lt;/a&gt;&lt;br /&gt;
very helpful for it.&lt;br /&gt;
&lt;br /&gt;
For those who have a low speed internet connection or prefer text based tutorial they can check &lt;br /&gt;
&lt;a href=&quot;http://themeshaper.com/wordpress-theme-development-tools-tutorial/&quot;&gt;THEME SHAPER&lt;/a&gt; site. It has step by step tutorial of how to customize a theme for WP.&lt;br /&gt;
&lt;br /&gt;
Hopefully this links will come to your aids.</content><link rel='replies' type='application/atom+xml' href='http://yourdigitaleffects.blogspot.com/feeds/1645673238792655445/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourdigitaleffects.blogspot.com/2010/07/wordpress-theme-customization-video.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/1645673238792655445'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/1645673238792655445'/><link rel='alternate' type='text/html' href='http://yourdigitaleffects.blogspot.com/2010/07/wordpress-theme-customization-video.html' title='Wordpress Theme Customization Video Tutorial'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09514196229867295024</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-364943231029974825.post-1848763200410381534</id><published>2010-04-28T00:27:00.000+07:00</published><updated>2010-04-28T00:28:40.054+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="nice"/><category scheme="http://www.blogger.com/atom/ns#" term="slide show"/><title type='text'>jQuery: Nice looking slide show in no time !!</title><content type='html'>Sometimes we need to add sideshows to our website. Today we are going to see how to achieve it very quickly with a little bit of coding. We will use the jQuery to reduce the amount of coding we have to do. Now let us see how can we do it -&lt;br /&gt;
&lt;br /&gt;
What we will need -&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;jQuery script [jquery-1.3.2.min.js]&lt;/li&gt;
&lt;li&gt;Images which will appear in the slide show&lt;/li&gt;
&lt;li&gt;Some JS and HTML coding&lt;/li&gt;
&lt;/ol&gt;&amp;nbsp;First we will need to add the jQuery library file.&lt;br /&gt;
&lt;blockquote&gt;&lt;span style=&quot;color: #274e13; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;jquery-1.3.2.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/blockquote&gt;&amp;nbsp;Next we need to setup our own jQuery code to define the slide show materials and properties.&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
&lt;div style=&quot;color: #274e13; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;var srrc = [&quot;1.jpg&quot;, &quot;2.jpg&quot;, &quot;3.jpg&quot;, &quot;4.jpg&quot;, &quot;5.jpg&quot;];&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;srrc &lt;/span&gt;&lt;/b&gt;is the array variable which holds the image paths of the slide show images. You can add as many path as you want.&amp;nbsp; &lt;br /&gt;
&lt;blockquote&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;var &lt;b style=&quot;color: red;&quot;&gt;id &lt;/b&gt;=0;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;var &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;max = 5;&lt;/span&gt;&lt;/b&gt;&lt;/blockquote&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;id &lt;/span&gt;&lt;/b&gt;is the variable whose value tells the browser to load which images from the &lt;b style=&quot;color: red;&quot;&gt;srrc &lt;/b&gt;array. It is acting as a index variable for the &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;srrc &lt;/span&gt;&lt;/b&gt;array. &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;max &lt;/span&gt;&lt;/b&gt;variable defines the maximum number of images defined in the image array.&lt;br /&gt;
&lt;blockquote&gt;&lt;span style=&quot;color: #274e13; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;function run() {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; id = id + 1;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; id = id % max;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; var &lt;b style=&quot;color: red;&quot;&gt;cur &lt;/b&gt;= srrc[id];&lt;/span&gt;&lt;/blockquote&gt;&amp;nbsp;Nothing much to describe here. &lt;b style=&quot;color: red;&quot;&gt;cur &lt;/b&gt;variable holds the path for current image which we are going to display.&lt;br /&gt;
&lt;blockquote&gt;&lt;span style=&quot;color: #274e13; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $(&quot;&lt;i style=&quot;color: black;&quot;&gt;&lt;b&gt;#images&lt;/b&gt;&lt;/i&gt;&quot;).hide();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $(&quot;&lt;i style=&quot;color: black;&quot;&gt;&lt;b&gt;#images&lt;/b&gt;&lt;/i&gt;&quot;).attr({&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;src: cur&lt;/span&gt;&lt;/b&gt;, alt:&#39;&#39;, border:0});&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; $(&quot;&lt;i&gt;&lt;b&gt;&lt;span style=&quot;color: black;&quot;&gt;#images&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&quot;).fadeIn(&quot;slow&quot;);&lt;/span&gt;&lt;/blockquote&gt;&lt;i style=&quot;color: black;&quot;&gt;&lt;b&gt;$(&quot;#images&quot;)&lt;/b&gt;&lt;/i&gt; will return the handle of the html element with the id of &lt;i&gt;&lt;b&gt;images&lt;/b&gt;&lt;/i&gt;. Don&#39;t worry about the element for now, it is a &lt;i style=&quot;color: red;&quot;&gt;&lt;b&gt;&amp;lt;img&amp;gt;&lt;/b&gt;&lt;/i&gt; element, we will be introduced with it in the latter section.&lt;br /&gt;
First we used the jQuery &lt;i&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;hide()&lt;/span&gt;&lt;/b&gt;&lt;/i&gt; function to hide the element.&lt;br /&gt;
Then we use the jQuery &lt;i&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;attr()&lt;/span&gt;&lt;/b&gt;&lt;/i&gt; function to add the html attribute to the &lt;i style=&quot;color: red;&quot;&gt;&lt;b&gt;&amp;lt;img&amp;gt;&lt;/b&gt;&lt;/i&gt; element. The important part is the &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;src: cur&lt;/span&gt;&lt;/b&gt;. &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;cur &lt;/span&gt;&lt;/b&gt;variable is holding the image path for current image. So, we just add the image path to the img tag. It can be translated as &lt;b style=&quot;color: red;&quot;&gt;&amp;lt;img src=&quot;the image path in the cur variable&quot;&amp;gt;&lt;/b&gt;.&lt;br /&gt;
Now the img element has the image but it is hidden. Now we show the whole element using the jQuery &lt;b style=&quot;color: red;&quot;&gt;fadeIn() &lt;/b&gt;effect. This adds nice looking transition effect while changing the images.&lt;br /&gt;
&lt;blockquote&gt;&lt;span style=&quot;color: #274e13; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b style=&quot;color: red;&quot;&gt;setTimeout(run,10000);&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;/blockquote&gt;&amp;nbsp;Now to run this script indefinitely we use &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;setTimeout()&lt;/span&gt;&lt;/b&gt; javascript function. We want to keep each images for 10 secs. So the second parameter is 10000 (it is in mili secs). The first parameter is a callback function.&lt;br /&gt;
Whenever 10 secs has passed since the &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;timeOut()&lt;/span&gt;&lt;/b&gt; function is called, the callback function is called automatically.&lt;br /&gt;
&lt;blockquote&gt;&lt;span style=&quot;color: #274e13; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $(document).ready(setTimeout(run,3000));&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/blockquote&gt;&amp;nbsp;Lastly we use the &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;$(document).ready()&lt;/span&gt;&lt;/b&gt; function to initiate the first call to the &lt;b&gt;run &lt;/b&gt;function. &lt;br /&gt;
&lt;br /&gt;
Now all we need is to add the &amp;lt;img&amp;gt; element into body section of the html page&lt;br /&gt;
&lt;blockquote&gt;&lt;blockquote&gt;&lt;span style=&quot;color: #274e13; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;img src=&quot;1.jpg&quot; width=&quot;395px&quot; height=&quot;245px&quot; alt=&quot;&quot; id=&quot;images&quot; border=&quot;0&quot; /&amp;gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&amp;nbsp;We are all done.&lt;br /&gt;
&lt;a href=&quot;http://www.mediafire.com/download.php?oqwkmwnkyy2&quot;&gt;Here&lt;/a&gt; is the total work.&lt;br /&gt;
If you have any suggestion or question please leave a comment.</content><link rel='replies' type='application/atom+xml' href='http://yourdigitaleffects.blogspot.com/feeds/1848763200410381534/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourdigitaleffects.blogspot.com/2010/04/jquery-nice-looking-slide-show-in-no.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/1848763200410381534'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/1848763200410381534'/><link rel='alternate' type='text/html' href='http://yourdigitaleffects.blogspot.com/2010/04/jquery-nice-looking-slide-show-in-no.html' title='jQuery: Nice looking slide show in no time !!'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09514196229867295024</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-364943231029974825.post-1446379412174034349</id><published>2010-04-23T12:20:00.000+07:00</published><updated>2010-04-23T12:20:41.579+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="dial-up"/><category scheme="http://www.blogger.com/atom/ns#" term="driver"/><category scheme="http://www.blogger.com/atom/ns#" term="edge"/><category scheme="http://www.blogger.com/atom/ns#" term="gprs"/><category scheme="http://www.blogger.com/atom/ns#" term="modem"/><category scheme="http://www.blogger.com/atom/ns#" term="mtk"/><category scheme="http://www.blogger.com/atom/ns#" term="win 7"/><title type='text'>Activate GPRS on China Mobile&#39;s Cell Phone in Win7</title><content type='html'>This is a complete step by step guide to use your China Mobile as a GPRS modem for connecting to the internet.&lt;br /&gt;
&lt;br /&gt;
1. Plug-in your mobile into USB and select the &quot;COM Port&quot; if any option on your mobile device pops up.&lt;br /&gt;
&lt;br /&gt;
2. Right click the &quot;Computer&quot; on desktop and go to &quot;properties&quot;. Click the &quot;Device Manager&quot; on the top left side of the properties window.&lt;br /&gt;
&lt;br /&gt;
3. Find out your modem device. It should be appear with a yellow exclamation sign.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIs7qRteFXwnNI0syY64P1IZj-l5i-cCcxq3x_svZWlBf3ketbZSyYbJfCbIpD-K_bPsPOZb-vTxAoRlNk34DatZUeJ6FPP10T6vaSAb49m73n8qiZzSeDcbGD5Zq_1hrKpxaGQ4rwjBQQ/s1600/s01.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;mtk&quot; border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIs7qRteFXwnNI0syY64P1IZj-l5i-cCcxq3x_svZWlBf3ketbZSyYbJfCbIpD-K_bPsPOZb-vTxAoRlNk34DatZUeJ6FPP10T6vaSAb49m73n8qiZzSeDcbGD5Zq_1hrKpxaGQ4rwjBQQ/s320/s01.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;4. Download this driver. [&lt;a href=&quot;http://www.mediafire.com/download.php?mzjzhmmmnhh&quot;&gt;MTK CPU USB Driver&lt;/a&gt;] 17 KB&lt;br /&gt;
&lt;br /&gt;
5. Double click the sign in the device manager to bring up the properties window of the modem device. Click &quot;Update driver&quot; located in the lower left side of the dialog. Now Select the &quot;Browse my computer for driver software&quot; and show the location of the driver. Click Next to install the driver. Select &quot;continue or install anyway&quot; if any dialog pops up saying that the driver is not signed digitally.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2C5B2uQLeVKyMaWjsFpdwhFEWUAHK5dpb8zbZpHqbTmL8ED1oBE5Thteeunf7MZs26W1WP3D_O7GThqCZa622uyK3xmkC6q1wenRAkHI9rxFI78mbt2ejDn5vk4HyUtgzhDHMwTvx6OEG/s1600/s02.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2C5B2uQLeVKyMaWjsFpdwhFEWUAHK5dpb8zbZpHqbTmL8ED1oBE5Thteeunf7MZs26W1WP3D_O7GThqCZa622uyK3xmkC6q1wenRAkHI9rxFI78mbt2ejDn5vk4HyUtgzhDHMwTvx6OEG/s400/s02.jpg&quot; width=&quot;381&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
6. Now the driver for your modem should be installed. It should say something like &quot;62xx USB Modem Driver (COM yy)&quot;.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpREa9m53ximOIe0Bvx6JBtZ3Lkycw9Da0ZigRz_Fn9YjQHjcLc-DpyHch6dJfjWa5jh_TwkwcMZOJVpahObvR3zA_3WaHGJG24I8WHzpf2vW69ZIN7kulBJH6dZRdd0iTaAGDcTgSUoy-/s1600/s03.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpREa9m53ximOIe0Bvx6JBtZ3Lkycw9Da0ZigRz_Fn9YjQHjcLc-DpyHch6dJfjWa5jh_TwkwcMZOJVpahObvR3zA_3WaHGJG24I8WHzpf2vW69ZIN7kulBJH6dZRdd0iTaAGDcTgSUoy-/s320/s03.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
7. Now open up the start menu and in the search box type &quot;modem&quot;. Now select the &quot;Phone &amp;amp; Modem&quot; located under the &quot;Control Panel&quot; section. You can also go to the control panel and in the search box (upper right corner) type &quot;modem&quot; and then choose the &quot;Phone &amp;amp; Modem&quot;.&lt;br /&gt;
&lt;br /&gt;
8. After opening the &quot;Phone and Modem&quot; palette, select the &quot;Modems&quot; tab. Click &quot;Add&quot; to add new modem. Now a &quot;Add hardware wizard&quot; will pop up. Check &quot;Don&#39;t detect my modem&quot; and click next.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgw6iNlm4W4-S1NO9TK9JxZzFfgc4zNp0Bp13Z8fobRlU8S_T4YzQlGs3CdYqbzbTBjJA77n8dSggyhYSG1W4XJg65GQDfjsDQQ-jIX0Tzt2W_JhH_422ko001kiqP_EWuSl2k33CU_8EsS/s1600/s04.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;338&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgw6iNlm4W4-S1NO9TK9JxZzFfgc4zNp0Bp13Z8fobRlU8S_T4YzQlGs3CdYqbzbTBjJA77n8dSggyhYSG1W4XJg65GQDfjsDQQ-jIX0Tzt2W_JhH_422ko001kiqP_EWuSl2k33CU_8EsS/s400/s04.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
9. Now download this modem driver. [&lt;a href=&quot;http://www.mediafire.com/download.php?mnytdmwzn2y&quot;&gt;MT6225_Modem_Driver&lt;/a&gt;] 31KB&lt;br /&gt;
&lt;br /&gt;
9. On the next section click the &quot;Have disk&quot; button and browse for the modem driver. You will see the modem driver, but the driver is not digitally signed. Click next to continue installation with the modem driver.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjRSKVeUjEE1uVkLNrcoWcwJ5ynmRUWKUfB_kYLr14iUq0jNmPXyOP08yFUb9Xztgs-zPaWX_apoHdPS_ybO-nMDA4hh3gMp3wQ7hRBnhFp0IyI7PhinCVd_ou0L1mEx9MfDo-EWGGqrDH/s1600/s05.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;238&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjRSKVeUjEE1uVkLNrcoWcwJ5ynmRUWKUfB_kYLr14iUq0jNmPXyOP08yFUb9Xztgs-zPaWX_apoHdPS_ybO-nMDA4hh3gMp3wQ7hRBnhFp0IyI7PhinCVd_ou0L1mEx9MfDo-EWGGqrDH/s400/s05.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
10. Now in the next section select the &quot;COM yy&quot; as the communication port for your modem. Click next to add the modem. You can find your modem&#39;s &quot;COM yy&quot; from the device manager.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh06IJWUaXvwLuNcKKlvcaEaIMVhHHv9YwnPIQQQ6vNAnm6wLRXk1zwM3xQghwen8SpoOgyEDApQ8J6a4o_KdUAm2eVzJM42XE9cnzve-1XZzliZ0UTXoUqIa07lVSxuKG_0cpW_z2bDYT2/s1600/s06.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;312&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh06IJWUaXvwLuNcKKlvcaEaIMVhHHv9YwnPIQQQ6vNAnm6wLRXk1zwM3xQghwen8SpoOgyEDApQ8J6a4o_KdUAm2eVzJM42XE9cnzve-1XZzliZ0UTXoUqIa07lVSxuKG_0cpW_z2bDYT2/s400/s06.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
11. Your Modem is now installed. You can create dial-up connection using it. Now let us test the modem.&lt;br /&gt;
Again open the &quot;Phone &amp;amp; Modem&quot; control panel palette. Go to &quot;Modems&quot; tab and double click the installed modem. Modem&#39;s property dialog will pop up. Now go to &quot;Diagnostics&quot; tab and click &quot;Query Modem&quot;. After a short while it will show the result of the query. This is a proof which indicates that your modem is working.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgp0WER0HB5rK3S-GV5uuJiH-MaQUEuOFtFj-6Md3DqMQhyphenhyphen9o44SKfbMNftIvkDNRBe0uI5lpsExk_rkvR_RIPlPr8OjLfhcP12-6pPd8kSUbFDPbSZHWYWSGJ5DdnHomHBaj_gAIgf2ENw/s1600/s07.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;352&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgp0WER0HB5rK3S-GV5uuJiH-MaQUEuOFtFj-6Md3DqMQhyphenhyphen9o44SKfbMNftIvkDNRBe0uI5lpsExk_rkvR_RIPlPr8OjLfhcP12-6pPd8kSUbFDPbSZHWYWSGJ5DdnHomHBaj_gAIgf2ENw/s400/s07.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Now create a dial-up connection using this modem and enjoy edge or gprs service.&lt;br /&gt;
This walk-through is for win7 but you can use it for win xp also. &lt;br /&gt;
If any of the link becomes invalid, please notify me. or you can google out the driver yourself.&lt;br /&gt;
&lt;br /&gt;
For any question and suggestion, please leave a comment.&lt;br /&gt;
&lt;span id=&quot;goog_621707977&quot;&gt;&lt;/span&gt;&lt;span id=&quot;goog_621707978&quot;&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://yourdigitaleffects.blogspot.com/feeds/1446379412174034349/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourdigitaleffects.blogspot.com/2010/04/activate-gprs-on-china-mobiles-cell.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/1446379412174034349'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/1446379412174034349'/><link rel='alternate' type='text/html' href='http://yourdigitaleffects.blogspot.com/2010/04/activate-gprs-on-china-mobiles-cell.html' title='Activate GPRS on China Mobile&#39;s Cell Phone in Win7'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09514196229867295024</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiIs7qRteFXwnNI0syY64P1IZj-l5i-cCcxq3x_svZWlBf3ketbZSyYbJfCbIpD-K_bPsPOZb-vTxAoRlNk34DatZUeJ6FPP10T6vaSAb49m73n8qiZzSeDcbGD5Zq_1hrKpxaGQ4rwjBQQ/s72-c/s01.png" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-364943231029974825.post-2156319389870002665</id><published>2010-04-17T20:17:00.000+07:00</published><updated>2010-04-17T20:17:51.604+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="button"/><category scheme="http://www.blogger.com/atom/ns#" term="cool"/><category scheme="http://www.blogger.com/atom/ns#" term="gimp"/><category scheme="http://www.blogger.com/atom/ns#" term="looking"/><category scheme="http://www.blogger.com/atom/ns#" term="nice"/><title type='text'>GIMP: Create Nice Looking Button For Your Website</title><content type='html'>It is very easy to create nice looking button in modern graphics editor like PS CS3. I will show the basic behind creating in creating such nice and cool looking button. I am using GIMP (GNU Image Manipulation Program) for creating such an image. The method is almost similar in PS CS3 or earlier.&lt;br /&gt;
&lt;br /&gt;
Here is the button which we are gonna create using the graphics editor -&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgR99MYL6c235GhdDk0-qJ4Bj1XyyqbCMQkftrP-Z7qW9EaIjT5EX4sOvYgHXZzXgVqPHZtVDIyn60Ys2XFW-LcFuJ8EwAgeohPV7AY9Ol9oghyphenhyphent8oicGEY8aMcI3zK4_s5uOptePRxly-5/s1600/btn.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgR99MYL6c235GhdDk0-qJ4Bj1XyyqbCMQkftrP-Z7qW9EaIjT5EX4sOvYgHXZzXgVqPHZtVDIyn60Ys2XFW-LcFuJ8EwAgeohPV7AY9Ol9oghyphenhyphent8oicGEY8aMcI3zK4_s5uOptePRxly-5/s320/btn.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
1) First we need to create an empty space for creating the button. I am using 300x150 pixel dimension stage. The stage is set to full transparent. This is how it looks like -&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpkqn6R5zMyINngcLfeXidvbeaFS1H3Mjxyrvrs0qfWxQTpQT8sq0gPQqC-SLBKuI2_wfZDidtmp9R0lQOH64fxY5mQ2u9wuUwkcE65uiQ0q4S_OmAaBhQ-Whu2oT7JMYgMNV9Jl84eBrC/s1600/step1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpkqn6R5zMyINngcLfeXidvbeaFS1H3Mjxyrvrs0qfWxQTpQT8sq0gPQqC-SLBKuI2_wfZDidtmp9R0lQOH64fxY5mQ2u9wuUwkcE65uiQ0q4S_OmAaBhQ-Whu2oT7JMYgMNV9Jl84eBrC/s320/step1.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
2) Create a new layer to create the background effect of the button. Use (CTRL+L) to bring out the layer dialog if it is not showing.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj29TiMMGnHY7_tukKcvmmos9QMGZaDUqmuk8Ew-By_NwB7xxBEFuiLjFoEAQtpSOiRBz7czOOsmOMLAckPPrCiT8-7zdb28IHulMH4oSva5OU_Ke1VgucOZxUv0xfuDudsfiQG3P1pDZZF/s1600/step2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj29TiMMGnHY7_tukKcvmmos9QMGZaDUqmuk8Ew-By_NwB7xxBEFuiLjFoEAQtpSOiRBz7czOOsmOMLAckPPrCiT8-7zdb28IHulMH4oSva5OU_Ke1VgucOZxUv0xfuDudsfiQG3P1pDZZF/s320/step2.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
3) Now select the &quot;Rectangle Select Tool&quot; from the toolbox and draw a rectangle. See the option for the &quot;&lt;b style=&quot;color: red;&quot;&gt;Rectangle Select Tool&lt;/b&gt;&quot; and find and activate the &quot;&lt;b style=&quot;color: red;&quot;&gt;Rounded Corner&lt;/b&gt;&quot; property. This will make the selection look like a rounded box.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIrxkuMon82Qjb3I9jnZpkDfa8pgNRyUMdVWZYIxEuMN1FjrMBjwHSSsR6_kXjxB1qzAVihrU5rYWtlUh1wHeU5bXtu973kIs1R8DN2dv7iqkuGuJztjPE9ENK3499HiFlm3zY-hOGY42y/s1600/step3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIrxkuMon82Qjb3I9jnZpkDfa8pgNRyUMdVWZYIxEuMN1FjrMBjwHSSsR6_kXjxB1qzAVihrU5rYWtlUh1wHeU5bXtu973kIs1R8DN2dv7iqkuGuJztjPE9ENK3499HiFlm3zY-hOGY42y/s320/step3.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
4) Now Select the &quot;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;Bucket Fill Tool&lt;/span&gt;&lt;/b&gt;&quot; from the toolbox. Select your desired background color and click the selection to fill the selection with that color. This is our background of the button.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipH-XJuOWi43fOItwKYkMduLsgpP9vcnJjlyER6ck6OKBkMlOyfzATuqzA9Z5LDbuQXsJnjoX20gtX79H7LRwpHXCuVZNADkjqq0shjepheJcR61rpocBberwC5_QCu1b_6_0L__I58T6T/s1600/step4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipH-XJuOWi43fOItwKYkMduLsgpP9vcnJjlyER6ck6OKBkMlOyfzATuqzA9Z5LDbuQXsJnjoX20gtX79H7LRwpHXCuVZNADkjqq0shjepheJcR61rpocBberwC5_QCu1b_6_0L__I58T6T/s320/step4.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
5) Now we have to create the top layer of the button. Again we create a layer and then draw a similar rectangle tool, &lt;i&gt;&lt;span style=&quot;color: red;&quot;&gt;but this time it is a little smaller than the background&lt;/span&gt;&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtiHQs1xV1y7TLJIOhspP1lxYUSaA2AfojhPvqJoN2jlF0gw0iP2SKniuJAUwjxANonfcOC64TrjMqdBhrOXex9rvWgfyUGzwiToslwqv5D4bTvJuS7w_y6QdZKNaii8bDF1MRM67fL_rq/s1600/step5.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtiHQs1xV1y7TLJIOhspP1lxYUSaA2AfojhPvqJoN2jlF0gw0iP2SKniuJAUwjxANonfcOC64TrjMqdBhrOXex9rvWgfyUGzwiToslwqv5D4bTvJuS7w_y6QdZKNaii8bDF1MRM67fL_rq/s320/step5.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
6) After creating a slight smaller selection similar to the background on top of the background, we have to fill the selection again to get the shape of the selection. But this time we will not use the &quot;Fill Bucket Tool&quot;; instead we will use the &quot;Gradient Fill Tool&quot;. It is know as &quot;&lt;b style=&quot;color: red;&quot;&gt;Blend Tool&lt;/b&gt;&quot; in GIMP. We have to select two color for gradient fill. Then using the tool mentioned above we will fill the selection. The output will look similar to this -&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcei7qGlFka1yQcAoS6FmwXT-czzKqIkTedbYQ5l4VeWdKSHfFewmoxkUysNrFo95FOyMumLeLKXcZRZ0pnXrtFX8fV1dY1Xic4syARFC3eRMTNYu7hKzyAF8tNkB0mOFIqP2GEFp-W_Wz/s1600/step6.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcei7qGlFka1yQcAoS6FmwXT-czzKqIkTedbYQ5l4VeWdKSHfFewmoxkUysNrFo95FOyMumLeLKXcZRZ0pnXrtFX8fV1dY1Xic4syARFC3eRMTNYu7hKzyAF8tNkB0mOFIqP2GEFp-W_Wz/s320/step6.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
7) So far we have completed the shape of the button. It is now time for to put some text. Select the &quot;&lt;b style=&quot;color: red;&quot;&gt;Text Tool&lt;/b&gt;&quot; (T) and click on the button to enter text. The text itself will appear as a different layer. So you do not have to create a new layer for the text.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxQDubCguMG_QFuVvH9oixao9BuW_T4934eP38ukmikhsocyi0z0eRAd9QSSU3PdXmrBoz4z6RHPw1sHXerKYEuVpiC5X7fIyU0RVHoRu4weo_BEtmgsCsbk2pcvkc8VgVp425nz_pm8sD/s1600/step7.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxQDubCguMG_QFuVvH9oixao9BuW_T4934eP38ukmikhsocyi0z0eRAd9QSSU3PdXmrBoz4z6RHPw1sHXerKYEuVpiC5X7fIyU0RVHoRu4weo_BEtmgsCsbk2pcvkc8VgVp425nz_pm8sD/s320/step7.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;8) Adjust the text as per your need by using the &quot;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;Move tool&lt;/span&gt;&lt;/b&gt;&quot; (M). Now we are gonna add the shadow of the text. For this we need to duplicate the text. Select the text and open the &lt;i style=&quot;color: red;&quot;&gt;Layer dialog box&lt;/i&gt; (CTRL+L) right click the text layer and click the &lt;i style=&quot;color: red;&quot;&gt;duplicate layer&lt;/i&gt; option.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxfCuSNxWw3aJzLszEDnAoAdhpu-OW5e4HRzNLH4VWfXe94fm7GAkFIfGWiCb-OrzSUbjR813rUyz9orMuymALDsvYOqLPWt8KD_QNpHOBZqs0ZEEGe5ywjlv6Zz_ivnR4KqCr_0Moa8KB/s1600/step8.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgxfCuSNxWw3aJzLszEDnAoAdhpu-OW5e4HRzNLH4VWfXe94fm7GAkFIfGWiCb-OrzSUbjR813rUyz9orMuymALDsvYOqLPWt8KD_QNpHOBZqs0ZEEGe5ywjlv6Zz_ivnR4KqCr_0Moa8KB/s320/step8.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
9) Double click the layer name to rename it. Rename the new duplicate layer into an understandable name. Now select the new renamed layer, and move it down. Put it just under the text layer. This newly created layer will be acting as shadow for the old text layer. So, the layer should be immediate below of the text layer.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBsiI9hLPdXNQzVfcjF1mjJQLRdX2ITS0nH4kb4ZTQLEGxJ21mQy5qlXK-cYxbhcs7stvXemle_-tTHF8eFKEw8BmdLeNO6wkXa4Fa9gq4JbbozNVKkD4q6j0TNM-V2nX5uJq79ErNEJlF/s1600/step10.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBsiI9hLPdXNQzVfcjF1mjJQLRdX2ITS0nH4kb4ZTQLEGxJ21mQy5qlXK-cYxbhcs7stvXemle_-tTHF8eFKEw8BmdLeNO6wkXa4Fa9gq4JbbozNVKkD4q6j0TNM-V2nX5uJq79ErNEJlF/s320/step10.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
10) Now select the text layer and click the &quot;&lt;i&gt;&lt;span style=&quot;color: red;&quot;&gt;eye&lt;/span&gt;&lt;/i&gt;&quot; on the left of the layer. This will hide the layer. Now you can edit the shadow layer. We need the shadow layer text to be a different color. In precise we need to define the shadow color. So, select the &quot;&lt;b style=&quot;color: red;&quot;&gt;Text Tool&lt;/b&gt;&quot; and click on the text of the shadow layer. Make sure the shadow layer is selected. Change the color of the text to your desired shadow color.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7LspGqZWHZTj93oTbqOpzzsGUmHk1mipk1TmAcuX1AtRfpBJk0VpypqihZlPOnDmH1eVn4zl3Rn5l4vKGgWONw011mrBqQDzzVGriEjL6NqxiJG8_32oEPWt-MZaL7RPgJdSzBeOkUX7N/s1600/step11.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7LspGqZWHZTj93oTbqOpzzsGUmHk1mipk1TmAcuX1AtRfpBJk0VpypqihZlPOnDmH1eVn4zl3Rn5l4vKGgWONw011mrBqQDzzVGriEjL6NqxiJG8_32oEPWt-MZaL7RPgJdSzBeOkUX7N/s320/step11.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
11) Now we have to place the shadow in proper position. The layer should be moved slightly to the desired shadow direction. We have to move the shadow layer just a little to the left and down direction to create an optical illusion of drop shadow of the original text. Select the shadow layer and select the &quot;&lt;b style=&quot;color: red;&quot;&gt;Move Tool&lt;/b&gt;&quot; (M) from the tool box. Now &lt;i&gt;&lt;span style=&quot;color: red;&quot;&gt;select the stage and press left and down twice&lt;/span&gt;&lt;/i&gt;. This will move the shadow layer just a bit in the left and down direction.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtUbHxTgv1pChrZCQWHWljPYsQE7MNqGbs0VYegectGsnpVS43u7fUEiS51tW6DPoVMxTpai7yhEIzSxAZFSFbuDbqK6YrYamir3oi5BQvv0_VR5NE6jJnIL1lPisP-PmAElbL-WENAtmF/s1600/step12.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtUbHxTgv1pChrZCQWHWljPYsQE7MNqGbs0VYegectGsnpVS43u7fUEiS51tW6DPoVMxTpai7yhEIzSxAZFSFbuDbqK6YrYamir3oi5BQvv0_VR5NE6jJnIL1lPisP-PmAElbL-WENAtmF/s320/step12.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
12) Now set the text layer to visible. This is done by clicking the &quot;&lt;i style=&quot;color: red;&quot;&gt;eye&lt;/i&gt;&quot; of the text layer in the layer dialog.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnBB2PfgVSwyhRCTJqVpZDwdE6YDcdHBWPXGZjXVbC43tGDTl_40eq447HrFViXFJvS_krOp375xow5IchNWHV2MrpDUUHZXwaYV_5ULYdz1bW3Z5VW9GAdIOEI66KvDZniHMmfh9a9dk-/s1600/step13.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnBB2PfgVSwyhRCTJqVpZDwdE6YDcdHBWPXGZjXVbC43tGDTl_40eq447HrFViXFJvS_krOp375xow5IchNWHV2MrpDUUHZXwaYV_5ULYdz1bW3Z5VW9GAdIOEI66KvDZniHMmfh9a9dk-/s320/step13.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
13) As you can see a nice and cool looking button is created with shadow effect :) . We are just a little tweak away from using the button. Select the background layer &lt;i&gt;&lt;span style=&quot;color: red;&quot;&gt;bn_bg&lt;/span&gt;&lt;/i&gt;. Go to stage and then go to &lt;i&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;Image-&amp;gt;Autocrop Image&lt;/span&gt;&lt;/b&gt;&lt;/i&gt; from the menu. This will make the button compact. Now we can export the button into different format and use it on our website :) .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5affUlF6uFgEjopFt5HlRH-UFIvn6ZDyWScdlXIjD6m5aqaZ-3f8dJIdj1OAbxmBXF0EypTA5pPPjdXk12pJ_gOszgV0kvcFQ5_36-IQ-Sr7d4YZ3NKeBQHpW_imGDUhLMW5_VoxbtOHE/s1600/step14.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5affUlF6uFgEjopFt5HlRH-UFIvn6ZDyWScdlXIjD6m5aqaZ-3f8dJIdj1OAbxmBXF0EypTA5pPPjdXk12pJ_gOszgV0kvcFQ5_36-IQ-Sr7d4YZ3NKeBQHpW_imGDUhLMW5_VoxbtOHE/s320/step14.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.mediafire.com/download.php?enq5udhyzmk&quot;&gt;Here&lt;/a&gt; is the total work.&lt;br /&gt;
If you have any suggestion or question, leave a comment.</content><link rel='replies' type='application/atom+xml' href='http://yourdigitaleffects.blogspot.com/feeds/2156319389870002665/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourdigitaleffects.blogspot.com/2010/04/gimp-create-nice-looking-button-for.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/2156319389870002665'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/2156319389870002665'/><link rel='alternate' type='text/html' href='http://yourdigitaleffects.blogspot.com/2010/04/gimp-create-nice-looking-button-for.html' title='GIMP: Create Nice Looking Button For Your Website'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09514196229867295024</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgR99MYL6c235GhdDk0-qJ4Bj1XyyqbCMQkftrP-Z7qW9EaIjT5EX4sOvYgHXZzXgVqPHZtVDIyn60Ys2XFW-LcFuJ8EwAgeohPV7AY9Ol9oghyphenhyphent8oicGEY8aMcI3zK4_s5uOptePRxly-5/s72-c/btn.png" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-364943231029974825.post-2410902114835537021</id><published>2010-04-14T13:58:00.000+07:00</published><updated>2010-04-14T13:58:07.926+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="button"/><category scheme="http://www.blogger.com/atom/ns#" term="html"/><category scheme="http://www.blogger.com/atom/ns#" term="image"/><category scheme="http://www.blogger.com/atom/ns#" term="rollover"/><title type='text'>HTML tweak: Use Image as submit button with rollover effect</title><content type='html'>We sometime need to submit form in our websites. To perform submit there is a HTML element name submit button. But what if we want to use image as a submit button? This can be done very easily. Let us see how it is done -&lt;br /&gt;
&lt;br /&gt;
What we need :&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Image which will be acting as the submit button.&lt;/li&gt;
&lt;li&gt;Slightly modified Image of the first one to show some rollover effect.&lt;/li&gt;
&lt;li&gt;HTML codes and some JS code.&lt;/li&gt;
&lt;/ol&gt;To use an image as a submit button we need the html tag &lt;i&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;input&amp;gt;&lt;/span&gt;&lt;/b&gt;&lt;/i&gt; but the &lt;i style=&quot;color: red;&quot;&gt;&lt;b&gt;type &lt;/b&gt;&lt;/i&gt;property of the input tag will be &lt;i&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;image &lt;/span&gt;&lt;/b&gt;&lt;/i&gt;instead of &lt;i&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;submit&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;. That way we can add an image as a button.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote style=&quot;color: #38761d; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;input type=&quot;image&quot; src=&quot;subscribe.png&quot; /&amp;gt;&lt;/blockquote&gt;This HTML code uses the &lt;span style=&quot;color: #38761d; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;subscribe.png&lt;/span&gt; as the submit button.&lt;br /&gt;
Now we will add some simple rollover effect.&lt;br /&gt;
&lt;blockquote&gt;&lt;span style=&quot;color: #38761d; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;input type=&quot;image&quot; src=&quot;subscribe.png&quot; &lt;b&gt;onmouseover=&quot;this.src=&#39;sub_top.png&#39;&quot; onmouseout=&quot;this.src=&#39;subscribe.png&#39;&quot;&lt;/b&gt;/&amp;gt;&lt;/span&gt;&lt;/blockquote&gt;&amp;nbsp;We are using small javascript code to change the image of the button whenever the user put the mouse over the button. This adds a nice rollover effect. We added the &lt;i&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;onmouseover &lt;/span&gt;&lt;/b&gt;&lt;/i&gt;event and then change the image &lt;i style=&quot;color: red;&quot;&gt;&lt;b&gt;src &lt;/b&gt;&lt;/i&gt;property of that element. We have to restore the image whenever the button loses focus. This is done by the &lt;i style=&quot;color: red;&quot;&gt;&lt;b&gt;onmouseout&lt;/b&gt;&lt;/i&gt; event.&lt;br /&gt;
&lt;br /&gt;
All done. Here is the screen shot of how it looks.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiO36ErTCV3CrLoSBATSaoxBH3nkCStcXeFhHbsBmytI-48M088c2_TTxHtHenv3gn0uyAGOxjd0eEQWAioUiznLptoQxkrHdK-AFN-rFzvUxhzDNVlri3cu93u8fS5RmjzvZwOMuJ3tVNB/s1600/normal.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiO36ErTCV3CrLoSBATSaoxBH3nkCStcXeFhHbsBmytI-48M088c2_TTxHtHenv3gn0uyAGOxjd0eEQWAioUiznLptoQxkrHdK-AFN-rFzvUxhzDNVlri3cu93u8fS5RmjzvZwOMuJ3tVNB/s320/normal.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVLSRHxjRQ3o9oIJi4PuWiUXNbfo3k8c8mqBA2x0HdfMf3gDH2aWkIrOT3LDdY_zpqPdtMj6FE7paLSnDJ3ukOwIKT-pAL9UvBYzZhnDFNpvllqe3XkPuPvLvYvtnYXO-z0PJFmAG5ER8I/s1600/rollover.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVLSRHxjRQ3o9oIJi4PuWiUXNbfo3k8c8mqBA2x0HdfMf3gDH2aWkIrOT3LDdY_zpqPdtMj6FE7paLSnDJ3ukOwIKT-pAL9UvBYzZhnDFNpvllqe3XkPuPvLvYvtnYXO-z0PJFmAG5ER8I/s320/rollover.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href=&quot;http://www.mediafire.com/download.php?zoomm3dz22n&quot;&gt;Here&lt;/a&gt; is the total work.&lt;br /&gt;
If you have any suggestion or question please leave a comment.</content><link rel='replies' type='application/atom+xml' href='http://yourdigitaleffects.blogspot.com/feeds/2410902114835537021/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourdigitaleffects.blogspot.com/2010/04/html-tweak-use-image-as-submit-button.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/2410902114835537021'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/2410902114835537021'/><link rel='alternate' type='text/html' href='http://yourdigitaleffects.blogspot.com/2010/04/html-tweak-use-image-as-submit-button.html' title='HTML tweak: Use Image as submit button with rollover effect'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09514196229867295024</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiO36ErTCV3CrLoSBATSaoxBH3nkCStcXeFhHbsBmytI-48M088c2_TTxHtHenv3gn0uyAGOxjd0eEQWAioUiznLptoQxkrHdK-AFN-rFzvUxhzDNVlri3cu93u8fS5RmjzvZwOMuJ3tVNB/s72-c/normal.png" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-364943231029974825.post-558700914562263700</id><published>2010-04-08T01:30:00.000+07:00</published><updated>2010-04-15T21:23:35.847+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="form"/><category scheme="http://www.blogger.com/atom/ns#" term="form validation"/><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><title type='text'>Rapid jQuery: HTML Form Validation</title><content type='html'>I have showed the idea of basic form validation with jQuery on my &lt;a href=&quot;http://yourdigitaleffects.blogspot.com/2010/04/do-it-with-jquery-html-form-validation.html&quot;&gt;previous&lt;/a&gt; post. Now I am gonna show you guys how to speed up the validation process by using plug-in. Be ready to be amazed !&lt;br /&gt;
&lt;br /&gt;
What we need :&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;&lt;a href=&quot;http://jquery.com/&quot;&gt;jQuery&lt;/a&gt;&amp;nbsp; &lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://plugins.jquery.com/files/jquery.validate_17.zip&quot;&gt;jQuery Form Validation plug-in&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;HTML codes :)&lt;/li&gt;
&lt;/ol&gt;First we need to add the jQuery and the plug-in to our webpage which we want to validate.&lt;br /&gt;
&lt;blockquote&gt;&lt;span style=&quot;color: #274e13; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;jquery-1.3.2.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;jquery.validate.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/blockquote&gt;Now lets have a look at the form which has to be validated.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&lt;span style=&quot;color: #274e13; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;form action=&quot;submit.php&quot; method=&quot;post&quot; id=&quot;&lt;i style=&quot;color: red;&quot;&gt;&lt;b&gt;doit&lt;/b&gt;&lt;/i&gt;&quot; &amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;fieldset&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;label for=&quot;&lt;i style=&quot;color: #cc0000;&quot;&gt;&lt;b&gt;name&lt;/b&gt;&lt;/i&gt;&quot;&amp;gt;Name&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input type=&quot;text&quot; id=&quot;&lt;i style=&quot;color: #cc0000;&quot;&gt;&lt;b&gt;name&lt;/b&gt;&lt;/i&gt;&quot; &lt;b style=&quot;color: #660000;&quot;&gt;name=&quot;name&quot;&lt;/b&gt; &lt;b&gt;&lt;span style=&quot;color: #674ea7;&quot;&gt;class=&quot;required&quot; &lt;/span&gt;&lt;/b&gt;minlength=&quot;2&quot; /&amp;gt;&amp;lt;br /&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;label for=&quot;email&quot;&amp;gt;Email&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input type=&quot;text&quot; &lt;b style=&quot;color: #660000;&quot;&gt;name=&quot;email&quot;&lt;/b&gt; id=&quot;email&quot; &lt;b&gt;&lt;span style=&quot;color: #674ea7;&quot;&gt;class=&quot;required email&quot;&lt;/span&gt;&lt;/b&gt; /&amp;gt;&amp;lt;br /&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;label for=&quot;zip_code&quot;&amp;gt;Zip code&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input type=&quot;text&quot; &lt;span style=&quot;color: #660000;&quot;&gt;name=&quot;digits&quot;&lt;/span&gt; id=&quot;zip_code&quot; &lt;b&gt;&lt;span style=&quot;color: #674ea7;&quot;&gt;class=&quot;required digits&quot;&lt;/span&gt;&lt;/b&gt; /&amp;gt;&amp;lt;br /&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input class=&quot;submit&quot; type=&quot;submit&quot; value=&quot;Submit&quot; /&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;/fieldset&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;/form&amp;gt; &lt;/span&gt;&lt;/blockquote&gt;We have to set up some meta data in order to use the built in validation methods. We are using the label to notify the user about the field and also to display the error message. The important part is the &lt;i style=&quot;color: red;&quot;&gt;&lt;b&gt;for&lt;/b&gt;&lt;/i&gt; property. It is the same as the &lt;i style=&quot;color: red;&quot;&gt;&lt;b&gt;id&lt;/b&gt;&lt;/i&gt; of the component it is representing.&lt;br /&gt;
The next important part is the &lt;i style=&quot;color: red;&quot;&gt;&lt;b&gt;name&lt;/b&gt;&lt;/i&gt; property it must be one of the predefined class. some of the predefined classes are:&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;name - validation for common name&lt;/li&gt;
&lt;li&gt;email - validation for email addresses&lt;/li&gt;
&lt;li&gt;url - validation for url addresses&lt;/li&gt;
&lt;li&gt;digits - validation for only digits&lt;/li&gt;
&lt;/ul&gt;There are many predefined class. You can check the plug-in&#39;s documentation for complete list.&lt;br /&gt;
Next important property is &lt;i style=&quot;color: red;&quot;&gt;&lt;b&gt;class&lt;/b&gt;&lt;/i&gt; property. You can define your field to be required in the class property.&lt;br /&gt;
Note that the email input type has a class value of &lt;i style=&quot;color: red;&quot;&gt;&lt;b&gt;&quot;required email&quot;&lt;/b&gt;&lt;/i&gt;. It means that the field is a necessary one and it must contain a valid email address.&lt;br /&gt;
&lt;br /&gt;
Hope you have understand the basic behind the validation plug-in. Now we are only one step away from the validation process. Lets check it out -&lt;br /&gt;
&lt;blockquote&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;$(document).ready(function () {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;$(&quot;#&lt;i style=&quot;color: red;&quot;&gt;&lt;b&gt;doit&lt;/b&gt;&lt;/i&gt;&quot;).validate();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;});&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/blockquote&gt;&amp;nbsp;Now we have to call the &lt;i style=&quot;color: red;&quot;&gt;&lt;b&gt;validate()&lt;/b&gt;&lt;/i&gt; method of the form. so we use the &lt;i style=&quot;color: red;&quot;&gt;&lt;b&gt;$(&quot;#doit&quot;)&lt;/b&gt;&lt;/i&gt; to select the whole form. And then call the&lt;i style=&quot;color: red;&quot;&gt;&lt;b&gt; validate()&lt;/b&gt;&lt;/i&gt; method to validate it.&lt;br /&gt;
Yes the validation is completed. Don&#39;t believe me? Why don&#39;t you just try it out.&lt;br /&gt;
&lt;br /&gt;
Lastly you can add customization in the CSS section to change the way the message appears.&lt;br /&gt;
&lt;blockquote&gt;&lt;span style=&quot;color: #274e13; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;style&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; label.error {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; color:#FF0000&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #274e13; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;/style&amp;gt;&lt;/span&gt;&lt;/blockquote&gt;Here is a snapshot of the validation process :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwEVxAEXWVChUpeNUpYMrKvjHRYG02eHFLMqbXhm47ezgB_unavroMBiTsTaHr2kjjiuXyi8Zt5hkSxYZ5hA4-uLjrU_r8gTYR3NgQmojbTm3bmYQPg3DFXxtAW7M0o-I1-Aa44bxGLTyE/s1600/img01.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;214&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwEVxAEXWVChUpeNUpYMrKvjHRYG02eHFLMqbXhm47ezgB_unavroMBiTsTaHr2kjjiuXyi8Zt5hkSxYZ5hA4-uLjrU_r8gTYR3NgQmojbTm3bmYQPg3DFXxtAW7M0o-I1-Aa44bxGLTyE/s320/img01.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;Update - &lt;a href=&quot;http://www.mediafire.com/download.php?ttzmtwjymt2&quot;&gt;Here&lt;/a&gt; is the source code.&lt;br /&gt;
&amp;nbsp;If you have any suggestion or question, please let me know.</content><link rel='replies' type='application/atom+xml' href='http://yourdigitaleffects.blogspot.com/feeds/558700914562263700/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourdigitaleffects.blogspot.com/2010/04/rapid-jquery-html-form-validation.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/558700914562263700'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/558700914562263700'/><link rel='alternate' type='text/html' href='http://yourdigitaleffects.blogspot.com/2010/04/rapid-jquery-html-form-validation.html' title='Rapid jQuery: HTML Form Validation'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09514196229867295024</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwEVxAEXWVChUpeNUpYMrKvjHRYG02eHFLMqbXhm47ezgB_unavroMBiTsTaHr2kjjiuXyi8Zt5hkSxYZ5hA4-uLjrU_r8gTYR3NgQmojbTm3bmYQPg3DFXxtAW7M0o-I1-Aa44bxGLTyE/s72-c/img01.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-364943231029974825.post-8784997526609414619</id><published>2010-04-05T21:20:00.000+07:00</published><updated>2011-02-27T14:46:54.600+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="form"/><category scheme="http://www.blogger.com/atom/ns#" term="form validation"/><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><title type='text'>Do it with jQuery: HTML Form validation - Source @ Bottom</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;This is my follow up on my &lt;b style=&quot;color: red;&quot;&gt;&lt;a href=&quot;http://yourdigitaleffects.blogspot.com/2010/04/code-n-learn-form-validation-javascript.html&quot;&gt;previous &lt;/a&gt;&lt;/b&gt;post on Form validation with javascript.&lt;br /&gt;
This post for those who want to try the form validation with jQuery.&lt;br /&gt;
&lt;br /&gt;
jQuery is a javascript library developed for rapid application development. I,e - One can write less code by using it, so the development of the application is accelerated.&lt;br /&gt;
&lt;br /&gt;
You can learn more about jQuery &lt;a href=&quot;http://jquery.com/&quot;&gt;&lt;b&gt;here&lt;/b&gt;&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
To get started we need -&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;HTML page which contains the form.&lt;/li&gt;
&lt;li&gt;jQuery Library&lt;/li&gt;
&lt;li&gt;Some jQuery codes.&lt;/li&gt;
&lt;/ol&gt;&lt;br /&gt;
After getting the jQuery libarary we have to add it to our HTML page. Scripts are generally added with in the &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;&amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;&lt;/span&gt;&lt;/b&gt; html tags.&lt;br /&gt;
&lt;blockquote&gt;&lt;span style=&quot;color: #38761d; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;head&amp;gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #38761d; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot; /&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #38761d; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;&lt;b style=&quot;color: red;&quot;&gt;jquery-1.3.2.min.js&lt;/b&gt;&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #38761d; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;link type=&quot;text/css&quot; href=&quot;style.css&quot; rel=&quot;stylesheet&quot; /&amp;gt;&lt;/span&gt;&lt;/blockquote&gt;As you can see that this&amp;nbsp;is done by using a &lt;i style=&quot;color: red;&quot;&gt;&lt;b&gt;&amp;lt;script&amp;gt;&lt;/b&gt;&lt;/i&gt; tag. We are gonna use the stylesheet (CSS) to decorate the messages. This will increase the user interactivity.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now&amp;nbsp;we need the&amp;nbsp;html form which has to be validated.&lt;br /&gt;
&lt;blockquote&gt;&lt;span style=&quot;color: #38761d; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;body&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #38761d; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;form action=&quot;submit.php&quot; method=&quot;post&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #38761d; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #38761d; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #38761d; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;First name: &amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;input type=&quot;text&quot; name=&quot;fname&quot; id=&quot;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;fname&lt;/span&gt;&lt;/b&gt;&quot; /&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #38761d; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;label id=&quot;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;s_fname&lt;/span&gt;&lt;/b&gt;&quot;&amp;gt;&amp;lt;/label&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #38761d; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #38761d; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;/table&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #38761d; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;/form&amp;gt;&lt;/span&gt;&lt;/blockquote&gt;We need the id field to get the component&#39;s handler so that we can manipulate it. Id provides a way to uniquely identify the component.&lt;br /&gt;
&lt;br /&gt;
We now write a little code to register jQuery events with callback functions. All these code goes inside the &lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;&amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;&lt;/b&gt;&lt;/span&gt; HTML tag.&lt;br /&gt;
&lt;blockquote style=&quot;color: #38761d; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; $(document).&lt;span style=&quot;color: red;&quot;&gt;ready&lt;/span&gt;( function() {&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;$(&quot;#fname&quot;).&lt;span style=&quot;color: red;&quot;&gt;blur&lt;/span&gt;(function () {&lt;/blockquote&gt;jQuery starts now. jQuery uses callback function to handle various event. One of the most import callback is the &lt;b style=&quot;color: red;&quot;&gt;$(document).ready( function () {} );&lt;/b&gt;. When the page loads completely this event is raised. So, in the process of handling we can register more callback function. As we are dealing with the textbox, so we are gonna register the callback function for &lt;b style=&quot;color: red;&quot;&gt;blur()&lt;/b&gt; event. When ever the text box loses focus this event is raised.&lt;br /&gt;
So, by registering callback method to it we can check the value of it and decide whether it is valid or not. We uses &lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;$(id) &lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;to get the component. Then we use the &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;blur(fn)&lt;/span&gt;&lt;/b&gt; event to register the callback method.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Now we get the value from the textbox and examine it.&lt;br /&gt;
&lt;blockquote style=&quot;color: #38761d; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;var value = $(&quot;#fname&quot;).val();&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;value = jQuery.trim(value);&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;$(&quot;#fname&quot;).val(value);&lt;/blockquote&gt;First line gets the value of the component by calling the &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;val()&lt;/span&gt;&lt;/b&gt; method. Then we use a jQuery utility function &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;jQuery.trim(str) &lt;/span&gt;&lt;/b&gt;to trim the beginning and trailing whitespaces from the input. Then by the third line we again set the new value back to the textbox by using the &lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;val(value)&lt;/span&gt;&lt;/b&gt; method of the component.&lt;br /&gt;
&lt;blockquote style=&quot;color: #38761d; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;if (value == &quot;&quot; || value == null) {&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;$(&quot;#s_fname&quot;).&lt;i&gt;&lt;b style=&quot;color: red;&quot;&gt;text&lt;/b&gt;&lt;/i&gt;(&quot;Please enter a name.&quot;);&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;$(&quot;#s_fname&quot;).&lt;i&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;removeClass&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;(&quot;valid&quot;);&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;$(&quot;#s_fname&quot;).&lt;i&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;addClass&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;(&quot;error&quot;);&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;$(&quot;#fname&quot;).removeClass(&quot;valid_back&quot;);&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;$(&quot;#fname&quot;).addClass(&quot;error_back&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;} else {&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;$(&quot;#s_fname&quot;).text(&quot;Ok&quot;);&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;$(&quot;#s_fname&quot;).addClass(&quot;valid&quot;);&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;$(&quot;#s_fname&quot;).removeClass(&quot;error&quot;);&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;$(&quot;#fname&quot;).removeClass(&quot;error&quot;);&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;$(&quot;#fname&quot;).addClass(&quot;valid_back&quot;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;});&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp; &amp;nbsp;});&lt;br /&gt;
&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;lt;/script&amp;gt;&lt;/blockquote&gt;We check the value for empty or null string. If the value of the textbox is either null or empty (&quot;&quot;) then the value is invalid and we notify the user by setting the background of the textbox to red. We also display a red text to notify the user about the error. This is done by using the &lt;i&gt;&lt;b style=&quot;color: red;&quot;&gt;text(str)&lt;/b&gt;&lt;/i&gt; method of the component.  &lt;b style=&quot;color: red;&quot;&gt;text(str)&lt;/b&gt; sets the text of a component. We use &lt;i style=&quot;color: red;&quot;&gt;&lt;b&gt;removeClass(class name)&lt;/b&gt;&lt;/i&gt; and &lt;i style=&quot;color: red;&quot;&gt;&lt;b&gt;addClass( class name )&lt;/b&gt;&lt;/i&gt; to remove and add the visual effect to the textbox defined in the CSS class. Here in the code &lt;i&gt;&lt;b style=&quot;color: red;&quot;&gt;&quot;valid&quot;&lt;/b&gt;&lt;/i&gt; and &lt;i style=&quot;color: red;&quot;&gt;&lt;b&gt;&quot;error&quot;&lt;/b&gt;&lt;/i&gt; are two CSS class. We use &lt;i style=&quot;color: red;&quot;&gt;&lt;b&gt;&quot;valid&quot;&lt;/b&gt;&lt;/i&gt; class to denote that the validation is successful and we use the &lt;i style=&quot;color: red;&quot;&gt;&lt;b&gt;&quot;error&quot;&lt;/b&gt;&lt;/i&gt; class to notify user that validation failed.&lt;br /&gt;
&lt;br /&gt;
We now need to code the &lt;i style=&quot;color: red;&quot;&gt;&lt;b&gt;style.css&lt;/b&gt;&lt;/i&gt; file. This file contains the CSS class which we have used.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;&lt;span style=&quot;color: #38761d; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;.error {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #38761d; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;color:#FF0000;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #38761d; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #38761d; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;.valid {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #38761d; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;color:#006600;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #38761d; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #38761d; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;.error_back {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #38761d; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;background-color:#FF0000;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #38761d; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #38761d; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;.valid_back {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #38761d; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;background-color:#006600;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #38761d; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;}&lt;/span&gt;&lt;/blockquote&gt;&amp;nbsp;Every class in the CSS must have a &#39;dot&#39; (.) before them. In the class definition, we set the color value to &lt;i style=&quot;color: red;&quot;&gt;&lt;b&gt;red&lt;/b&gt;&lt;/i&gt; in the &lt;i style=&quot;color: red;&quot;&gt;&lt;b&gt;error &lt;/b&gt;&lt;/i&gt;class and we set the color value to &lt;i style=&quot;color: #38761d;&quot;&gt;&lt;b&gt;greenish &lt;/b&gt;&lt;/i&gt;in the &lt;i style=&quot;color: #38761d;&quot;&gt;&lt;b&gt;valid &lt;/b&gt;&lt;/i&gt;class. These classes are used to show message in red or green color to notify the user. We assign then depending upon the validation of the textbox.&lt;br /&gt;
&lt;br /&gt;
The next to classes are used to change the background-color of the textbox. If the validation succeed then we set it to greenish other wise we set it to red to indicate that validation has failed.&lt;br /&gt;
&lt;br /&gt;
We are all done. This post only shows how to use the jQuery functions for form validation. For a basic form validation you can see the &lt;a href=&quot;http://yourdigitaleffects.blogspot.com/2010/04/code-n-learn-form-validation-javascript.html&quot;&gt;previous&lt;/a&gt; post. Here is a snapshot of how it looks -&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhT9r6Usp9_dro4hNSqh8tHNJUXYvvHE3GKCZWw5O6Y6gfo5BKb6FGBWd9rdd-IbmhcQgMAL6dzI4zt-sz2lThwKrxVvcq9wGisamyTFo0McQwJ-5x28PMrzx1-7-jN3071pAwPbmLWoKTT/s1600/img.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;236&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhT9r6Usp9_dro4hNSqh8tHNJUXYvvHE3GKCZWw5O6Y6gfo5BKb6FGBWd9rdd-IbmhcQgMAL6dzI4zt-sz2lThwKrxVvcq9wGisamyTFo0McQwJ-5x28PMrzx1-7-jN3071pAwPbmLWoKTT/s400/img.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;Update - &lt;a href=&quot;http://www.mediafire.com/download.php?tjymmxzowy0&quot;&gt;Here&lt;/a&gt; is the source code. &lt;br /&gt;
If you have any question or suggestion, please let me know.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://yourdigitaleffects.blogspot.com/feeds/8784997526609414619/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourdigitaleffects.blogspot.com/2010/04/do-it-with-jquery-html-form-validation.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/8784997526609414619'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/8784997526609414619'/><link rel='alternate' type='text/html' href='http://yourdigitaleffects.blogspot.com/2010/04/do-it-with-jquery-html-form-validation.html' title='Do it with jQuery: HTML Form validation - Source @ Bottom'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09514196229867295024</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhT9r6Usp9_dro4hNSqh8tHNJUXYvvHE3GKCZWw5O6Y6gfo5BKb6FGBWd9rdd-IbmhcQgMAL6dzI4zt-sz2lThwKrxVvcq9wGisamyTFo0McQwJ-5x28PMrzx1-7-jN3071pAwPbmLWoKTT/s72-c/img.png" height="72" width="72"/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-364943231029974825.post-1504968120549217052</id><published>2010-04-03T17:25:00.000+07:00</published><updated>2010-04-03T17:25:16.872+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="form"/><category scheme="http://www.blogger.com/atom/ns#" term="form validation"/><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="js"/><category scheme="http://www.blogger.com/atom/ns#" term="validation"/><title type='text'>Code n Learn: Form Validation Javascript</title><content type='html'>We all know that it is the programmer&#39;s duty to validate the form against invalid inputs. This checking or validation can be down in two ways. One is Client side, other is Server side.&lt;br /&gt;
&lt;br /&gt;
We will have a quick review on how to validate form in client side using javascript.&lt;br /&gt;
&lt;br /&gt;
Let us consider we have a form with first name, last name, email address and comment.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote style=&quot;color: #274e13; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;lt;form action=&quot;submit.php&quot; method=&quot;post&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; First name: &amp;lt;input type=&quot;text&quot; id=&quot;fname&quot; value=&quot;&quot; name=&quot;fname&quot; /&amp;gt;&amp;lt;br /&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Second name:&amp;lt;input type=&quot;text&quot; id=&quot;lname&quot; value=&quot;&quot; name=&quot;lname&quot; /&amp;gt;&amp;lt;br /&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Email: &amp;lt;input type=&quot;text&quot; id=&quot;email&quot; value=&quot;&quot; name=&quot;email&quot; /&amp;gt;&amp;lt;br /&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Comment: &amp;lt;input type=&quot;text&quot; id=&quot;com&quot; value=&quot;&quot; name=&quot;com&quot; /&amp;gt;&amp;lt;br /&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; &amp;lt;input type=&quot;submit&quot; value=&quot;Submit&quot; name=&quot;submit&quot; onclick=&quot;return validate()&quot; /&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&amp;lt;/form&amp;gt; &lt;/span&gt;&lt;/blockquote&gt;Ok, you may wonder why we add the &lt;i style=&quot;color: red;&quot;&gt;&lt;b&gt;id&lt;/b&gt;&lt;/i&gt; to all of the input type? Ids must be unique and we can search a component by its Id. So, we need to have an Id for each field which we will validate.&lt;br /&gt;
On the submit button we added &lt;i style=&quot;color: red;&quot;&gt;&lt;b&gt;onclick=&quot;return validate()&quot;&lt;/b&gt;&lt;/i&gt;. Here validate() is the form validation function. Then why we use return in front of it? Its because if the function return false then the form wont be submitted, It will be submitted once it receives true from validate function.&lt;br /&gt;
&lt;br /&gt;
Now we add some basic style using CSS (Cascading Style Sheets). We only need two classes. One when there is a validation failed, other one is when validation is successful.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote style=&quot;color: #274e13; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;.error {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; background-color:rgb(255,0,0); /* red color */&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
.valid {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; background-color:rgb(0,255,0);&amp;nbsp; /* green color */&lt;br /&gt;
}&lt;/blockquote&gt;&amp;nbsp;We assign the &lt;i&gt;&lt;b&gt;error &lt;/b&gt;&lt;/i&gt;class when validation fails, thus making the component go red indicating an error was detected. You can run you imagination wild when customizing the class. We assign the other when validation success.&lt;br /&gt;
&lt;br /&gt;
Now we only require the validation function to validate the form.&lt;br /&gt;
We need to get the handler of the First name &amp;amp; Last name text box. This can be done by searching the element by &lt;i style=&quot;color: red;&quot;&gt;&lt;b&gt;document.getElementById() &lt;/b&gt;&lt;/i&gt;function. Then we check the value entered by the user using the &lt;i style=&quot;color: red;&quot;&gt;&lt;b&gt;value&lt;/b&gt;&lt;/i&gt; property of that component.&lt;br /&gt;
&lt;blockquote style=&quot;color: #274e13; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;function validate_component(name) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp; var comp = document.getElementById(name);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (comp.value == null || comp.value == &#39;&#39; ) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; comp.className = &#39;error&#39;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* assign the css class to this component to indicate validation failure */&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return false;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } else {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fname.className = &#39;valid&#39;;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* valid */&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return true; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
} &lt;/blockquote&gt;&amp;nbsp;We have setup the basic validation method. With this method we can validate first name, last name and comment component. We need to consider the email validation case. Cases to be considered when validating an email are -&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Email must have one &#39;@&#39; [at] and at least one &#39;.&#39; [dot]&amp;nbsp; ( &lt;span style=&quot;color: #274e13;&quot;&gt;xyz@yyy.ccc&lt;/span&gt; )&lt;/li&gt;
&lt;li&gt;&#39;@&#39; [at] cannot appear as first element&amp;nbsp; ( &lt;span style=&quot;color: red;&quot;&gt;@xyzyyy.ccc&lt;/span&gt; )&lt;/li&gt;
&lt;li&gt;&#39;.&#39; [dot] cannot appear as last element&amp;nbsp; ( &lt;span style=&quot;color: red;&quot;&gt;xyz@yyyccc.&lt;/span&gt; )&lt;/li&gt;
&lt;li&gt;Last &#39;.&#39; [dot] must be after &#39;@&#39; [at] but not immediate after ( &lt;span style=&quot;color: #274e13;&quot;&gt;x.y.z@yyy.ccc&lt;/span&gt; |&lt;span style=&quot;color: red;&quot;&gt; x.y.z@.yyyccc&lt;/span&gt; )&lt;/li&gt;
&lt;li&gt;There can be exactly one &#39;@&#39; [at]&lt;/li&gt;
&lt;/ol&gt;&amp;nbsp;Now the validation&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote style=&quot;color: #274e13; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;function validate_email() {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var error_occured = false;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var e = document.getElementById(&#39;email&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; var email = e.value; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; error_occured = !validate_component(&#39;email&#39;);&amp;nbsp;&amp;nbsp; /* check for basic validation */&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var at_index = email.indexOf(&#39;@&#39;);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /* returns the index of @&amp;nbsp; or -1 indication there was none */&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var at_last_index = email.lastIndexOf(&#39;@&#39;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var dot_index = email.lastIndexOf(&#39;.&#39;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if ( at_index == 0 || at_index == -1 || at_index != at_last_index || dot_index &amp;lt;= at_index || dot_index - at_index == 1 || dot_index == -1 || email.length - dot_index == 1 ) {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; error_occured = true;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; e.className = &#39;error&#39;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; } else {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; e.className = &#39;valid&#39;;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; }&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return !error_occured;&amp;nbsp; &lt;br /&gt;
} &lt;/blockquote&gt;&amp;nbsp;What does what :&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;&lt;span style=&quot;color: red; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;at_index == 0&lt;/span&gt; [ &#39;@&#39; was the first element so invalid ]&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: red; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;at_index == -1&lt;/span&gt; [ &#39;@&#39; was not found ! ]&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: red; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;at_index != at_last_index&lt;/span&gt; [ There were more than one &#39;@&#39; (invalid) because first @ and last @ have different index number ]&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: red; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;dot_index &amp;lt;= at_index&lt;/span&gt; [ &#39;.&#39; was infornt of &#39;@&#39; (invalid) ]&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: red; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;dot_index - at_index == 1&lt;/span&gt; [ &#39;.&#39; was immediately after &#39;@&#39; (invalid) ]&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: red; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;dot_index == -1&lt;/span&gt; [ &#39;.&#39; not found ! ]&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;color: red; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;email.length - dot_index == 1&lt;/span&gt; [ &#39;.&#39; is the last element (invalid) ]&lt;/li&gt;
&lt;/ol&gt;&lt;br /&gt;
Now we are ready to integrate all of this to one function.&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote style=&quot;color: #274e13; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;function validate() {&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; /* evaluate values */ &lt;br /&gt;
&amp;nbsp; &amp;nbsp; var ev_f_name = validate_component(&#39;fname&#39;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var ev_l_name = validate_component(&#39;lname&#39;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var ev_com = validate_component(&#39;com&#39;);&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; var ev_email = validate_email();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if ( ev_f_name &amp;amp;&amp;amp; ev_l_name &amp;amp;&amp;amp; ev_com &amp;amp;&amp;amp; ev_email ) {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return true;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; } else {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; alert(&#39;Please fill the form completely and correctly&#39;); &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return false;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;
} &lt;/blockquote&gt;Here you go. The validation is complete. Hope you find it useful. If any suggestion or question please leave a comment.</content><link rel='replies' type='application/atom+xml' href='http://yourdigitaleffects.blogspot.com/feeds/1504968120549217052/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourdigitaleffects.blogspot.com/2010/04/code-n-learn-form-validation-javascript.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/1504968120549217052'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/1504968120549217052'/><link rel='alternate' type='text/html' href='http://yourdigitaleffects.blogspot.com/2010/04/code-n-learn-form-validation-javascript.html' title='Code n Learn: Form Validation Javascript'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09514196229867295024</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-364943231029974825.post-9069742708354540423</id><published>2010-03-31T00:47:00.000+07:00</published><updated>2010-03-31T00:55:01.368+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="lan"/><category scheme="http://www.blogger.com/atom/ns#" term="multiple"/><category scheme="http://www.blogger.com/atom/ns#" term="nic"/><category scheme="http://www.blogger.com/atom/ns#" term="win 7"/><title type='text'>Manage Multiple Network Interface Card in Win 7</title><content type='html'>You can change the order of your network cards in win 7. This can be done very easily. Here how it is done -&lt;br /&gt;
1. Go to &lt;i style=&quot;color: red;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;Control Panel-&amp;gt;Network and Internet-&amp;gt;Network and Sharing Center.&lt;/span&gt;&lt;/b&gt;&lt;/i&gt; Now click the &lt;i style=&quot;font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;b style=&quot;color: red;&quot;&gt;Change adapter settings&lt;/b&gt;&lt;/i&gt; from left side of the window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMUu-i0i3cPHtNtnBixCcbLv1_tT4f2EK8hI8iZzBLK4JzU9VGCIabrDZ73TnFzwdXKKIbvwYmhw7dYu5QU5MLuswM7OSjkkArh1hdUZsdjf7Ka24TSNlTVxNk-s9zyp9L9v5XhvZwbMaw/s1600/multi_01.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;101&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMUu-i0i3cPHtNtnBixCcbLv1_tT4f2EK8hI8iZzBLK4JzU9VGCIabrDZ73TnFzwdXKKIbvwYmhw7dYu5QU5MLuswM7OSjkkArh1hdUZsdjf7Ka24TSNlTVxNk-s9zyp9L9v5XhvZwbMaw/s400/multi_01.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;br /&gt;
2. You will see the connections along with your network cards. Hold down the &lt;i style=&quot;color: red; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;b&gt;Alt&lt;/b&gt;&lt;/i&gt; key. This will bring up the menu bar. Go to &lt;i style=&quot;color: red; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;b&gt;Advanced-&amp;gt;Advanced Settings&lt;/b&gt;&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiokBHHiIGKQUIgzlgsMnM6dQ_wTGPD3Kg7um6z_uw37lgKEypFcAjnRAoYlSV8ZKAjYzLXtT3ASlHQ2CN61FIr6IoblfNZIadx58J-zTQ-PCUUAtf3G_A0EAVy63kG9Ov09FVLI53eKSey/s1600/multi_02.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;151&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiokBHHiIGKQUIgzlgsMnM6dQ_wTGPD3Kg7um6z_uw37lgKEypFcAjnRAoYlSV8ZKAjYzLXtT3ASlHQ2CN61FIr6IoblfNZIadx58J-zTQ-PCUUAtf3G_A0EAVy63kG9Ov09FVLI53eKSey/s400/multi_02.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
3. You will see your network showing in a list. There you can move up and down. Moving up an interface will make it more preferable by the system than the interface listed below it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKIsJzCgd6kaQ7B5hnCuhi3EL1kXTYvHONNjbmA00Svnt5xMggBUQvFCdFpZKBR1xG2dTIOwOaoUO6BgJMyJ3UJrIc0e5-MW-ISi7ZAVSoI8dKcSN_RjDW6GFDuiD7YUFRQZypGw-e5eMW/s1600/multi_03.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKIsJzCgd6kaQ7B5hnCuhi3EL1kXTYvHONNjbmA00Svnt5xMggBUQvFCdFpZKBR1xG2dTIOwOaoUO6BgJMyJ3UJrIc0e5-MW-ISi7ZAVSoI8dKcSN_RjDW6GFDuiD7YUFRQZypGw-e5eMW/s320/multi_03.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Hope this article is useful for you. If you have any suggestion or question please leave a comment.</content><link rel='replies' type='application/atom+xml' href='http://yourdigitaleffects.blogspot.com/feeds/9069742708354540423/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourdigitaleffects.blogspot.com/2010/03/mange-multiple-network-interface-card.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/9069742708354540423'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/9069742708354540423'/><link rel='alternate' type='text/html' href='http://yourdigitaleffects.blogspot.com/2010/03/mange-multiple-network-interface-card.html' title='Manage Multiple Network Interface Card in Win 7'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09514196229867295024</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMUu-i0i3cPHtNtnBixCcbLv1_tT4f2EK8hI8iZzBLK4JzU9VGCIabrDZ73TnFzwdXKKIbvwYmhw7dYu5QU5MLuswM7OSjkkArh1hdUZsdjf7Ka24TSNlTVxNk-s9zyp9L9v5XhvZwbMaw/s72-c/multi_01.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-364943231029974825.post-5343354062543502082</id><published>2010-03-30T04:58:00.000+07:00</published><updated>2010-03-30T04:58:15.570+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="message box"/><category scheme="http://www.blogger.com/atom/ns#" term="modal message box"/><title type='text'>CooL &amp; Sexy yet Easy Message Box using jQuery</title><content type='html'>With the advent of Web 2.0 the website now gotten more interactive. Now a days website are elegant in looks. And it really hurts (hard works) to create a nice interactive website. jQuery grants us the wish -&lt;i&gt;&lt;b&gt; &quot;write less do more&quot;&lt;/b&gt;&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
jQuery is very easy to learn and implement. Today I am gonna show you how to add a jQuery UI component easily to your website.&lt;br /&gt;
&lt;br /&gt;
First of all let us first see what do we need. We need the &lt;a href=&quot;http://jqueryui.com/&quot;&gt;jQuery UI&lt;/a&gt; component.&lt;br /&gt;
Secondly, you need an editor to edit and write your website.&lt;br /&gt;
Lastly, you need some hard works.&lt;br /&gt;
&lt;br /&gt;
After downloading first extract the zip file and go to the following directory -&lt;br /&gt;
&lt;i style=&quot;color: red; font-family: Arial,Helvetica,sans-serif;&quot;&gt;&lt;b&gt;jquery-ui-1.7.2.custom\development-bundle\ui&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;
Now as we are going to work with only dialog (jQuery know them as dialog) so we only need some part of the total ui system. These are -&lt;br /&gt;
&lt;ul style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;li&gt;&lt;b&gt;ui.core.js&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;ui.draggable.js&lt;/b&gt;&lt;/li&gt;
&lt;li&gt; &lt;b&gt;ui.resizable.js&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;b&gt;ui.dialog.js&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;Why do we need these? Well they are pretty much self explained. We need the core by default. We are making our message box draggable and resizable. And lastly we need the specific dialog component.&lt;br /&gt;
&lt;br /&gt;
We also need to add the&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt; &lt;/span&gt;&lt;i style=&quot;color: red; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;b&gt;jquery-1.3.2.min.js&lt;/b&gt;&lt;/i&gt; and &lt;i&gt;&lt;b&gt;&lt;span style=&quot;color: red; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;jquery.bgiframe.js&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;color: #666666; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; text-align: left;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;js/jquery-1.3.2.min.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;script type=&quot;text/javascript&quot; src=&quot;js/ui.core.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;script type=&quot;text/javascript&quot; src=&quot;js/ui.draggable.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;script type=&quot;text/javascript&quot; src=&quot;js/ui.resizable.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;script type=&quot;text/javascript&quot; src=&quot;js/ui.dialog.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;script type=&quot;text/javascript&quot; src=&quot;js/jquery.bgiframe.js&quot;&amp;gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;span style=&quot;color: #666666; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace; font-size: small;&quot;&gt;&amp;lt;/script&amp;gt; &lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;text-align: left;&quot;&gt;Now we are going to use built in CSS style for the dialog box.&lt;/div&gt;&lt;span style=&quot;color: #444444; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;link type=&quot;text/css&quot; href=&quot;ui.all.css&quot; rel=&quot;stylesheet&quot; /&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: black; font-family: inherit;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;These are the basic requirements to use the dialog box. Now that we are ready, lets roll.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: black; font-family: inherit;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;The message box looks like this -&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieWaIMSuIfH4bCRn83MYf1xMUZ8fFJVSReRMUAhxVroBotLxRR-m7qfZ1tgZnnhJW1RirM9tWLonFQyZahFzwfpeDxYpUmibvvJJe91xUmC0gCRXj6uR78-oASTPnNRibuNaNZ7nTpStqJ/s1600/messagebox.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieWaIMSuIfH4bCRn83MYf1xMUZ8fFJVSReRMUAhxVroBotLxRR-m7qfZ1tgZnnhJW1RirM9tWLonFQyZahFzwfpeDxYpUmibvvJJe91xUmC0gCRXj6uR78-oASTPnNRibuNaNZ7nTpStqJ/s320/messagebox.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style=&quot;color: #444444; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: black; font-family: inherit;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Actually we create the message box using the html tag &lt;i style=&quot;color: red;&quot;&gt;&lt;b&gt;&amp;lt;div&amp;gt;&lt;/b&gt;&lt;/i&gt; . An example -&lt;br /&gt;
&lt;div style=&quot;color: #444444; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;div id=&quot;dialog&quot; title=&quot;here goes your title&quot; style=&quot;visibility:hidden&quot;&amp;gt;&lt;/div&gt;&lt;div style=&quot;color: #444444; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;p&amp;gt;here goes your message&amp;lt;/p&amp;gt;&lt;/div&gt;&lt;span style=&quot;color: #444444; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;/div&amp;gt; &lt;/span&gt;&lt;br /&gt;
This div is hidden so normally we cant see it when the page loads. Now our last task is to assign the jQuery event such that whenever a page loads the message pops up automatically.&lt;br /&gt;
&lt;br /&gt;
This is done like this -&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;$(function() {&lt;/span&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;span style=&quot;color: #444444; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;$(&quot;#dialog&quot;).css(&quot;visibility:visible&quot;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;$(&quot;#dialog&quot;).dialog({&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;bgiframe: true,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;height: 600,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;width: 1000,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;modal: true,&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;buttons: {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&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;Ok: function() {&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&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;$(this).dialog(&#39;close&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;});&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;});&lt;/span&gt;&lt;span style=&quot;color: #444444; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: black; font-family: inherit;&quot;&gt;The first line is the &lt;i style=&quot;color: red;&quot;&gt;&lt;b&gt;$(function () {}); &lt;/b&gt;&lt;/i&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;When the page loads this function is called. So, all other code must reside with it.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: black; font-family: inherit;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;the second line contains &lt;i style=&quot;color: red;&quot;&gt;&lt;b&gt;$(&quot;#dialog&quot;).css(&quot;visibility:visible&quot;); &lt;/b&gt;&lt;/i&gt;&lt;span style=&quot;color: black;&quot;&gt;The #dialog finds the element whose id is dialog (that is of course our message div we have created earlier). We now sets the CSS value to visible because now we want the user to see the message box.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: black; font-family: inherit;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;The next line creates the dialog box along with height, width and buttons. If you want the message box to be modal (which is most of the cases is) we have to set it to true.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: black; font-family: inherit;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Next step -&amp;nbsp; just joking. All done. Just refresh your webpage. Amazing, isn&#39;t it?&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: #444444; font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;color: black; font-family: inherit;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;If any question or suggestion please leave a comment. Thanks.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://yourdigitaleffects.blogspot.com/feeds/5343354062543502082/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourdigitaleffects.blogspot.com/2010/03/cool-sexy-yet-easy-message-box-using.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/5343354062543502082'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/5343354062543502082'/><link rel='alternate' type='text/html' href='http://yourdigitaleffects.blogspot.com/2010/03/cool-sexy-yet-easy-message-box-using.html' title='CooL &amp; Sexy yet Easy Message Box using jQuery'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09514196229867295024</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieWaIMSuIfH4bCRn83MYf1xMUZ8fFJVSReRMUAhxVroBotLxRR-m7qfZ1tgZnnhJW1RirM9tWLonFQyZahFzwfpeDxYpUmibvvJJe91xUmC0gCRXj6uR78-oASTPnNRibuNaNZ7nTpStqJ/s72-c/messagebox.png" height="72" width="72"/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-364943231029974825.post-2018807803381567622</id><published>2010-03-29T23:47:00.000+07:00</published><updated>2010-03-29T23:48:15.995+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term=".flv"/><category scheme="http://www.blogger.com/atom/ns#" term="downloader"/><category scheme="http://www.blogger.com/atom/ns#" term="flash video"/><category scheme="http://www.blogger.com/atom/ns#" term="flv"/><category scheme="http://www.blogger.com/atom/ns#" term="you tube downloader"/><title type='text'>Your Ultimate You Tube &amp; Flash video (.flv) downloader</title><content type='html'>You liked someones video post at You Tube, now you want to download it. Alas! You Tube does not allow any direct link for downloading the content !!&lt;br /&gt;
Don&#39;t worry all you need is a set of tools.&lt;br /&gt;
&lt;br /&gt;
The first tool you need is a You-Tube video grabber add-on. There are many add-on available to choose from. One of them is -&lt;a href=&quot;https://addons.mozilla.org/en-US/firefox/addon/75489&quot;&gt;Keep Tube&lt;/a&gt;&lt;br /&gt;
It allows you to download the flash video file (.flv) from you-tube like websites to your computer. Download and install it.&lt;br /&gt;
&lt;br /&gt;
The next needed tool is Flash Got. It is a very popular add-on. It allows to crawl the whole website and download all the links and files from that website. It can also redirect download to your favorite download manager. Here you can find &lt;a href=&quot;https://addons.mozilla.org/en-US/firefox/addon/220&quot;&gt;Flash Got&lt;/a&gt;.&lt;br /&gt;
https://addons.mozilla.org/en-US/firefox/addon/220&lt;br /&gt;
&lt;br /&gt;
Third step requires the configuration of the flash got add-on. Here how it is done -&lt;br /&gt;
First open the flash got option from &lt;b style=&quot;color: red;&quot;&gt;&lt;i&gt;Tools-&amp;gt;Flash Got-&amp;gt; More Options&lt;/i&gt;&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtp0vYhLshB2FccyqEendQctLc6vrHDlE2a9LWkvSQA03kTBoOg1Kso1ET66iDYX20rsHZuGLKt9VZQW6WFwLgjcDTFBYB7XyIIHCb_u1Cyh6FXzuWvmAI7BwdITPqAVf5rHJVy-V47POk/s1600/flash_got_opt1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;167&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtp0vYhLshB2FccyqEendQctLc6vrHDlE2a9LWkvSQA03kTBoOg1Kso1ET66iDYX20rsHZuGLKt9VZQW6WFwLgjcDTFBYB7XyIIHCb_u1Cyh6FXzuWvmAI7BwdITPqAVf5rHJVy-V47POk/s400/flash_got_opt1.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Now in the General Tab check the Download Manager Option and select your favorite download manager.&lt;br /&gt;
Also check the option &lt;i&gt;&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;Alt+Click = FlashGot&lt;/span&gt;&lt;/b&gt;&lt;/i&gt; if you like more control over your downloads.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXPQi_IyTPofqCX27VE2tRr8ksTLHBjYcQ-aw4vYWR3XpJK-_oT3FPozle6bTNldbM9XgSDJPuqbvr8EuxhyphenhyphendiBqhClv6j2fyQ-5ft2mjAx0TY1w6loIRvebEW90hqfVJ5swNVRgztPbbq/s1600/flash_got_opt2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgXPQi_IyTPofqCX27VE2tRr8ksTLHBjYcQ-aw4vYWR3XpJK-_oT3FPozle6bTNldbM9XgSDJPuqbvr8EuxhyphenhyphendiBqhClv6j2fyQ-5ft2mjAx0TY1w6loIRvebEW90hqfVJ5swNVRgztPbbq/s320/flash_got_opt2.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
Now you are all set to download .flv files from any site!&lt;br /&gt;
Lets see how it is done. Find any you tube video which you want to download.&lt;br /&gt;
Check the lower left side of your browser it should be&lt;span style=&quot;color: lime;&quot;&gt; &lt;/span&gt;&lt;b style=&quot;color: lime;&quot;&gt;dark-green&lt;/b&gt; other than &lt;b style=&quot;color: #93c47d;&quot;&gt;faint-green&lt;/b&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSZhGXJOloHokh9_jk52psjaAvnbjKFS3GC9nZWk6QwESr47bwyRtt0zk4-7s4PBAbJ77W6UoZtTN9jVUltM23fKn6S_MU-dJrIyppXmYrh8KXGBbhnuubQ1uUklpO2h1YRRGfkAtuJ5zz/s1600/mini_feed.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;188&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSZhGXJOloHokh9_jk52psjaAvnbjKFS3GC9nZWk6QwESr47bwyRtt0zk4-7s4PBAbJ77W6UoZtTN9jVUltM23fKn6S_MU-dJrIyppXmYrh8KXGBbhnuubQ1uUklpO2h1YRRGfkAtuJ5zz/s320/mini_feed.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
This will pass the download link of the video file to your favorite download manager.&lt;br /&gt;
You can also download the video file by clicking here -&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSw4FTFhqQCFTZ4ziu9_xTgNo6mBmf7BkZHrTTYrhy5T0-D6Nr_baPrQSkJTprM56IvniVV3NjBGZZ_gdeTr8nkZZHNoFGPA5wTVC-JmiV49Vqu1Y2RHaIED8LXfLNQGzJDjKYwUUGNTQH/s1600/mini_feed2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;201&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjSw4FTFhqQCFTZ4ziu9_xTgNo6mBmf7BkZHrTTYrhy5T0-D6Nr_baPrQSkJTprM56IvniVV3NjBGZZ_gdeTr8nkZZHNoFGPA5wTVC-JmiV49Vqu1Y2RHaIED8LXfLNQGzJDjKYwUUGNTQH/s320/mini_feed2.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;/div&gt;Hope this blog is useful to you. If you liked the blog or any suggestion please leave a comment. See you soon.</content><link rel='replies' type='application/atom+xml' href='http://yourdigitaleffects.blogspot.com/feeds/2018807803381567622/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourdigitaleffects.blogspot.com/2010/03/your-ultimate-you-tube-flash-video-flv.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/2018807803381567622'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/2018807803381567622'/><link rel='alternate' type='text/html' href='http://yourdigitaleffects.blogspot.com/2010/03/your-ultimate-you-tube-flash-video-flv.html' title='Your Ultimate You Tube &amp; Flash video (.flv) downloader'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09514196229867295024</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtp0vYhLshB2FccyqEendQctLc6vrHDlE2a9LWkvSQA03kTBoOg1Kso1ET66iDYX20rsHZuGLKt9VZQW6WFwLgjcDTFBYB7XyIIHCb_u1Cyh6FXzuWvmAI7BwdITPqAVf5rHJVy-V47POk/s72-c/flash_got_opt1.jpg" height="72" width="72"/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-364943231029974825.post-2812639224092666520</id><published>2009-12-19T03:51:00.000+07:00</published><updated>2009-12-19T03:56:33.856+07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="algorithm"/><category scheme="http://www.blogger.com/atom/ns#" term="c#"/><category scheme="http://www.blogger.com/atom/ns#" term="code"/><category scheme="http://www.blogger.com/atom/ns#" term="image"/><category scheme="http://www.blogger.com/atom/ns#" term="java"/><category scheme="http://www.blogger.com/atom/ns#" term="resize"/><title type='text'>Simple Image Resizing Code ...</title><content type='html'>Some times you need to quickly resize your image to a different dimension. you may need to resize it to a smaller version (saving bandwidth, computation time etc) or need to scale it to a larger version (displaying).&lt;br /&gt;
&lt;br /&gt;
you can use the following code to resize your image as per your requirement.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;LANGUAGE: C#/JAVA. Can also be easily convert to C++ and other languages.&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;public static int[] rescaleRGBArray(int[] rgb, int oldWidth, int oldHeight, int newWidth, int newHeight) {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; int out[] = new int[newWidth*newHeight];&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (int yy = 0; yy &amp;lt; newHeight; yy++) {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; int dy = yy * oldHeight / newHeight;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for (int xx = 0; xx &amp;lt; newWidth; xx++) {&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; int dx = xx * oldWidth / newWidth;&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; out[(newWidth*yy)+xx]=rgb[(oldWidth*dy)+dx];&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/span&gt;&lt;br style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot; /&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&amp;nbsp; return out;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Hope this help you in your work.</content><link rel='replies' type='application/atom+xml' href='http://yourdigitaleffects.blogspot.com/feeds/2812639224092666520/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://yourdigitaleffects.blogspot.com/2009/12/simple-image-resizing-code.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/2812639224092666520'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/364943231029974825/posts/default/2812639224092666520'/><link rel='alternate' type='text/html' href='http://yourdigitaleffects.blogspot.com/2009/12/simple-image-resizing-code.html' title='Simple Image Resizing Code ...'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/09514196229867295024</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>