<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2127794245010916172</id><updated>2012-02-09T18:25:56.404+02:00</updated><category term='Ruby challenge 2010'/><category term='Unix'/><category term='Vista'/><category term='Twitter'/><category term='courses'/><category term='MVC'/><category term='F# 2.0'/><category term='Podcasts'/><category term='Bug'/><category term='Symfony2'/><category term='Bookmarklets'/><category term='application'/><category term='XAMPP'/><category term='Visual Studio 2010'/><category term='Mercurial'/><category term='JQuery'/><category term='Secure'/><category term='Git'/><category term='Thumbnails'/><category term='MVC Madness'/><category term='FarmVille'/><category term='IhateJava'/><category term='Laptop'/><category term='PetShelter'/><category term='PlayAttend'/><category term='Udev&apos;itRight'/><category term='Icons'/><category term='Windows 7'/><category term='NUnit'/><category term='Heroku'/><category term='QandA'/><category term='Microsoft Office'/><category term='Evernote'/><category term='org.hibernate.MappingException: Unknown entity'/><category term='Code4Food'/><category term='Rails'/><category term='Pik'/><category term='Ninite'/><category term='PlayFramework'/><category term='Tips'/><category term='CSV'/><category term='FileSystemWatcher'/><category term='NetBeans'/><category term='Java'/><category term='Bytes.com'/><category term='ASP.NET MVC 3'/><category term='Gems'/><category term='Delicious'/><category term='C#'/><category term='PHP'/><category term='Tomcat'/><category term='Bing'/><category term='Google Chrome'/><category term='Agora'/><category term='Xslt'/><category term='Ruby'/><category term='.NET 4.0'/><category term='Linux'/><category term='ASP.NET MVC 2.0'/><category term='Scrum'/><category term='Tools'/><category term='Udevi'/><category term='jquery-rails'/><category term='IronRuby'/><category term='Text editor'/><category term='Video Players'/><category term='Yahoo Messenger'/><title type='text'>Udevi</title><subtitle type='html'>This is the blog of the founder of the Udevi community. Here we'll talk about how to develop a big piece of software or a really small project, we'll have discussions with some great technologists in different domains: Java, .NET, Scala, and others as well. Follow the podcasts and the entries on the blog to find out some more stuff.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://udevi-community.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://udevi-community.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Timur</name><uri>http://www.blogger.com/profile/14594716207428319651</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/_BWELgx6N3yw/S49Bi5bOhxI/AAAAAAAAAcA/Xf12ZX1FEc0/S220/Timur_face.png'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>40</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2127794245010916172.post-6554593652597487100</id><published>2012-01-25T17:40:00.000+02:00</published><updated>2012-01-26T12:12:35.623+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Git'/><category scheme='http://www.blogger.com/atom/ns#' term='Bug'/><category scheme='http://www.blogger.com/atom/ns#' term='NetBeans'/><title type='text'>Git and NetBeans 7.1 Problem: Everything in the project appears modified, but is not</title><content type='html'>&lt;p&gt;Hi,&lt;/p&gt;  &lt;p&gt;Recently I started developing a new Symfony2 project on Windows following the tutorial on &lt;a href="http://tutorial.symblog.co.uk"&gt;http://tutorial.symblog.co.uk&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;I like to use Git in combination with &lt;a href="http://bitbucket.org" target="_blank"&gt;BitBucket.org&lt;/a&gt;. I used Git integrated in NetBeans in combination with msysGit and recently found a very strange bug. Everything in NetBeans appeared as modified but actually wasn’t. Very strange I thought, and created an issue on NetBeans bugzilla, than I found out that it is a duplicate of the other issue &lt;a href="http://netbeans.org/bugzilla/show_bug.cgi?id=198451"&gt;http://netbeans.org/bugzilla/show_bug.cgi?id=198451&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;It appeared to be a problem related to line endings in different operating systems. Though msysGit is capable of ignoring this differences, it seems to be that JGit, the tool on which integration with Git is made in NetBeans, doesn’t. So now what should we do to make it work is to add the line &lt;/p&gt;    &lt;pre style="max-width: 600px" class="brush: plain;"&gt;[core] autocrlf = false&lt;/pre&gt;

&lt;p&gt;to project’s .git/config file. But that’s not enough, also we would need to follow the instructions in &lt;a href="http://help.github.com/line-endings/"&gt;http://help.github.com/line-endings/&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;So for Windows I needed to run this script in msysGit :&lt;/p&gt;

&lt;pre class="brush: plain;"&gt;# Remove everything from the index
$ git rm --cached -r .

# Re-add all the deleted files to the index
# You should get lots of messages like: &amp;quot;warning: CRLF will be replaced by LF in &amp;lt;file&amp;gt;.&amp;quot;
$ git diff --cached --name-only -z | xargs -0 git add -f

# Commit
$ git commit -m &amp;quot;Fix CRLF&amp;quot;&lt;/pre&gt;

&lt;p&gt;Hope this one will save you time and please vote it in NetBeans bugzilla to notify developers that we need it solved.&amp;#160; &lt;/p&gt;

&lt;p&gt;&lt;a href="http://lh3.ggpht.com/-tQqLBuH9_jc/TyEnDqYja_I/AAAAAAAAAsM/TT2g_qVwoKg/s1600-h/2012-01-24_1436%25255B3%25255D.png"&gt;&lt;img style="background-image: none; border-bottom: 0px; border-left: 0px; margin: 0px auto 6px; padding-left: 0px; padding-right: 0px; display: block; float: none; border-top: 0px; border-right: 0px; padding-top: 0px" title="2012-01-24_1436" border="0" alt="2012-01-24_1436" src="http://lh6.ggpht.com/-NflNeVFnsAw/Tx7SbIcLcCI/AAAAAAAAAsU/rmVdS2rC0Wk/2012-01-24_1436_thumb%25255B2%25255D.png?imgmax=800" width="155" height="283" /&gt;&lt;/a&gt;For any ideas, concerns, requests please leave a comment. Thank you.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2127794245010916172-6554593652597487100?l=udevi-community.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udevi-community.blogspot.com/feeds/6554593652597487100/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://udevi-community.blogspot.com/2012/01/git-and-netbeans-71-problem-everything.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/6554593652597487100'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/6554593652597487100'/><link rel='alternate' type='text/html' href='http://udevi-community.blogspot.com/2012/01/git-and-netbeans-71-problem-everything.html' title='Git and NetBeans 7.1 Problem: Everything in the project appears modified, but is not'/><author><name>Timur</name><uri>http://www.blogger.com/profile/14594716207428319651</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/_BWELgx6N3yw/S49Bi5bOhxI/AAAAAAAAAcA/Xf12ZX1FEc0/S220/Timur_face.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh6.ggpht.com/-NflNeVFnsAw/Tx7SbIcLcCI/AAAAAAAAAsU/rmVdS2rC0Wk/s72-c/2012-01-24_1436_thumb%25255B2%25255D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2127794245010916172.post-3950422117840273660</id><published>2012-01-19T16:51:00.000+02:00</published><updated>2012-01-26T12:14:26.989+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Git'/><category scheme='http://www.blogger.com/atom/ns#' term='Symfony2'/><category scheme='http://www.blogger.com/atom/ns#' term='NetBeans'/><title type='text'>Git and first Symfony2 project in NetBeans</title><content type='html'>&lt;p&gt;&lt;strong&gt;&lt;a href="http://lh6.ggpht.com/-RXYcW6Ofxbg/TxguhmXP53I/AAAAAAAAAoA/iF3j2pWFfXM/s1600-h/apple-touch-icon%25255B3%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; margin: 0px 11px 6px 0px; padding-left: 0px; padding-right: 0px; display: inline; float: left; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="apple-touch-icon" border="0" alt="apple-touch-icon" align="left" src="http://lh4.ggpht.com/-dR8XoLcdhOI/TxguiSFi_eI/AAAAAAAAAoI/zAgHvi2GP-Y/apple-touch-icon_thumb%25255B1%25255D.png?imgmax=800" width="129" height="129" /&gt;&lt;/a&gt;This post is a part of series of posts dedicated to developping in Symfony2. If you missed the first part I highly recommend you to go and read that one before you continue with this post.&lt;/strong&gt;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;a href="http://udevi-community.blogspot.com/2012/01/setting-up-windows-environment-for.html" target="_blank"&gt;Setting up Windows environment for Symfony2 developing with NetBeans, XAMPP and Git&lt;/a&gt; &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Hello, today I’ll show you how to create your first Symfony2 project in NetBeans and how to push and pull it to/from Github.&lt;/p&gt;  &lt;h6&gt;&lt;/h6&gt;  &lt;h6&gt;&lt;font size="2"&gt;Creating the fiRst SYMFONY2 project IN NETBEANS&lt;/font&gt;&lt;/h6&gt;  &lt;p&gt;Ok go File –&amp;gt; New Project –&amp;gt; PHP –&amp;gt; PHP Application. Click Next.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh4.ggpht.com/-FOJgpe-T4qs/TxgujV4uY3I/AAAAAAAAAoQ/bsefDNono4I/s1600-h/2012-01-19_1432%25255B3%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="2012-01-19_1432" border="0" alt="2012-01-19_1432" src="http://lh6.ggpht.com/-OW-guZJODg8/TxgukDFd30I/AAAAAAAAAoY/H6vUZ-V3ToU/2012-01-19_1432_thumb%25255B1%25255D.png?imgmax=800" width="644" height="439" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Create the project directly into your XAMPP server, htdocs folder. Click Next.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/-57frLin9YU0/Txguk65urBI/AAAAAAAAAoc/o12z-GcPJCc/s1600-h/2012-01-19_1434%25255B3%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="2012-01-19_1434" border="0" alt="2012-01-19_1434" src="http://lh3.ggpht.com/-8kyoVRUe_w0/TxgulkPI73I/AAAAAAAAAoo/eGf-QJHa-KI/2012-01-19_1434_thumb%25255B1%25255D.png?imgmax=800" width="644" height="439" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;We should modify the starting URL because in Symfony2 the application starting point is &lt;strong&gt;/web/app_dev.php &lt;/strong&gt;like that we can assure that when we are running the application it is correctly started. Also give it a descriptive name like “FirstApp”.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-8TOs3XfCa6M/Txgumrgc2jI/AAAAAAAAAow/iX_OkxbHheA/s1600-h/2012-01-19_1445%25255B3%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="2012-01-19_1445" border="0" alt="2012-01-19_1445" src="http://lh5.ggpht.com/-b17KhKAWm4g/TxguncHL2DI/AAAAAAAAAo4/Ku0xoe4nbGU/2012-01-19_1445_thumb%25255B1%25255D.png?imgmax=800" width="644" height="459" /&gt;&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;On PHP Frameworks step select Symfony2 checkbox and click Finish. Now your application should be generated.&lt;/p&gt;  &lt;h6&gt;&lt;font size="2"&gt;RUNNING APPLICATION&lt;/font&gt;&lt;/h6&gt;  &lt;p&gt;Now start your Apache and MySQL from XAMPP Control Panel. Go to NetBeans and click F6 (Run the application).&lt;/p&gt;  &lt;p&gt;Hooray!!! Our first application is up and running. Now we need to configure our application, and doing this will change the &lt;strong&gt;app/config/parameters.ini&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-mogaSJ4gZjY/Txguos848BI/AAAAAAAAApA/SNakqkrNboc/s1600-h/AccessSymfony2FirstApp%25255B3%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="AccessSymfony2FirstApp" border="0" alt="AccessSymfony2FirstApp" src="http://lh5.ggpht.com/-7e52vgoLqNc/TxgupbDPPQI/AAAAAAAAApI/YpT_yajuMmE/AccessSymfony2FirstApp_thumb%25255B1%25255D.png?imgmax=800" width="644" height="480" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/-FGt1wbR6znA/Txguqa5hXCI/AAAAAAAAApQ/0WM0JjJZLSQ/s1600-h/configure_1_step%25255B4%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="configure_1_step" border="0" alt="configure_1_step" src="http://lh3.ggpht.com/-w0HlfeS5WyQ/TxgurnL0f8I/AAAAAAAAApY/EWpU3F8odIU/configure_1_step_thumb%25255B2%25255D.png?imgmax=800" width="498" height="403" /&gt;&lt;/a&gt;&lt;a href="http://lh6.ggpht.com/-kxi3LZRMmco/TxgusfXUPmI/AAAAAAAAApg/AItk3tWK_XM/s1600-h/configure_2_step%25255B33%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="configure_2_step" border="0" alt="configure_2_step" src="http://lh4.ggpht.com/-CKsYC1P1B44/TxgutOQXkqI/AAAAAAAAApo/1MVKwCA1VoI/configure_2_step_thumb%25255B31%25255D.png?imgmax=800" width="498" height="262" /&gt;&lt;/a&gt;&lt;a href="http://lh6.ggpht.com/-8wsPuLjRwZw/TxguuMfJ16I/AAAAAAAAApw/fzfpHCgX8R0/s1600-h/well_done_config%25255B4%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="well_done_config" border="0" alt="well_done_config" src="http://lh5.ggpht.com/-dRkOKNzWQc4/TxguvcA_9UI/AAAAAAAAAp4/4T6qKxyCLHc/well_done_config_thumb%25255B2%25255D.png?imgmax=800" width="498" height="322" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Now here are our new parameters.ini file&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/-73RYaweUy-U/TxguwJZ0hHI/AAAAAAAAAp8/aY03Rk9dswQ/s1600-h/changed_params_ini%25255B4%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="changed_params_ini" border="0" alt="changed_params_ini" src="http://lh3.ggpht.com/-0B7R7wRS9bA/Txguw-cvEcI/AAAAAAAAAqI/WT0pXF9Y9Zo/changed_params_ini_thumb%25255B2%25255D.png?imgmax=800" width="704" height="190" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;h6&gt;&lt;font size="2"&gt;working with git. putting the site to github. &lt;/font&gt;&lt;/h6&gt;  &lt;p&gt;Now we need to put the site to github I will show you here the NetBeans integration with Git, but I really prefer the command line way from Git Bash (MsysGit). First I will create a repository at Github. I’ll name FirstSymfony2App.&lt;/p&gt;  &lt;p&gt;Next we’ll add a .gitignore file to our project. But what is to ignore actually ? Well I didn’t knew it either so I found a typical ignore file for Symfony2 project. So I found it in &lt;a href="http://github.com/github/gitignore/blob/master/Symfony2.gitignore" target="_blank"&gt;http://github.com/github/gitignore/blob/master/Symfony2.gitignore&lt;/a&gt;.&lt;/p&gt;  &lt;pre class="brush: plain;"&gt;# Bootstrap
app/bootstrap*

# Symfony directories
vendor/*
*/logs/*
*/cache/*
web/uploads/*
web/bundles/*

# Configuration files
app/config/parameters.ini&lt;/pre&gt;

&lt;p&gt;Copy it and create this file in our project. &lt;/p&gt;

&lt;p&gt;Now we can initialize the Git repository directly from NetBeans. Select the project. Right click go to Versioning –&amp;gt; Initialize Git Repository.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://lh3.ggpht.com/-xL_FO0eWR60/TxguxhPoGqI/AAAAAAAAAqM/zjk7G-XyFwg/s1600-h/init_git%25255B4%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="init_git" border="0" alt="init_git" src="http://lh4.ggpht.com/-njIeEBYDitg/TxguyZ1m63I/AAAAAAAAAqY/ibM-o0qazFA/init_git_thumb%25255B2%25255D.png?imgmax=800" width="464" height="461" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Now we can add the files to Git by “Git –&amp;gt; Add” command. &lt;/li&gt;

  &lt;li&gt;Also we can commit now by right click Project –&amp;gt; “Git –&amp;gt; Commit”. &lt;/li&gt;

  &lt;li&gt;Also we can see already made commits by “Git –&amp;gt; Show History” command &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now lets push the contents of our site to Github. First we’ll need to use a remote site to which to push. Ok let’s execute Git –&amp;gt; Remote –&amp;gt; Push command.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://lh4.ggpht.com/-duCXcTgCV4g/TxguzUiWe7I/AAAAAAAAAqg/vebvhph61TU/s1600-h/2012-01-19_1542%25255B19%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="2012-01-19_1542" border="0" alt="2012-01-19_1542" src="http://lh5.ggpht.com/-uKn8REBJkGA/Txgu0HWgDzI/AAAAAAAAAqk/iyEaB5gPlIk/2012-01-19_1542_thumb%25255B17%25255D.png?imgmax=800" width="644" height="446" /&gt;&lt;/a&gt;&lt;a href="http://lh5.ggpht.com/-TSdOMJ_DUIc/Txgu0kOSOpI/AAAAAAAAAqw/CpH-MpBOSDo/s1600-h/2012-01-19_1543%25255B3%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="2012-01-19_1543" border="0" alt="2012-01-19_1543" src="http://lh6.ggpht.com/-DGJfPTUMgQ4/Txgu2eZY_pI/AAAAAAAAAq4/pQSjZFYTcgk/2012-01-19_1543_thumb%25255B1%25255D.png?imgmax=800" width="644" height="413" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://lh3.ggpht.com/-OJdoMl08MgY/Txgu28Qj57I/AAAAAAAAAq8/QLRclqbBCOM/s1600-h/2012-01-19_1544%25255B4%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="2012-01-19_1544" border="0" alt="2012-01-19_1544" src="http://lh3.ggpht.com/-wpYrLB2enuE/Txgu3l-Yq0I/AAAAAAAAArE/cJKKJcNYo3E/2012-01-19_1544_thumb%25255B2%25255D.png?imgmax=800" width="538" height="477" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That’s all folks, our project is on Github. You can see it here &lt;a href="https://github.com/Monomachus/FirstSymfony2App"&gt;https://github.com/Monomachus/FirstSymfony2App&lt;/a&gt;&lt;/p&gt;

&lt;h6&gt;&lt;font size="2"&gt;PULLING Project From GiTHUB AND RUNNING IT&lt;/font&gt;&lt;/h6&gt;

&lt;p&gt;Now let’s see the perspective of another developer who wants to use/participate in the project. For the sake of the experiment I will delete all the sources and will use MsysGit to do all Git-related stuff, though I think I could somehow use NetBeans for it. &lt;/p&gt;

&lt;p&gt;I will clone the repository directly into XAMPP server, htdocs folder. Also I will name the folder FirstApp to avoid specific problems. Using Git Bash tool run this command&lt;/p&gt;

&lt;pre class="brush: bash;"&gt;$ git clone https://Monomachus@github.com/Monomachus/FirstSymfony2App.git FirstApp&lt;/pre&gt;

&lt;p&gt;Import the project into NetBeans using File –&amp;gt; Open Project command. Now start Apache and MySql and run the project. We will also need to specify the project URL : &lt;a title="http://localhost/FirstApp/web/app_dev.php" href="http://localhost/FirstApp/web/app_dev.php"&gt;http://localhost/FirstApp/web/app_dev.php&lt;/a&gt; .&lt;/p&gt;

&lt;p&gt;Now we get an error: &lt;/p&gt;

&lt;pre class="brush: plain;"&gt;Warning: require_once(D:\xampp_server\htdocs\FirstApp\web/../app/bootstrap.php.cache) [function.require-once]: failed to open stream: No such file or directory in D:\xampp_server\htdocs\FirstApp\web\app_dev.php on line 17  
Fatal error: require_once() [function.require]: Failed opening required 'D:\xampp_server\htdocs\FirstApp\web/../app/bootstrap.php.cache' (include_path='.;D:\xampp_server\php\PEAR') in D:\xampp_server\htdocs\FirstApp\web\app_dev.php on line 17&lt;/pre&gt;

&lt;p&gt;&lt;a href="http://lh4.ggpht.com/-MDsPBW5SDjk/Txgu4TNuoRI/AAAAAAAAArQ/6RRBSS7dhZI/s1600-h/2012-01-19_1604%25255B4%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="2012-01-19_1604" border="0" alt="2012-01-19_1604" src="http://lh4.ggpht.com/-EtQ5ktUNQ0U/Txgu6VuSteI/AAAAAAAAArY/HJ5MeweSIXA/2012-01-19_1604_thumb%25255B2%25255D.png?imgmax=800" width="644" height="153" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This error is caused by the fact that in our .gitignore file there is this line &lt;u&gt;&lt;strong&gt;app/bootstrap*&lt;/strong&gt;&lt;/u&gt;&amp;#160; and this means that our bootstrap.php.cache file was ignored and not committed to the Github. So the question is how can we regenerate this file ? Well, thanks to Beeton from IRC channel &lt;a href="irc://irc.freenode.net/symfony" target="_blank"&gt;#symfony&lt;/a&gt; from Freenode, I found out that we can generate it using the&lt;/p&gt;

&lt;pre class="brush: plain;"&gt;php bin/vendors install&lt;/pre&gt;

&lt;p&gt; command and that vendor/bundles/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php is the file that actually creates it.&lt;/p&gt;

&lt;p&gt;But before you run that command please note that we also do not have the app/config/parameters.ini file because it is also in our .gitignore file. Is it really a good idea ? Yes it is if you work with other people, it means that your MySql database configuration can actually differ from your mate’s configuration. &lt;/p&gt;

&lt;p&gt;So where do you get the sample file, well almost always in open source world the answer is Github. &lt;img style="border-bottom-style: none; border-left-style: none; border-top-style: none; border-right-style: none" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://lh4.ggpht.com/-0modm_Y34vk/Txgu7LtfDAI/AAAAAAAAArc/BBwkXYAsVPE/wlEmoticon-smile%25255B2%25255D.png?imgmax=800" /&gt; The link to the sample file &lt;a href="https://github.com/symfony/symfony-standard/blob/v2.0.9/app/config/parameters.ini" target="_blank"&gt;https://github.com/symfony/symfony-standard/blob/v2.0.9/app/config/parameters.ini&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Copy that file and add it to the app/config folder. Modify it and than run the command &lt;strong&gt;&lt;u&gt;php bin/vendors install&lt;/u&gt;&lt;/strong&gt; &lt;/p&gt;

&lt;pre class="brush: plain; collapse: true;"&gt;$ php bin/vendors install
&amp;gt; Installing/Updating symfony
Cloning into 'D:\xampp_server\htdocs\FirstApp/vendor/symfony'...
remote: Counting objects: 109718, done.
remote: Compressing objects: 100% (35141/35141), done.
remote: Total 109718 (delta 68210), reused 102521 (delta 62139)
Receiving objects: 100% (109718/109718), 16.38 MiB | 3.49 MiB/s, done.
Resolving deltas: 100% (68210/68210), done.
f842739d58b649ffbe6543b2eff520327373029d
HEAD is now at 3e9d937 updated VERSION for 2.0.9
&amp;gt; Installing/Updating twig
Cloning into 'D:\xampp_server\htdocs\FirstApp/vendor/twig'...
remote: Counting objects: 9859, done.
remote: Compressing objects: 100% (2606/2606), done.
remote: Total 9859 (delta 6399), reused 9540 (delta 6122)
Receiving objects: 100% (9859/9859), 1.28 MiB | 444 KiB/s, done.
Resolving deltas: 100% (6399/6399), done.
96596d5c7f6920dc59985c1cba531ae20715baf4
HEAD is now at 5bba149 prepared the 1.5.1 release
&amp;gt; Installing/Updating monolog
Cloning into 'D:\xampp_server\htdocs\FirstApp/vendor/monolog'...
remote: Counting objects: 1384, done.
remote: Compressing objects: 100% (548/548), done.
remote: Total 1384 (delta 748), reused 1322 (delta 695)Receiving objects:  94% (
Receiving objects:  96% (1329/1384), 52.00 KiB | 90 KiB/s
Receiving objects: 100% (1384/1384), 174.72 KiB | 90 KiB/s, done.
Resolving deltas: 100% (748/748), done.
8e11234066280685e903ea6dcc0d304cd1aec9b9
HEAD is now at b704c49 Only send FirePHP headers to browser advertising support
for it in their user agent
&amp;gt; Installing/Updating doctrine-common
Cloning into 'D:\xampp_server\htdocs\FirstApp/vendor/doctrine-common'...
remote: Counting objects: 57783, done.
remote: Compressing objects: 100% (14404/14404), done.
remote: Total 57783 (delta 40513), reused 57588 (delta 40349)
Receiving objects: 100% (57783/57783), 15.34 MiB | 834 KiB/s, done.
Resolving deltas: 100% (40513/40513), done.
38c854c37d20b1f67c979772089b2cd30908bcb6
HEAD is now at b886898 Release 2.1.4
&amp;gt; Installing/Updating doctrine-dbal
Cloning into 'D:\xampp_server\htdocs\FirstApp/vendor/doctrine-dbal'...
remote: Counting objects: 59701, done.
remote: Compressing objects: 100% (15249/15249), done.
remote: Total 59701 (delta 41906), reused 59291 (delta 41520)Receiving objects:


Resolving deltas: 100% (41906/41906), done.
2a9e9943f33610bfde4637abeafe00edd201803c
HEAD is now at ae358bd Merge remote branch 'origin/2.1.x' into 2.1.x
&amp;gt; Installing/Updating doctrine
Cloning into 'D:\xampp_server\htdocs\FirstApp/vendor/doctrine'...
remote: Counting objects: 69262, done.
remote: Compressing objects: 100% (17611/17611), done.
remote: Total 69262 (delta 48424), reused 68330 (delta 47567)
Receiving objects: 100% (69262/69262), 17.08 MiB | 2.61 MiB/s, done.
Resolving deltas: 100% (48424/48424), done.
febfe35c2315a20534630aa9e5b9c72a0047f569
HEAD is now at da0e343 Release 2.1.5
&amp;gt; Installing/Updating swiftmailer
Cloning into 'D:\xampp_server\htdocs\FirstApp/vendor/swiftmailer'...
remote: Counting objects: 9620, done.
remote: Compressing objects: 100% (3288/3288), done.
remote: Total 9620 (delta 5536), reused 9458 (delta 5388)
 (9524/9620), 4.93 MiB | 876 KiB/s
Receiving objects: 100% (9620/9620), 5.04 MiB | 889 KiB/s, done.
Resolving deltas: 100% (5536/5536), done.
0243dc3b18c784adda72e71f6bd34f11fef69b4b
HEAD is now at 982b4c9 prepared the 4.1.5 release
&amp;gt; Installing/Updating assetic
Cloning into 'D:\xampp_server\htdocs\FirstApp/vendor/assetic'...
remote: Counting objects: 4714, done.
remote: Compressing objects: 100% (1665/1665), done.
remote: Total 4714 (delta 2787), reused 4492 (delta 2600)Receiving objects:  99%

Receiving objects: 100% (4714/4714), 540.18 KiB | 251 KiB/s, done.
Resolving deltas: 100% (2787/2787), done.
e15a13fe4782caa6566c7f0c34ae10badaf85361
HEAD is now at f829ad2 updated changelog
&amp;gt; Installing/Updating twig-extensions
Cloning into 'D:\xampp_server\htdocs\FirstApp/vendor/twig-extensions'...
remote: Counting objects: 297, done.
remote: Compressing objects: 100% (148/148), done.
remote: Total 297 (delta 108), reused 270 (delta 84)Receiving objects:   7% (21/
Receiving objects:   8% (24/297)
Receiving objects: 100% (297/297), 40.25 KiB, done.
Resolving deltas: 100% (108/108), done.
a05ab5ed18a51ae45f3dcc2d0c4ec9b3a6386987
&amp;gt; Installing/Updating metadata
Cloning into 'D:\xampp_server\htdocs\FirstApp/vendor/metadata'...
remote: Counting objects: 249, done.
remote: Compressing objects: 100% (178/178), done.
remote: Total 249 (delta 118), reused 128 (delta 32)Receiving objects:  91% (227
Receiving objects:  93% (232/249)
Receiving objects: 100% (249/249), 33.70 KiB, done.
Resolving deltas: 100% (118/118), done.
7d97f1725063f04ef1894a86740b261daf229b89
HEAD is now at 8717ad2 release 1.0.0
&amp;gt; Installing/Updating SensioFrameworkExtraBundle
Cloning into 'D:\xampp_server\htdocs\FirstApp/vendor//bundles/Sensio/Bundle/Fram
eworkExtraBundle'...
remote: Counting objects: 1064, done.
remote: Compressing objects: 100% (518/518), done.
remote: Total 1064 (delta 582), reused 969 (delta 500)Receiving objects:  94% (1
Receiving objects:  96% (1022/1064), 132.00 KiB | 74 KiB/s
Receiving objects: 100% (1064/1064), 132.52 KiB | 74 KiB/s, done.
Resolving deltas: 100% (582/582), done.
55de01d34c5b95ee07bd511d06e0b171af5fe9ba
HEAD is now at 1c7e92f fixed tests config
&amp;gt; Installing/Updating JMSSecurityExtraBundle
Cloning into 'D:\xampp_server\htdocs\FirstApp/vendor//bundles/JMS/SecurityExtraB
undle'...
remote: Counting objects: 1665, done.
remote: Compressing objects: 100% (718/718), done.
remote: Total 1665 (delta 880), reused 1595 (delta 810)
Receiving objects: 100% (1665/1665), 273.00 KiB | 228 KiB/s, done.
Resolving deltas: 100% (880/880), done.
4dc8223afa9a38cc467e0a858ef5741e6cc3987d
HEAD is now at 541a4c2 Merge pull request #36 from everzet/patch-1
&amp;gt; Installing/Updating SensioDistributionBundle
Cloning into 'D:\xampp_server\htdocs\FirstApp/vendor//bundles/Sensio/Bundle/Dist
ributionBundle'...
remote: Counting objects: 423, done.
remote: Compressing objects: 100% (201/201), done.
remote: Total 423 (delta 211), reused 414 (delta 206)Receiving objects:  70% (29

Receiving objects: 100% (423/423), 60.86 KiB | 87 KiB/s, done.
Resolving deltas: 100% (211/211), done.
f00c99854ff161b006a200d8dffa0013981d5373
HEAD is now at 20b66a4 fixed version in composer.json
&amp;gt; Installing/Updating SensioGeneratorBundle
Cloning into 'D:\xampp_server\htdocs\FirstApp/vendor//bundles/Sensio/Bundle/Gene
ratorBundle'...
remote: Counting objects: 651, done.
remote: Compressing objects: 100% (302/302), done.
remote: Total 651 (delta 343), reused 609 (delta 317)Receiving objects:  77% (50
2/651), 76.00 KiB | 130 KiB/s
Receiving objects: 100% (651/651), 115.97 KiB | 130 KiB/s, done.
Resolving deltas: 100% (343/343), done.
67bf607b41f930f93f2032d069be535ecaa21730
HEAD is now at dd37fc4 merged branch gnomii/use_filesystem_component (PR #88)
&amp;gt; Installing/Updating AsseticBundle
Cloning into 'D:\xampp_server\htdocs\FirstApp/vendor//bundles/Symfony/Bundle/Ass
eticBundle'...
remote: Counting objects: 1741, done.
remote: Compressing objects: 100% (544/544), done.
remote: Total 1741 (delta 1056), reused 1671 (delta 992)Receiving objects:  94%

Receiving objects: 100% (1741/1741), 229.34 KiB | 86 KiB/s, done.
Resolving deltas: 100% (1056/1056), done.
ae7f6f4dc252d37c686584576cc92f07b092d06a
HEAD is now at 41b5913 Merge pull request #27 from stof/disable_profiler
Installing assets for Symfony\Bundle\FrameworkBundle into D:\xampp_server\htdocs
\FirstApp/web/bundles/framework
Installing assets for Acme\DemoBundle into D:\xampp_server\htdocs\FirstApp/web/b
undles/acmedemo
Installing assets for Symfony\Bundle\WebProfilerBundle into D:\xampp_server\htdo
cs\FirstApp/web/bundles/webprofiler
Installing assets for Sensio\Bundle\DistributionBundle into D:\xampp_server\htdo
cs\FirstApp/web/bundles/sensiodistribution
Clearing the cache for the dev environment with debug true&lt;/pre&gt;

&lt;p&gt;After these manipulations we can finally run the sample application.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://lh4.ggpht.com/-tvT02LlQCWM/Txgu7knJbOI/AAAAAAAAAro/mFnOaAy1FzY/s1600-h/2012-01-19_1644%25255B3%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="2012-01-19_1644" border="0" alt="2012-01-19_1644" src="http://lh5.ggpht.com/-IBSJ6ymnON0/Txgu8j_OxFI/AAAAAAAAArw/1XNhfnYiAFQ/2012-01-19_1644_thumb%25255B1%25255D.png?imgmax=800" width="599" height="484" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Today we learned how to create and run your first Symfony2 project and push and pull it to/from Github.&lt;/p&gt;

&lt;p&gt;Hope you liked it, if you have any concerns, ideas for posts, suggestions please post it here. Good coding guys!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2127794245010916172-3950422117840273660?l=udevi-community.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udevi-community.blogspot.com/feeds/3950422117840273660/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://udevi-community.blogspot.com/2012/01/git-and-first-symfony2-project-in.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/3950422117840273660'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/3950422117840273660'/><link rel='alternate' type='text/html' href='http://udevi-community.blogspot.com/2012/01/git-and-first-symfony2-project-in.html' title='Git and first Symfony2 project in NetBeans'/><author><name>Timur</name><uri>http://www.blogger.com/profile/14594716207428319651</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/_BWELgx6N3yw/S49Bi5bOhxI/AAAAAAAAAcA/Xf12ZX1FEc0/S220/Timur_face.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/-dR8XoLcdhOI/TxguiSFi_eI/AAAAAAAAAoI/zAgHvi2GP-Y/s72-c/apple-touch-icon_thumb%25255B1%25255D.png?imgmax=800' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2127794245010916172.post-5608910184936528158</id><published>2012-01-19T12:13:00.001+02:00</published><updated>2012-01-19T17:08:49.787+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PHP'/><category scheme='http://www.blogger.com/atom/ns#' term='Git'/><category scheme='http://www.blogger.com/atom/ns#' term='Symfony2'/><category scheme='http://www.blogger.com/atom/ns#' term='XAMPP'/><category scheme='http://www.blogger.com/atom/ns#' term='NetBeans'/><title type='text'>Setting up Windows environment for Symfony2 developing with NetBeans, XAMPP and Git</title><content type='html'>&lt;p&gt;&lt;strong&gt;[UPDATE] This is a series of post in the next one I’ll show you first Symfony2 app and how to make it work with Git. &lt;u&gt;Second post link:&lt;/u&gt; &lt;a href="http://udevi-community.blogspot.com/2012/01/git-and-first-symfony2-project-in.html" target="_blank"&gt;Git and first Symfony2 project in NetBeans&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt; &lt;p&gt;Hi, &lt;/p&gt; &lt;p&gt;For a long time there was no sign of me here, but I hope this will change… So what do I do these days, well I want to go in Symfony2 to see how it feels like… Lots of guys were telling me PHP is way faster in development than in Java or .NET Web development so I want to try it out too.&lt;/p&gt; &lt;p&gt;So what do we actually need ?&lt;/p&gt; &lt;h6&gt;&lt;font size="2"&gt;XAMPP&lt;/font&gt;&lt;/h6&gt; &lt;p&gt;No problem with that one. Get the latest version, install it but please &lt;em&gt;&lt;u&gt;&lt;strong&gt;don’t install&lt;/strong&gt;&lt;/u&gt;&lt;/em&gt; MySql and Apache as services.&amp;nbsp; Than add a system environment variable like XAMPP_HOME for example and than add &lt;/p&gt;&lt;pre class="brush: plain;"&gt;;%XAMPP_HOME%\php;%XAMPP_HOME%\mysql\bin\&lt;/pre&gt;
&lt;p&gt;to Path environment variable. Now you should be able to check your PHP version from command line. &lt;/p&gt;
&lt;p&gt;Try it now&lt;/p&gt;
&lt;p&gt;&lt;img src="http://img688.imageshack.us/img688/849/201201191010.png"&gt;&lt;/p&gt;
&lt;h6&gt;&lt;font size="2"&gt;XDEBUG based on your own phpinfo&lt;/font&gt;&lt;/h6&gt;
&lt;p&gt;A friend of mine showed me a wonderful site for getting your own DLL that is needed for your exactly configuration.&lt;/p&gt;
&lt;p&gt;But first start your Apache server from your XAMPP control panel. Go to &lt;a href="http://localhost/xampp/phpinfo.php" target="_blank"&gt;http://localhost/xampp/phpinfo.php&lt;/a&gt; and go get view source and copy all the HTML. Now go to &lt;a href="http://www.xdebug.org/find-binary.php" target="_blank"&gt;http://www.xdebug.org/find-binary.php&lt;/a&gt; and insert the HTML into the textarea. Click on “Analyze my phpinfo output” button. And there you go you have your own DLL to download. Download it and put it into your php/ext folder&lt;/p&gt;
&lt;p&gt;&lt;a href="http://lh3.ggpht.com/-zycol6OtW4U/TxfsjMR7odI/AAAAAAAAAmw/TYwL70cuWJU/s1600-h/find_xdebug_binary%25255B4%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="find_xdebug_binary" border="0" alt="find_xdebug_binary" src="http://lh5.ggpht.com/-5tHr6msfZUE/TxfsjyrKHsI/AAAAAAAAAm4/Y3Xd7g_eNws/find_xdebug_binary_thumb%25255B2%25255D.png?imgmax=800" width="522" height="527"&gt;&lt;/a&gt;&lt;a href="http://lh3.ggpht.com/-6imGfTQN-lI/Txfsk0VItII/AAAAAAAAAnA/toTIZDmbBcU/s1600-h/find_xdebug_dll%25255B3%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="find_xdebug_dll" border="0" alt="find_xdebug_dll" src="http://lh4.ggpht.com/-Stwly8ySvGE/TxfsmU7nLiI/AAAAAAAAAnI/r9lKC74Axl4/find_xdebug_dll_thumb%25255B1%25255D.png?imgmax=800" width="522" height="484"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Now go to your php.ini location and add these lines + the line starting with zend_extension&lt;/p&gt;&lt;pre class="brush: plain;"&gt;xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_host=localhost
xdebug.remote_port=9000
zend_extension = D:\xampp_server\php\ext\php_xdebug-2.1.2-5.3-vc9.dll&lt;/pre&gt;
&lt;p&gt;Now your machine should be ready for debug. &lt;pre&gt;&lt;/pre&gt;
&lt;h6&gt;&lt;font size="2"&gt;INSTALL mSYSGIT – GIT FOR Windows&lt;/font&gt;&lt;/h6&gt;
&lt;p&gt;Go and get the latest msysgit from and install it &lt;a href="http://code.google.com/p/msysgit/downloads/list" target="_blank"&gt;http://code.google.com/p/msysgit/downloads/list&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://lh5.ggpht.com/-AqdvaIOTteY/Txfsm_6SF9I/AAAAAAAAAnw/wVCFuIJ_bnU/s1600-h/2012-01-19_1144%25255B6%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="2012-01-19_1144" border="0" alt="2012-01-19_1144" src="http://lh6.ggpht.com/-_uF82W-sUjw/TxfsoGYS8II/AAAAAAAAAn0/BNctcEuyxZk/2012-01-19_1144_thumb%25255B4%25255D.png?imgmax=800" width="704" height="138"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h6&gt;&lt;font size="2"&gt;SYMFONY2 Package&lt;/font&gt;&lt;/h6&gt;
&lt;p&gt;Go to &lt;a href="http://symfony.com/download" target="_blank"&gt;http://symfony.com/download&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Download the latest version in a .ZIP package. At the time of writing this it was &lt;a href="http://symfony.com/download?v=Symfony_Standard_Vendors_2.0.9.zip" target="_blank"&gt;Symfony Standart 2.0.9.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Make a separate folder and put this zip into it (in my case symfony2_php_sources). Also unzip it into another folder. (in my case symfony2_php_sources/Symfony).&lt;/p&gt;
&lt;h6&gt;&lt;font size="2"&gt;IDE&lt;/font&gt;&lt;/h6&gt;
&lt;p&gt;Well we have some options like Eclipse and NetBeans also some support in PHPStorm, but I choose NetBeans 7.1.&lt;/p&gt;
&lt;p&gt;There are a number of reasons why I chose it:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Out of box support for YAML 
&lt;li&gt;Support for Symfony2 (plugin) 
&lt;li&gt;Support for Twig (templating engine in Symfony2) also plugin 
&lt;li&gt;More user friendly than Eclipse (I guess someone could argue that, but I worked in Eclipse for 1 year). &lt;/li&gt;&lt;/ul&gt;
&lt;p&gt;So let’s starts go to&amp;nbsp; &lt;a href="http://netbeans.org/downloads/" target="_blank"&gt;http://netbeans.org/downloads/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://lh5.ggpht.com/-hKmFCnd8z3w/TxfspHF9XQI/AAAAAAAAAn4/GH1BAJxzOBI/s1600-h/2012-01-19_1035%25255B7%25255D%25255B2%25255D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="2012-01-19_1035" border="0" alt="2012-01-19_1035" src="http://lh5.ggpht.com/-n2WjlYIKc2Q/Txfsqv7LRAI/AAAAAAAAAn8/e6QE-SgN0ms/2012-01-19_1035%25255B7%25255D_thumb%25255B1%25255D.png?imgmax=800" width="704" height="469"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;u&gt;Add plugin for Symfony2.&lt;/u&gt; Go to Tools –&amp;gt; Plugins –&amp;gt; Tab Available Plugins –&amp;gt; click “Reload Catalog” –: in Search box input “symfony2” and press Enter. Now there should be a plugin there, called PHP Symfony2 Framework. Install it and restart NetBeans.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://img576.imageshack.us/img576/576/201201191048.png" width="700" height="432"&gt;&lt;/p&gt;
&lt;p&gt;&lt;u&gt;Add plugin for Twig.&lt;/u&gt; For now it is available for download from &lt;a href="https://github.com/blogsh/Twig-netbeans/downloads"&gt;https://github.com/blogsh/Twig-netbeans/downloads&lt;/a&gt; as a NBM file. Download the latest file.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://img84.imageshack.us/img84/4567/201201191112.png" width="700" height="444"&gt;&lt;/p&gt;
&lt;p&gt;And install it in NetBeans.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;&lt;img src="http://img834.imageshack.us/img834/15/201201191117.png" width="700" height="432"&gt;&lt;/p&gt;
&lt;p&gt;Now let’s tweak it a little bit. Go to Tools –&amp;gt; Options –&amp;gt; PHP.&lt;/p&gt;
&lt;p&gt;Here we’ll have a little fun go to General tab –&amp;gt; Indicate your php.exe location in XAMPP. Also add in Global include path unpacked Symfony2 sources.&lt;/p&gt;
&lt;p&gt;Go to Unit Testing tab and indicate the location of your phpunit.bat&lt;/p&gt;
&lt;p&gt;Go to Symfony2 tab and indicate the location of the downloaded Symfony2 zip file.&lt;/p&gt;
&lt;p&gt;Here is the cumulative actions screenshot&lt;/p&gt;
&lt;p&gt;&lt;img src="http://img198.imageshack.us/img198/9169/netbeansoptions.png" width="700" height="592"&gt;&lt;/p&gt;
&lt;p&gt;THAT’S ALL. Now your machine is configured.&lt;/p&gt;
&lt;p&gt;Next time I’ll show you how to work with your first Symfony2 project and Git.&lt;/p&gt;
&lt;p&gt;If you have any concerns, suggestions, ideas for blog posts please comment here.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2127794245010916172-5608910184936528158?l=udevi-community.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udevi-community.blogspot.com/feeds/5608910184936528158/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://udevi-community.blogspot.com/2012/01/setting-up-windows-environment-for.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/5608910184936528158'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/5608910184936528158'/><link rel='alternate' type='text/html' href='http://udevi-community.blogspot.com/2012/01/setting-up-windows-environment-for.html' title='Setting up Windows environment for Symfony2 developing with NetBeans, XAMPP and Git'/><author><name>Timur</name><uri>http://www.blogger.com/profile/14594716207428319651</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/_BWELgx6N3yw/S49Bi5bOhxI/AAAAAAAAAcA/Xf12ZX1FEc0/S220/Timur_face.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/-5tHr6msfZUE/TxfsjyrKHsI/AAAAAAAAAm4/Y3Xd7g_eNws/s72-c/find_xdebug_binary_thumb%25255B2%25255D.png?imgmax=800' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2127794245010916172.post-1882052302583419687</id><published>2011-08-15T15:29:00.001+03:00</published><updated>2011-08-15T15:31:49.918+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PlayAttend'/><category scheme='http://www.blogger.com/atom/ns#' term='Git'/><category scheme='http://www.blogger.com/atom/ns#' term='MVC'/><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='Secure'/><category scheme='http://www.blogger.com/atom/ns#' term='PlayFramework'/><title type='text'>Attendance sample application in PlayFramework – Part 1</title><content type='html'>&lt;p&gt;Hi,&lt;/p&gt;  &lt;p&gt;Recently I found out a new Java framework which actually suck less than Java overall I think, because it uses the same kind of system as Rails in Ruby.&lt;/p&gt;  &lt;p&gt;For now I won’t go in too much details, but if you’d like to see the bootstrapping process for a project, and how to integrate with Secure module from PlayFramework, Attendance app, the application I’m doing for my buddy Teejay from Nigeria, is a good example.&lt;/p&gt;  &lt;p&gt;I've showed in this podcast how to create a sample PlayFramework application. Import a new site template into it, create a User model, import Secure module from PlayFramework and add authentication to the app. Set up the default database to MySQL.    &lt;br /&gt;Created sample Attendance page, and played with Groovy templates a little bit.     &lt;br /&gt;In the second part I will continue to work on Attendance page, and admin part.&lt;/p&gt; &lt;iframe height="338" src="http://player.vimeo.com/video/27706022?title=0&amp;amp;byline=0&amp;amp;portrait=0&amp;amp;color=c9ff23" frameborder="0" width="600"&gt;&lt;/iframe&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Hope soon the second part of the application will be available too.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2127794245010916172-1882052302583419687?l=udevi-community.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udevi-community.blogspot.com/feeds/1882052302583419687/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://udevi-community.blogspot.com/2011/08/attendance-sample-application-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/1882052302583419687'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/1882052302583419687'/><link rel='alternate' type='text/html' href='http://udevi-community.blogspot.com/2011/08/attendance-sample-application-in.html' title='Attendance sample application in PlayFramework – Part 1'/><author><name>Timur</name><uri>http://www.blogger.com/profile/14594716207428319651</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/_BWELgx6N3yw/S49Bi5bOhxI/AAAAAAAAAcA/Xf12ZX1FEc0/S220/Timur_face.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2127794245010916172.post-914594780647867107</id><published>2011-02-28T12:04:00.001+02:00</published><updated>2011-02-28T12:04:49.066+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='IhateJava'/><category scheme='http://www.blogger.com/atom/ns#' term='Tomcat'/><title type='text'>I hate Java #2: ClassNotFoundException ?! – Tomcat deployment</title><content type='html'>&lt;p&gt;At least once per day I have this problem with Tomcat and Eclipse.&lt;/p&gt;  &lt;p&gt;I have a library declared in my pom.xml but Tomcat strangely enough doesn’t deploy it, and at deploy I have this ClassNotFoundException, the problem is that sometimes when the stars are not arranged in one line Tomcat doesn’t deploy all the libraries into its webapps/{PROJECT_NAME} (deployment folder) folder.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_BWELgx6N3yw/TWtzL5g22hI/AAAAAAAAAis/_kQ1mKzmR9U/s1600-h/image%5B4%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_BWELgx6N3yw/TWtzMb2UqcI/AAAAAAAAAiw/ZLM-PeH-1M0/image_thumb%5B2%5D.png?imgmax=800" width="764" height="306" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Why ? I don’t know but I know instead how to solve it. First of all stop the server, remove all the apps from it.&amp;#160; &lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_BWELgx6N3yw/TWtzM0_SJzI/AAAAAAAAAi0/TnMeo7G2RRM/s1600-h/image%5B8%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh6.ggpht.com/_BWELgx6N3yw/TWtzNTbxZSI/AAAAAAAAAi4/kkMDsHRT6sk/image_thumb%5B4%5D.png?imgmax=800" width="378" height="384" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Click “Finish”.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_BWELgx6N3yw/TWtzN1h6c2I/AAAAAAAAAi8/-5RFuXrdCoI/s1600-h/image%5B12%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_BWELgx6N3yw/TWtzOTDI_yI/AAAAAAAAAjA/Jv_J0phLpp8/image_thumb%5B6%5D.png?imgmax=800" width="385" height="393" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Make a Tomcat clean.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_BWELgx6N3yw/TWtzOpNnR2I/AAAAAAAAAjE/7Nx1nACovt0/s1600-h/image%5B18%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh5.ggpht.com/_BWELgx6N3yw/TWtzPB7NmdI/AAAAAAAAAjI/Yl8-30Oh_LI/image_thumb%5B10%5D.png?imgmax=800" width="390" height="369" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;After the clean is finished add&amp;#160; removed apps back to Tomcat and run the server.&lt;/p&gt;  &lt;p&gt;As you can see I don’t have the problem now.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_BWELgx6N3yw/TWtzPnelJbI/AAAAAAAAAjM/Yplj70REWqM/s1600-h/image%5B25%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_BWELgx6N3yw/TWtzQGTflcI/AAAAAAAAAjQ/2ZJVaplR0KA/image_thumb%5B13%5D.png?imgmax=800" width="578" height="129" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Another one why I hate Java, and yes it isn’t related to Java itself but to it environment, but still I don’t fee much happier about it. This shouldn’t be like this, guys. Dear clients, take a look at IIS. Do you see something like that ? No ? Than why do I still have to choose Java ? &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2127794245010916172-914594780647867107?l=udevi-community.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udevi-community.blogspot.com/feeds/914594780647867107/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://udevi-community.blogspot.com/2011/02/i-hate-java-2-classnotfoundexception.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/914594780647867107'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/914594780647867107'/><link rel='alternate' type='text/html' href='http://udevi-community.blogspot.com/2011/02/i-hate-java-2-classnotfoundexception.html' title='I hate Java #2: ClassNotFoundException ?! – Tomcat deployment'/><author><name>Timur</name><uri>http://www.blogger.com/profile/14594716207428319651</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/_BWELgx6N3yw/S49Bi5bOhxI/AAAAAAAAAcA/Xf12ZX1FEc0/S220/Timur_face.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_BWELgx6N3yw/TWtzMb2UqcI/AAAAAAAAAiw/ZLM-PeH-1M0/s72-c/image_thumb%5B2%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2127794245010916172.post-1576551332159710516</id><published>2011-02-17T12:40:00.001+02:00</published><updated>2011-02-17T12:42:00.054+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><category scheme='http://www.blogger.com/atom/ns#' term='IhateJava'/><category scheme='http://www.blogger.com/atom/ns#' term='org.hibernate.MappingException: Unknown entity'/><title type='text'>I hate Java #1: org.hibernate.MappingException: Unknown entity</title><content type='html'>&lt;blockquote&gt;   &lt;p&gt;Well, as you might know I started learning/coding Java because I will kinda be working in production and as you might know in my first month in Java I got the idea to write a book about it. Here is how the cover would look.&lt;/p&gt;    &lt;p&gt;&lt;a href="http://lh5.ggpht.com/_BWELgx6N3yw/TVz7FX8vjtI/AAAAAAAAAik/XiAxv86enmU/s1600-h/image%5B8%5D.png"&gt;&lt;img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://lh3.ggpht.com/_BWELgx6N3yw/TVz7GEleQEI/AAAAAAAAAio/sv3ZI0M6JQ8/image_thumb%5B4%5D.png?imgmax=800" width="274" height="329" /&gt;&lt;/a&gt; &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Anyway this is not the point of this particular post. So let’s see what we got. We got a very unusual exception: &lt;em&gt;org.hibernate.MappingException: Unknown entity. &lt;/em&gt;&lt;/p&gt;  &lt;p&gt;We tried to use annotated hibernate entities, everything seemed to be nice configured in hibernate.xml but it didn’t worked. Our Hibernate should work with Spring. So I’ll put some XML’s and classes before and than I’ll tell you the solution&lt;/p&gt;  &lt;pre class="brush: xml;"&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;
&amp;lt;beans xmlns=&amp;quot;http://www.springframework.org/schema/beans&amp;quot;
    xmlns:xsi=&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot; xmlns:tx=&amp;quot;http://www.springframework.org/schema/tx&amp;quot;
    xmlns:jee=&amp;quot;http://www.springframework.org/schema/jee&amp;quot;
    xsi:schemaLocation=&amp;quot;http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
                http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.0.xsd
                http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd&amp;quot;&amp;gt;

    &amp;lt;!-- Hibernate session factory --&amp;gt;


    &amp;lt;bean id=&amp;quot;dataSource&amp;quot;
        class=&amp;quot;org.springframework.jdbc.datasource.DriverManagerDataSource&amp;quot;&amp;gt;
        &amp;lt;property name=&amp;quot;driverClassName&amp;quot; value=&amp;quot;org.postgresql.Driver&amp;quot; /&amp;gt;
        &amp;lt;property name=&amp;quot;url&amp;quot; value=&amp;quot;jdbc:postgresql://localhost:5432/testh&amp;quot; /&amp;gt;
        &amp;lt;property name=&amp;quot;username&amp;quot; value=&amp;quot;postgres&amp;quot; /&amp;gt;
        &amp;lt;property name=&amp;quot;password&amp;quot; value=&amp;quot;postgres&amp;quot; /&amp;gt;
    &amp;lt;/bean&amp;gt;


    &amp;lt;bean id=&amp;quot;sessionFactory&amp;quot;
        class=&amp;quot;org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean&amp;quot;&amp;gt;

        &amp;lt;property name=&amp;quot;dataSource&amp;quot; ref=&amp;quot;dataSource&amp;quot; /&amp;gt;
        &amp;lt;property name=&amp;quot;packagesToScan&amp;quot; value=&amp;quot;entity&amp;quot; /&amp;gt;
        
        &amp;lt;property name=&amp;quot;hibernateProperties&amp;quot;&amp;gt;
            &amp;lt;props&amp;gt;
                &amp;lt;prop key=&amp;quot;hibernate.dialect&amp;quot;&amp;gt;org.hibernate.dialect.PostgreSQLDialect&amp;lt;/prop&amp;gt;
                &amp;lt;prop key=&amp;quot;hibernate.format_sql&amp;quot;&amp;gt;true&amp;lt;/prop&amp;gt;
                &amp;lt;prop key=&amp;quot;hibernate.show_sql&amp;quot;&amp;gt;true&amp;lt;/prop&amp;gt;
                &amp;lt;prop key=&amp;quot;hibernate.hbm2ddl.auto&amp;quot;&amp;gt;update&amp;lt;/prop&amp;gt;
            &amp;lt;/props&amp;gt;
        &amp;lt;/property&amp;gt;
    &amp;lt;/bean&amp;gt;

    &amp;lt;tx:annotation-driven /&amp;gt;

    &amp;lt;bean id=&amp;quot;transactionManager&amp;quot;
        class=&amp;quot;org.springframework.orm.hibernate3.HibernateTransactionManager&amp;quot;&amp;gt;
        &amp;lt;property name=&amp;quot;sessionFactory&amp;quot; ref=&amp;quot;sessionFactory&amp;quot; /&amp;gt;
    &amp;lt;/bean&amp;gt;

    &amp;lt;!-- The Spring support for Hibernate calls --&amp;gt;
    &amp;lt;bean id=&amp;quot;hibernateTemplate&amp;quot; class=&amp;quot;org.springframework.orm.hibernate3.HibernateTemplate&amp;quot;&amp;gt;
        &amp;lt;property name=&amp;quot;sessionFactory&amp;quot; ref=&amp;quot;sessionFactory&amp;quot; /&amp;gt;
    &amp;lt;/bean&amp;gt;
&amp;lt;/beans&amp;gt;&lt;/pre&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;The property “packagesToScan” is used to indicate where the hibernate annotation entities are.&lt;/p&gt;

&lt;p&gt;Now the entity java class was like this&lt;/p&gt;

&lt;pre class="brush: java;"&gt;package entity;

import java.io.Serializable;
import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.Entity;

@Entity
@Table(name = &amp;quot;emp&amp;quot;, schema = &amp;quot;public&amp;quot;)
public class Employee implements Serializable {
    private static final long serialVersionUID = 1L;

    @Id
    @Column(name = &amp;quot;emp_userid&amp;quot;)
    private String id;

    @Column(name = &amp;quot;emp_link_date&amp;quot;)
    private Timestamp date;

    @Column(name = &amp;quot;emp_logdel&amp;quot;)
    private boolean logicalDelete;

    @Column(name = &amp;quot;emp_name&amp;quot;)
    private String name;

    @Column(name = &amp;quot;employee_surname&amp;quot;)
    private String surname;

    public Employee() {
        // TODO Auto-generated constructor stub
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Timestamp getDate() {
        return date;
    }

    public void setDate(Timestamp date) {
        this.date = date;
    }

    public boolean getLogicalDelete() {
        return logicalDelete;
    }

    public void setLogicalDelete(boolean logicalDelete) {
        this.logicalDelete = logicalDelete;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSurname() {
        return surname;
    }

    public void setSurname(String surname) {
        this.surname = surname;
    }

    public boolean isLogicalDelete() {
        return logicalDelete;
    }

}&lt;/pre&gt;

&lt;p&gt;Well I got this error which was kind of stupid:&lt;/p&gt;

&lt;p&gt;org.hibernate.MappingException: Unknown entity: entity.Employee 
  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at org.hibernate.impl.SessionFactoryImpl.getEntityPersister(SessionFactoryImpl.java:597) 

  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:68) 

  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:879) 

  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at org.hibernate.impl.SessionImpl.get(SessionImpl.java:816) 

  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at org.hibernate.impl.SessionImpl.get(SessionImpl.java:809) 

  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at com.givaudan.persistence.UserDaoBean.getUserById(UserDaoBean.java:12) 

  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at com.givaudan.masterdata.service.UserRightsServiceBean.getUserById(UserRightsServiceBean.java:12) 

  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at service.UserRightsServiceTest.testGetUserById(UserRightsServiceTest.java:28) 

  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 

  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 

  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 

  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at java.lang.reflect.Method.invoke(Method.java:597) 

  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at org.springframework.test.context.junit4.SpringTestMethod.invoke(SpringTestMethod.java:160) 

  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at org.springframework.test.context.junit4.SpringMethodRoadie.runTestMethod(SpringMethodRoadie.java:233) 

  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at org.springframework.test.context.junit4.SpringMethodRoadie$RunBeforesThenTestThenAfters.run(SpringMethodRoadie.java:333) 

  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at org.springframework.test.context.junit4.SpringMethodRoadie.runWithRepetitions(SpringMethodRoadie.java:217) 

  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at org.springframework.test.context.junit4.SpringMethodRoadie.runTest(SpringMethodRoadie.java:197) 

  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at org.springframework.test.context.junit4.SpringMethodRoadie.run(SpringMethodRoadie.java:143) 

  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.invokeTestMethod(SpringJUnit4ClassRunner.java:160) 

  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51) 

  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44) 

  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27) 

  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37) 

  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42) 

  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:97) 

  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:49) 

  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) 

  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) 

  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) 

  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) 

  &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) &lt;/p&gt;

&lt;p&gt;And I got to this blog post on the net. &lt;a href="http://thejavablog.wordpress.com/2008/05/21/orghibernatemappingexception-unknown-entity/"&gt;http://thejavablog.wordpress.com/2008/05/21/orghibernatemappingexception-unknown-entity/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now that explained everything: I shoudn’t use &lt;strong&gt;org.hibernate.annotations.Entity&lt;/strong&gt;, but&amp;#160; &lt;strong&gt;javax.persistence.Entity&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Isn’t that sweet ? For a newbie in Java it’s really hard to understand why Entity annotation which you do use at hibernate, shouldn’t be in org.hibernate.annotations.Entity, but instead in javax.persistence.Entity.&lt;/p&gt;

&lt;p&gt;Well looks like java API coders don’t like logical and simple things. And another question when I should use org.hibernate.annotations.Entity? Do I really need it with the same name in this package? &lt;/p&gt;

&lt;p&gt;Well may be someone on the Java side would explain this thing. That really would be nice.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2127794245010916172-1576551332159710516?l=udevi-community.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udevi-community.blogspot.com/feeds/1576551332159710516/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://udevi-community.blogspot.com/2011/02/i-hate-java-1-orghibernatemappingexcept.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/1576551332159710516'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/1576551332159710516'/><link rel='alternate' type='text/html' href='http://udevi-community.blogspot.com/2011/02/i-hate-java-1-orghibernatemappingexcept.html' title='I hate Java #1: org.hibernate.MappingException: Unknown entity'/><author><name>Timur</name><uri>http://www.blogger.com/profile/14594716207428319651</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/_BWELgx6N3yw/S49Bi5bOhxI/AAAAAAAAAcA/Xf12ZX1FEc0/S220/Timur_face.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_BWELgx6N3yw/TVz7GEleQEI/AAAAAAAAAio/sv3ZI0M6JQ8/s72-c/image_thumb%5B4%5D.png?imgmax=800' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2127794245010916172.post-8550310266677138445</id><published>2011-01-22T16:28:00.000+02:00</published><updated>2011-11-27T11:34:57.892+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET MVC 3'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='NUnit'/><title type='text'>ASP.NET MVC 3 Project with NUnit as Testing framework</title><content type='html'>&lt;p&gt;&lt;strong&gt;[UPDATE] Marcus has been able to make a new &lt;a href="http://blog.kimpenhaus.de/asp.net-mvc-nunit-test-template-on-visual-studio-gallery"&gt;Visual Studio Extension&lt;/a&gt; that add NUnit as an option when &lt;/strong&gt;&lt;strong&gt;selecting test framework for ASP.NET MVC 3. You can &lt;a href="http://visualstudiogallery.msdn.microsoft.com/7f3bdc82-f418-41aa-ad15-f1d6f89df47a" target="_blank"&gt;get that&lt;/a&gt; from Visual Studio gallery for free. &lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;Don’t you sometimes have this feeling when you need something that Microsoft could make out of the box?&lt;/p&gt;  &lt;p&gt;I got the same kind of idea today when I was trying to create a new ASP.NET MVC 3 website with NUnit as test framework. And I could find this page &lt;a href="http://msdn.microsoft.com/en-us/library/gg416508(v=VS.98).aspx"&gt;How to: Add a Custom ASP.NET MVC Test Framework in Visual Studio&lt;/a&gt; but the whole thing wasn’t very easy and it was indicated that you should insert some keys and values into registry.&lt;/p&gt;  &lt;p&gt;“Man, I don’t like that”, I thought, “Isn’t there an easier solution which could make it all work ?”. &lt;/p&gt;  &lt;p align="left"&gt;I googled a little bit, and I found this blog post: &lt;a href="http://blog.kimpenhaus.de/asp.net-mvc-3-with-nunit-testproject-updated-template" target="_blank"&gt;ASP.NET MVC 3 with NUnit Testproject&lt;/a&gt; written by &lt;a href="http://www.kimpenhaus.de/"&gt;Marcus Kimpenhaus&lt;/a&gt;. In the bottom of this blog post there is a link via which you can download and install the NUnit template for ASP.NET MVC 3, this template worked for x64 bit machines, but I left a comment and he was nice to update it for x86 machines too. Thanks very much Marcus this project template is invaluable when need it. I also suggested to publish this template to NuGet feed, and if this will work it would be great and you could install it directly from your NuGet console.&lt;/p&gt;  &lt;p align="left"&gt;So let’s resume what do you need to do in order to have a NUnit Test project template for your ASP.NET MVC 3 project:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;     &lt;div align="left"&gt;Go to blog post&amp;#160; &lt;a href="http://blog.kimpenhaus.de/asp.net-mvc-3-with-nunit-testproject-updated-template"&gt;ASP.NET MVC 3 with NUnit Testproject&lt;/a&gt;&amp;#160;&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="left"&gt;At the bottom of the blog post click the download link for the project template&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="left"&gt;Run install.bat as administrator, now this bat will check the type of your machine : x64 or x86 and will edit registry accordingly to that, it will also update your Visual Studio 2010 cache so please wait a little bit there&lt;/div&gt;   &lt;/li&gt;    &lt;li&gt;     &lt;div align="left"&gt;Go and thank Marcus for his work, and send a mail to ASP.NET team to include this project template in the Visual Studio SP1. After all the SP1 is coming in spring so they still have lots of time to include it.&lt;/div&gt;   &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Hope this will help someone.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2127794245010916172-8550310266677138445?l=udevi-community.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udevi-community.blogspot.com/feeds/8550310266677138445/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://udevi-community.blogspot.com/2011/01/aspnet-mvc-3-project-with-nunit-as.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/8550310266677138445'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/8550310266677138445'/><link rel='alternate' type='text/html' href='http://udevi-community.blogspot.com/2011/01/aspnet-mvc-3-project-with-nunit-as.html' title='ASP.NET MVC 3 Project with NUnit as Testing framework'/><author><name>Timur</name><uri>http://www.blogger.com/profile/14594716207428319651</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/_BWELgx6N3yw/S49Bi5bOhxI/AAAAAAAAAcA/Xf12ZX1FEc0/S220/Timur_face.png'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2127794245010916172.post-1642761153251649062</id><published>2011-01-18T23:35:00.001+02:00</published><updated>2011-01-18T23:39:43.513+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='PetShelter'/><category scheme='http://www.blogger.com/atom/ns#' term='Mercurial'/><title type='text'>Get used to Mercurial using TortoiseHg and VisualHg</title><content type='html'>&lt;p&gt;Hi, guys today I’m gonna link a little video about another &lt;a href="http://en.wikipedia.org/wiki/Distributed_Version_Control_System"&gt;Distributed Versionning Control System (DVCS)&lt;/a&gt;, Mercurial. If you don’t know that’s what I decided to use as a source control system for &lt;a href="http://petshelter.codeplex.com/"&gt;Pet Shelter&lt;/a&gt; – my learning experiment with ASP.NET MVC 3. Read more at &lt;a title="http://lnkd.in/v5uARq" href="http://lnkd.in/v5uARq"&gt;http://lnkd.in/v5uARq&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;Anyway today we’ll talk about Mercurial and TortoiseHg and a little bit about VisualHg which kinda integrates Mercurial into your usual IDE environment.&lt;/p&gt;  &lt;p&gt;So first video is from vimeo:&lt;/p&gt; &lt;iframe style="width: 671px; height: 431px" height="300" src="http://player.vimeo.com/video/10274363" frameborder="0" width="400"&gt;&lt;/iframe&gt;  &lt;p&gt;&lt;a href="http://vimeo.com/10274363"&gt;Mercurial with TortoiseHG: The Basics&lt;/a&gt; from &lt;a href="http://vimeo.com/ragingmon"&gt;ragingmon&lt;/a&gt; on &lt;a href="http://vimeo.com"&gt;Vimeo&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Another excellent video is at Rob Conery Tekpub website. Here is the link&lt;/p&gt;  &lt;p&gt;&lt;a title="http://tekpub.com/view/dotnet-oss/7" href="http://tekpub.com/view/dotnet-oss/7"&gt;http://tekpub.com/view/dotnet-oss/7&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Only a little problem to view it you need to be registered. And by the way registration literally takes 20 seconds. Please take a look at that wonderful video with the length of 34 minutes.&lt;/p&gt;  &lt;p&gt;Hope you got it. No matter how far you go, you just need to know Git or Mercurial, and may be in your next project when you’ll be using these tools you could make another video and send to me it’s link and I will share it with the people who read my blog.&lt;/p&gt;  &lt;p&gt;Take care.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2127794245010916172-1642761153251649062?l=udevi-community.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udevi-community.blogspot.com/feeds/1642761153251649062/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://udevi-community.blogspot.com/2011/01/get-used-to-mercurial-using-tortoisehg.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/1642761153251649062'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/1642761153251649062'/><link rel='alternate' type='text/html' href='http://udevi-community.blogspot.com/2011/01/get-used-to-mercurial-using-tortoisehg.html' title='Get used to Mercurial using TortoiseHg and VisualHg'/><author><name>Timur</name><uri>http://www.blogger.com/profile/14594716207428319651</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/_BWELgx6N3yw/S49Bi5bOhxI/AAAAAAAAAcA/Xf12ZX1FEc0/S220/Timur_face.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2127794245010916172.post-6849485425460381125</id><published>2011-01-10T12:11:00.001+02:00</published><updated>2011-01-10T12:11:33.240+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='Gems'/><category scheme='http://www.blogger.com/atom/ns#' term='jquery-rails'/><category scheme='http://www.blogger.com/atom/ns#' term='Rails'/><title type='text'>Create a sample Rails 3 application running with JQuery</title><content type='html'>&lt;p&gt;Hi guys,&lt;/p&gt;  &lt;p&gt;Today I’m going to show you how to combine the power of Rails 3 with JQuery.&lt;/p&gt;  &lt;p&gt;By default Rails 3 comes with Prototype, but let’s say I don’t know Prototype (I really don’t … a good topic for homework), but I still need to use Javascript in my brand new application and I know JQuery, or may be I need JQuery UI components, for example a &lt;a href="http://jqueryui.com/demos/datepicker/"&gt;DateTime picker&lt;/a&gt;,&amp;#160; than all I need to do is combine JQuery and Rails 3 right ? Yeah so let’s try it manually.&lt;/p&gt;  &lt;p&gt;&lt;font size="3"&gt;1.&amp;#160;&amp;#160; First of al we need to create a brand new Rails 3 app :&lt;/font&gt;&lt;/p&gt;  &lt;pre class="brush: plain;"&gt;$ rails new jquery_demo_app -J
      create
      create  README
      create  Rakefile
      create  config.ru
      create  .gitignore
      create  Gemfile
      create  app
      create  app/controllers/application_controller.rb
      create  app/helpers/application_helper.rb
      create  app/mailers
      create  app/models
      create  app/views/layouts/application.html.erb
      create  config
      create  config/routes.rb
      create  config/application.rb
      create  config/environment.rb
      create  config/environments
      create  config/environments/development.rb
      create  config/environments/production.rb
      create  config/environments/test.rb
      create  config/initializers
      create  config/initializers/backtrace_silencers.rb
      create  config/initializers/inflections.rb
      create  config/initializers/mime_types.rb
      create  config/initializers/secret_token.rb
      create  config/initializers/session_store.rb
      create  config/locales
      create  config/locales/en.yml
      create  config/boot.rb
      create  config/database.yml
      create  db
      create  db/seeds.rb
      create  doc
      create  doc/README_FOR_APP
      create  lib
      create  lib/tasks
      create  lib/tasks/.gitkeep
      create  log
      create  log/server.log
      create  log/production.log
      create  log/development.log
      create  log/test.log
      create  public
      create  public/404.html
      create  public/422.html
      create  public/500.html
      create  public/favicon.ico
      create  public/index.html
      create  public/robots.txt
      create  public/images
      create  public/images/rails.png
      create  public/stylesheets
      create  public/stylesheets/.gitkeep
      create  public/javascripts
      create  public/javascripts/.gitkeep
      create  public/javascripts/application.js
      create  script
      create  script/rails
      create  test
      create  test/fixtures
      create  test/functional
      create  test/integration
      create  test/performance/browsing_test.rb
      create  test/test_helper.rb
      create  test/unit
      create  tmp
      create  tmp/sessions
      create  tmp/sockets
      create  tmp/cache
      create  tmp/pids
      create  vendor/plugins
      create  vendor/plugins/.gitkeep&lt;/pre&gt;

&lt;p&gt;That “-J” option tells Rails that we don’t need Javascript stuff generated.&lt;/p&gt;

&lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; margin: 0px 0px 0px 40px; display: inline; border-top: 0px; border-right: 0px" title="Application before adding jquery" border="0" alt="Application before adding jquery" src="http://lh4.ggpht.com/_BWELgx6N3yw/TSrbUJOp4CI/AAAAAAAAAiU/nEntQA2YgCQ/appBeforeAddingJQuery%5B6%5D.png?imgmax=800" width="180" height="461" /&gt; &lt;/p&gt;

&lt;p&gt;&lt;font size="3"&gt;2.&amp;#160;&amp;#160; Next we need to download the latest Jquery version minified and put it under the &lt;strong&gt;public/javascripts&lt;/strong&gt; folder.&lt;/font&gt;&lt;/p&gt;

&lt;blockquote&gt;&lt;/blockquote&gt;

&lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; So all we need is to copy and paste the text from &lt;a title="http://code.jquery.com/jquery-latest.min.js" href="http://code.jquery.com/jquery-latest.min.js"&gt;http://code.jquery.com/jquery-latest.min.js&lt;/a&gt; to &lt;strong&gt;jquery.js&lt;/strong&gt; file.&lt;/p&gt;

&lt;p&gt;&lt;font size="3"&gt;3.&amp;#160;&amp;#160; Next we need to copy latest Rails Jquery drivers and put it under &lt;strong&gt;public/javascripts&lt;/strong&gt; too.&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; So we go to &lt;a href="https://github.com/rails/jquery-ujs/blob/master/src/rails.js"&gt;https://github.com/rails/jquery-ujs/blob/master/src/rails.js&lt;/a&gt; click on raw link and copy it to &lt;strong&gt;rails.js&lt;/strong&gt; file.&lt;/p&gt;

&lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; margin: 0px 0px 0px 30px; display: inline; border-top: 0px; border-right: 0px" title="JQuery UJS driver" border="0" alt="JQuery UJS driver" src="http://lh6.ggpht.com/_BWELgx6N3yw/TSrbUkFxHcI/AAAAAAAAAiY/CfmhZzaAK3k/jquery-ujs%5B8%5D.png?imgmax=800" width="644" height="148" /&gt; &lt;/p&gt;

&lt;p&gt;These 2 steps can be done in one shot using curl tool.&lt;/p&gt;

&lt;pre class="brush: plain;"&gt;$ cd jquery_demo_app/
$ cd public/javascripts/
$ curl http://code.jquery.com/jquery-latest.min.js &amp;gt; jquery.js
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 78601  100 78601    0     0   181k      0 --:--:-- --:--:-- --:--:--  213k

$ curl https://github.com/rails/jquery-ujs/raw/master/src/rails.js &amp;gt; rails.js
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  4150  100  4150    0     0   4429      0 --:--:-- --:--:-- --:--:--  5313

$ ls    
application.js  jquery.js  rails.js &lt;/pre&gt;

&lt;p&gt;&lt;font size="3"&gt;4.&amp;#160;&amp;#160; And the last thing is to edit in config/application.rb file these lines&lt;/font&gt;&lt;/p&gt;

&lt;pre class="brush: plain;"&gt;# JavaScript files you want as :defaults (application.js is always included).
config.action_view.javascript_expansions[:defaults] = %w()&lt;/pre&gt;

&lt;p&gt;We need to include jquery.js and rails.js into defaults. And optionally you could specify CDN network but this isn’t always required.&lt;/p&gt;

&lt;pre class="brush: plain;"&gt;config.action_view.javascript_expansions[:defaults] = %w(jquery rails)
config.action_view.javascript_expansions[:cdn] = %w(https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js rails)&lt;/pre&gt;

&lt;p&gt;As you can see there are a lot of steps which should be repeated for each application where we want to use JQuery. &lt;/p&gt;

&lt;p&gt;Fortunately enough we have another solution.&lt;/p&gt;

&lt;h5&gt;Gem “jquery-rails”&lt;/h5&gt;

&lt;p&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="jquery-rails" border="0" alt="jquery-rails" src="http://lh3.ggpht.com/_BWELgx6N3yw/TSrbVFowPmI/AAAAAAAAAic/qFsBSt4nBRw/jquery-rails%5B12%5D.png?imgmax=800" width="711" height="253" /&gt; &lt;/p&gt;

&lt;p&gt;There is a gem created &lt;a href="https://github.com/indirect/jquery-rails"&gt;https://github.com/indirect/jquery-rails&lt;/a&gt; which will help us to avoid repeating these steps over and over again. &lt;/p&gt;

&lt;p&gt;Let’s experiment with another new application.&lt;/p&gt;

&lt;p&gt;Add jquery-rails into our Gemfile. &lt;/p&gt;

&lt;p&gt;And run bundle install command. And you could also commit it to a git repo, so if something goes wrong you could revert to initial version.&lt;/p&gt;

&lt;pre class="brush: plain;"&gt;$ rails new another_jquery_app

# In Gemfile add this line
gem 'jquery-rails'

$ bundle install
Fetching source index for http://rubygems.org/
.
.
.
Using jquery-rails (0.2.6)
.
.
.
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.

$ git init
$ git add .
$ git commit -am &amp;quot;Initial commit&amp;quot;&lt;/pre&gt;

&lt;p&gt;Now let’s install jquery&lt;/p&gt;

&lt;pre class="brush: plain; collapse: true;"&gt;$ rails generate jquery:install
      remove  public/javascripts/controls.js
      remove  public/javascripts/dragdrop.js
      remove  public/javascripts/effects.js
      remove  public/javascripts/prototype.js
    fetching  jQuery (1.4.4)
      create  public/javascripts/jquery.js
      create  public/javascripts/jquery.min.js
    fetching  jQuery UJS adapter (github HEAD)
c:/Ruby192/lib/ruby/1.9.1/net/http.rb:677:in `connect': SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate
ed (OpenSSL::SSL::SSLError)
        from c:/Ruby192/lib/ruby/1.9.1/net/http.rb:677:in `connect'
        from c:/Ruby192/lib/ruby/1.9.1/net/http.rb:637:in `do_start'
        from c:/Ruby192/lib/ruby/1.9.1/net/http.rb:626:in `start'
        from c:/Ruby192/lib/ruby/1.9.1/open-uri.rb:306:in `open_http'
        from c:/Ruby192/lib/ruby/1.9.1/open-uri.rb:769:in `buffer_open'
        from c:/Ruby192/lib/ruby/1.9.1/open-uri.rb:203:in `block in open_loop'
        from c:/Ruby192/lib/ruby/1.9.1/open-uri.rb:201:in `catch'
        from c:/Ruby192/lib/ruby/1.9.1/open-uri.rb:201:in `open_loop'
        from c:/Ruby192/lib/ruby/1.9.1/open-uri.rb:146:in `open_uri'
        from c:/Ruby192/lib/ruby/1.9.1/open-uri.rb:671:in `open'
        from c:/Ruby192/lib/ruby/1.9.1/open-uri.rb:33:in `open'
        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/actions/file_manipulation.rb:77:in `get'
        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/jquery-rails-0.2.6/lib/generators/jquery/install/install_generator.rb:34:in `download_ujs
        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/task.rb:22:in `run'
        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/invocation.rb:118:in `invoke_task'
        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `block in invoke_all'
        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `each'
        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `map'
        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/invocation.rb:124:in `invoke_all'
        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/group.rb:226:in `dispatch'
        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/thor-0.14.6/lib/thor/base.rb:389:in `start'
        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/generators.rb:163:in `invoke'
        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/commands/generate.rb:10:in `&amp;lt;top (required)&amp;gt;'
        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'
        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `block in require'
        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:225:in `block in load_dependency'
        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:596:in `new_constants_in'
        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:225:in `load_dependency'
        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.3/lib/active_support/dependencies.rb:239:in `require'
        from c:/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails/commands.rb:17:in `&amp;lt;top (required)&amp;gt;'
        from script/rails:6:in `require'
        from script/rails:6:in `&amp;lt;main&amp;gt;'&lt;/pre&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;Because I use Windows I got this &lt;strong&gt;“certificate verify failed (OpenSSL::SSL::SSLError)”&lt;/strong&gt;. If you don’t have this error skipped to&amp;#160; I made a little research and found out that I need to point Rails to a certificate to use when dealing with HTTPS. To see more about this issue follow this link:&amp;#160; &lt;a href="http://support.github.com/discussions/repos/4714-jquery-github-ssl"&gt;jQuery, GitHub, SSL&lt;/a&gt;. Thanks to 19th comment author. He indicated a solution.&lt;/p&gt;

&lt;p&gt;So all we need to do is copy file from &lt;a href="https://github.com/Shopify/active_merchant/blob/master/lib/certs/cacert.pem"&gt;https://github.com/Shopify/active_merchant/blob/master/lib/certs/cacert.pem&lt;/a&gt; somewhere locally and than indicate this URI in C:\Ruby\Ruby192\lib\ruby\1.9.1\open_uri.rb around line 289 &lt;/p&gt;

&lt;pre class="brush: plain; highlight: [3];"&gt;http.use_ssl = true
http.verify_mode = options[:ssl_verify_mode] || OpenSSL::SSL::VERIFY_PEER
http.ca_file = 'C:\Ruby\certs\cacert.pem' # you should indicate where you’ve set your file locally
store = OpenSSL::X509::Store.new&lt;/pre&gt;

&lt;p&gt;Now let’s try again. Before we try again we’ll need to checkout the version before error occurred.&lt;/p&gt;

&lt;pre class="brush: plain;"&gt;$ git checkout -f

$ rails generate jquery:install
      remove  public/javascripts/controls.js
      remove  public/javascripts/dragdrop.js
      remove  public/javascripts/effects.js
      remove  public/javascripts/prototype.js
    fetching  jQuery (1.4.4)
   identical  public/javascripts/jquery.js
   identical  public/javascripts/jquery.min.js
    fetching  jQuery UJS adapter (github HEAD)
    conflict  public/javascripts/rails.js
Overwrite d:/rails_tutorial_projects/another_jquery_app/public/javascripts/rails
.js? (enter &amp;quot;h&amp;quot; for help) [Ynaqdh] Y
       force  public/javascripts/rails.js&lt;/pre&gt;

&lt;p&gt;Now your application is using JQuery instead of Prototype and all we needed to do is use this little useful gem and I encourage you to use it also.&lt;/p&gt;

&lt;p&gt;By the way if you need JQuery ui installed just use &lt;/p&gt;

&lt;pre class="brush: plain;"&gt;$ rails generate jquery:install --ui&lt;/pre&gt;

&lt;p&gt;So that is how you can use Rails 3 with JQuery instead of Prototype. Take care.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2127794245010916172-6849485425460381125?l=udevi-community.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udevi-community.blogspot.com/feeds/6849485425460381125/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://udevi-community.blogspot.com/2011/01/create-sample-rails-3-application.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/6849485425460381125'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/6849485425460381125'/><link rel='alternate' type='text/html' href='http://udevi-community.blogspot.com/2011/01/create-sample-rails-3-application.html' title='Create a sample Rails 3 application running with JQuery'/><author><name>Timur</name><uri>http://www.blogger.com/profile/14594716207428319651</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/_BWELgx6N3yw/S49Bi5bOhxI/AAAAAAAAAcA/Xf12ZX1FEc0/S220/Timur_face.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/_BWELgx6N3yw/TSrbUJOp4CI/AAAAAAAAAiU/nEntQA2YgCQ/s72-c/appBeforeAddingJQuery%5B6%5D.png?imgmax=800' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2127794245010916172.post-2674576068400050269</id><published>2011-01-06T23:58:00.001+02:00</published><updated>2011-01-06T23:58:51.754+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Git'/><title type='text'>Git in Action</title><content type='html'>&lt;p&gt;Hi, guys found this amazing and quite simple video about using Git. Take a look.&lt;/p&gt; &lt;iframe height="300" src="http://player.vimeo.com/video/16395537" frameborder="0" width="400"&gt;&lt;/iframe&gt;  &lt;p&gt;&lt;a href="http://vimeo.com/16395537"&gt;Git Screencast: Git in Action&lt;/a&gt; from &lt;a href="http://vimeo.com/ralfebert"&gt;Ralf Ebert&lt;/a&gt; on &lt;a href="http://vimeo.com"&gt;Vimeo&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Give thumbs up to this post if you liked it and please comment about what do you also want to see in my blog.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2127794245010916172-2674576068400050269?l=udevi-community.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udevi-community.blogspot.com/feeds/2674576068400050269/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://udevi-community.blogspot.com/2011/01/git-in-action.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/2674576068400050269'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/2674576068400050269'/><link rel='alternate' type='text/html' href='http://udevi-community.blogspot.com/2011/01/git-in-action.html' title='Git in Action'/><author><name>Timur</name><uri>http://www.blogger.com/profile/14594716207428319651</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/_BWELgx6N3yw/S49Bi5bOhxI/AAAAAAAAAcA/Xf12ZX1FEc0/S220/Timur_face.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2127794245010916172.post-8201399410207094946</id><published>2010-12-11T10:39:00.001+02:00</published><updated>2010-12-11T10:41:15.052+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ruby challenge 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='Git'/><category scheme='http://www.blogger.com/atom/ns#' term='Rails'/><title type='text'>Ruby Challenge 2010: Creating first application and working with Git</title><content type='html'>&lt;p&gt;Hi all one more time,&lt;/p&gt;  &lt;p&gt;Last time we stopped by installing Rails. Let’s check one more time it’s current version&lt;/p&gt;  &lt;pre class="brush: plain;"&gt;C:\Users\Monomachus&amp;gt;rails --version
Rails 3.0.3&lt;/pre&gt;

&lt;p&gt;You can notice that from the last time we talked about it Rails version changed from 3.0.1 to 3.0.3. That’s because I’ve updated my system.&lt;/p&gt;

&lt;p&gt;Now lets create a new application with Rails. We can do it by using “rails new &lt;em&gt;name_of_the_application&lt;/em&gt;” command&lt;/p&gt;

&lt;pre class="brush: plain; collapse: true;"&gt;D:\rails_tutorial_project&amp;gt;rails new first_application
      create
      create  README
      create  Rakefile
      create  config.ru
      create  .gitignore
      create  Gemfile
      create  app
      create  app/controllers/application_controller.rb
      create  app/helpers/application_helper.rb
      create  app/mailers
      create  app/models
      create  app/views/layouts/application.html.erb
      create  config
      create  config/routes.rb
      create  config/application.rb
      create  config/environment.rb
      create  config/environments
      create  config/environments/development.rb
      create  config/environments/production.rb
      create  config/environments/test.rb
      create  config/initializers
      create  config/initializers/backtrace_silencers.rb
      create  config/initializers/inflections.rb
      create  config/initializers/mime_types.rb
      create  config/initializers/secret_token.rb
      create  config/initializers/session_store.rb
      create  config/locales
      create  config/locales/en.yml
      create  config/boot.rb
      create  config/database.yml
      create  db
      create  db/seeds.rb
      create  doc
      create  doc/README_FOR_APP
      create  lib
      create  lib/tasks
      create  lib/tasks/.gitkeep
      create  log
      create  log/server.log
      create  log/production.log
      create  log/development.log
      create  log/test.log
      create  public
      create  public/404.html
      create  public/422.html
      create  public/500.html
      create  public/favicon.ico
      create  public/index.html
      create  public/robots.txt
      create  public/images
      create  public/images/rails.png
      create  public/stylesheets
      create  public/stylesheets/.gitkeep
      create  public/javascripts
      create  public/javascripts/application.js
      create  public/javascripts/controls.js
      create  public/javascripts/dragdrop.js
      create  public/javascripts/effects.js
      create  public/javascripts/prototype.js
      create  public/javascripts/rails.js
      create  script
      create  script/rails
      create  test
      create  test/fixtures
      create  test/functional
      create  test/integration
      create  test/performance/browsing_test.rb
      create  test/test_helper.rb
      create  test/unit
      create  tmp
      create  tmp/sessions
      create  tmp/sockets
      create  tmp/cache
      create  tmp/pids
      create  vendor/plugins
      create  vendor/plugins/.gitkeep&lt;/pre&gt;

&lt;p&gt;Will get to each of those files in this series posts, this is what I hope at least to achieve. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Tip of the day: &lt;/em&gt;&lt;strong&gt;.gitignore&lt;/strong&gt;&lt;em&gt; file is used to let git know what kind of files we don’t want to add/commit to repository&lt;/em&gt;&amp;#160; &lt;/p&gt;

&lt;p&gt;Ok, so we got everything created now and rails made for us a brand new application which should already work so let’s try it with “rails server” command. First we need to cd into the new created directory. &lt;/p&gt;

&lt;p&gt;And I got error at first&lt;/p&gt;

&lt;p&gt;&lt;a href="http://lh3.ggpht.com/_BWELgx6N3yw/TQM4ubrmMXI/AAAAAAAAAh0/U01b8NkZVyU/s1600-h/railsStartError%5B3%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="railsStartError" border="0" alt="railsStartError" src="http://lh3.ggpht.com/_BWELgx6N3yw/TQM4uypYmgI/AAAAAAAAAh4/-8vrVudXVmg/railsStartError_thumb%5B1%5D.png?imgmax=800" width="381" height="149" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p align="left"&gt;And these errors in command line&lt;/p&gt;

&lt;pre class="brush: plain; collapse: true;"&gt;D:\rails_tutorial_project\first_application&amp;gt;rails server
C:/rubies/Ruby192/lib/ruby/gems/1.9.1/gems/sqlite3-ruby-1.3.2-x86-mingw32/lib/sq
lite3.rb:6:in `require': no such file to load -- sqlite3/sqlite3_native (LoadErr
or)
        from C:/rubies/Ruby192/lib/ruby/gems/1.9.1/gems/sqlite3-ruby-1.3.2-x86-m
ingw32/lib/sqlite3.rb:6:in `rescue in &amp;lt;top (required)&amp;gt;'
        from C:/rubies/Ruby192/lib/ruby/gems/1.9.1/gems/sqlite3-ruby-1.3.2-x86-m
ingw32/lib/sqlite3.rb:2:in `&amp;lt;top (required)&amp;gt;'
        from C:/rubies/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundle
r/runtime.rb:64:in `require'
        from C:/rubies/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundle
r/runtime.rb:64:in `block (2 levels) in require'
        from C:/rubies/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundle
r/runtime.rb:62:in `each'
        from C:/rubies/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundle
r/runtime.rb:62:in `block in require'
        from C:/rubies/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundle
r/runtime.rb:51:in `each'
        from C:/rubies/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundle
r/runtime.rb:51:in `require'
        from C:/rubies/Ruby192/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundle
r.rb:112:in `require'
        from D:/rails_tutorial_project/first_application/config/application.rb:7
:in `&amp;lt;top (required)&amp;gt;'
        from C:/rubies/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails
/commands.rb:28:in `require'
        from C:/rubies/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails
/commands.rb:28:in `block in &amp;lt;top (required)&amp;gt;'
        from C:/rubies/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails
/commands.rb:27:in `tap'
        from C:/rubies/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails
/commands.rb:27:in `&amp;lt;top (required)&amp;gt;'
        from script/rails:6:in `require'
        from script/rails:6:in `&amp;lt;main&amp;gt;'&lt;/pre&gt;

&lt;p&gt;After poking a little bit on forums I saw that I need to download the latest version of Sqlite dll’s and put them into my “ruby\bin” folder. Ok no problems, let’s do it. So you can download it &lt;a href="http://www.sqlite.org/download.html"&gt;here&lt;/a&gt;. &lt;/p&gt;

&lt;p align="left"&gt;&lt;a href="http://lh5.ggpht.com/_BWELgx6N3yw/TQM4vx7yS-I/AAAAAAAAAh8/Ve13OFE1FYA/s1600-h/sqliteDownloads%5B3%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="sqliteDownloads" border="0" alt="sqliteDownloads" src="http://lh3.ggpht.com/_BWELgx6N3yw/TQM4wfCGXeI/AAAAAAAAAiA/dQJc4ENK6JM/sqliteDownloads_thumb%5B1%5D.png?imgmax=800" width="640" height="147" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Downloaded, unziped, xcopied into ruby\bin folder. Let’s try again.&lt;/p&gt;

&lt;pre class="brush: plain;"&gt;D:\rails_tutorial_project\first_application&amp;gt;rails server
=&amp;gt; Booting WEBrick
=&amp;gt; Rails 3.0.3 application starting in development on http://0.0.0.0:3000
=&amp;gt; Call with -d to detach
=&amp;gt; Ctrl-C to shutdown server
[2010-12-11 10:00:40] INFO  WEBrick 1.3.1
[2010-12-11 10:00:40] INFO  ruby 1.9.2 (2010-08-18) [i386-mingw32]
[2010-12-11 10:00:44] INFO  WEBrick::HTTPServer#start: pid=3560 port=3000&lt;/pre&gt;

&lt;p&gt;Ok so now that works fine.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://lh3.ggpht.com/_BWELgx6N3yw/TQM4w-QcOaI/AAAAAAAAAiE/IqUbrj1AIHU/s1600-h/runningServer%5B5%5D.png"&gt;&lt;img style="background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px" title="runningServer" border="0" alt="runningServer" src="http://lh5.ggpht.com/_BWELgx6N3yw/TQM4xkivSkI/AAAAAAAAAiI/82pBz2x-oWc/runningServer_thumb%5B3%5D.png?imgmax=800" width="636" height="462" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;font size="3"&gt;P.S. Anyone knows how to run the server and then to detach in windows it also gives me an error in Windows when I try to use “rails server –d” &lt;/font&gt;&lt;/p&gt;

&lt;pre class="brush: plain; collapse: true;"&gt;D:\rails_tutorial_project\first_application&amp;gt;rails server -d
=&amp;gt; Booting WEBrick
=&amp;gt; Rails 3.0.3 application starting in development on http://0.0.0.0:3000
C:/rubies/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.3/lib/active_suppor
t/core_ext/process/daemon.rb:3:in `fork': fork() function is unimplemented on th
is machine (NotImplementedError)
        from C:/rubies/Ruby192/lib/ruby/gems/1.9.1/gems/activesupport-3.0.3/lib/
active_support/core_ext/process/daemon.rb:3:in `daemon'
        from C:/rubies/Ruby192/lib/ruby/gems/1.9.1/gems/rack-1.2.1/lib/rack/serv
er.rb:262:in `daemonize_app'
        from C:/rubies/Ruby192/lib/ruby/gems/1.9.1/gems/rack-1.2.1/lib/rack/serv
er.rb:202:in `start'
        from C:/rubies/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails
/commands/server.rb:65:in `start'
        from C:/rubies/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails
/commands.rb:30:in `block in &amp;lt;top (required)&amp;gt;'
        from C:/rubies/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails
/commands.rb:27:in `tap'
        from C:/rubies/Ruby192/lib/ruby/gems/1.9.1/gems/railties-3.0.3/lib/rails
/commands.rb:27:in `&amp;lt;top (required)&amp;gt;'
        from script/rails:6:in `require'
        from script/rails:6:in `&amp;lt;main&amp;gt;'&lt;/pre&gt;

&lt;h6&gt;&lt;font size="2"&gt;WORKING WITH GIT&lt;/font&gt;&lt;/h6&gt;

&lt;p&gt;Ok now let’s try to work a little bit with git. I’ll be using now the “Git Bash” command line.&lt;/p&gt;

&lt;pre class="brush: plain;"&gt;$ git init                // initilize the repository
$ git add .               // adds everything to repository
$ git commit -m &amp;quot;First commit&amp;quot; // make initial commit&lt;/pre&gt;

&lt;p&gt;So here everything should be clear. In git commit command &lt;strong&gt;&lt;em&gt;–m&lt;/em&gt;&lt;/strong&gt; means specifying message.&lt;/p&gt;

&lt;p&gt;Now we can check the logs&lt;/p&gt;

&lt;pre class="brush: plain;"&gt;Monomachus@MONOMACHUS-PC /d/rails_tutorial_project/first_application (master)
$ git log
commit 24d181eef79f1c6bd28898bcb0a587ff04a73dca
Author: unknown &amp;lt;Monomachus@.(none)&amp;gt;
Date:   Sat Dec 11 10:12:55 2010 +0200

    First commit

&lt;/pre&gt;

&lt;font face="Helvetica"&gt;Now let’s see how can we checkout but first let’s delete some important file (Gemfile for example) and verify the status of git.&lt;/font&gt;

&lt;pre class="brush: plain;"&gt;Monomachus@MONOMACHUS-PC /d/rails_tutorial_project/first_application (master)
$ rm Gemfile*

Monomachus@MONOMACHUS-PC /d/rails_tutorial_project/first_application (master)
$ ls
README    app     config.ru  doc  log     script  tmp
Rakefile  config  db         lib  public  test    vendor

Monomachus@MONOMACHUS-PC /d/rails_tutorial_project/first_application (master)
$ git status
# On branch master
# Changed but not updated:
#   (use &amp;quot;git add/rm &amp;lt;file&amp;gt;...&amp;quot; to update what will be committed)
#   (use &amp;quot;git checkout -- &amp;lt;file&amp;gt;...&amp;quot; to discard changes in working directory)
#
#       deleted:    Gemfile
#       deleted:    Gemfile.lock
#
no changes added to commit (use &amp;quot;git add&amp;quot; and/or &amp;quot;git commit -a&amp;quot;)

Monomachus@MONOMACHUS-PC /d/rails_tutorial_project/first_application (master)
$ git checkout -f

Monomachus@MONOMACHUS-PC /d/rails_tutorial_project/first_application (master)
$ ls
Gemfile       README    app     config.ru  doc  log     script  tmp
Gemfile.lock  Rakefile  config  db         lib  public  test    vendor&lt;/pre&gt;

&lt;p&gt;&amp;#160;&lt;/p&gt;

&lt;p&gt;So you can see here that using “git status” command we checked out the status of repository and with “git checkout –f” command we made a forced checkout and restored everything as it was before.&lt;/p&gt;

&lt;p&gt;&lt;font size="3" face="Arial"&gt;It’s all for today. Next time we’ll play a little with Github and Heroku. I hope you liked it.&lt;/font&gt;&lt;/p&gt;

&lt;p&gt;&lt;font size="2" face="Arial"&gt;&amp;#160;&lt;/font&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2127794245010916172-8201399410207094946?l=udevi-community.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udevi-community.blogspot.com/feeds/8201399410207094946/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://udevi-community.blogspot.com/2010/12/ruby-challenge-2010-creating-first.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/8201399410207094946'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/8201399410207094946'/><link rel='alternate' type='text/html' href='http://udevi-community.blogspot.com/2010/12/ruby-challenge-2010-creating-first.html' title='Ruby Challenge 2010: Creating first application and working with Git'/><author><name>Timur</name><uri>http://www.blogger.com/profile/14594716207428319651</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/_BWELgx6N3yw/S49Bi5bOhxI/AAAAAAAAAcA/Xf12ZX1FEc0/S220/Timur_face.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_BWELgx6N3yw/TQM4uypYmgI/AAAAAAAAAh4/-8vrVudXVmg/s72-c/railsStartError_thumb%5B1%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2127794245010916172.post-1980334844385483610</id><published>2010-11-15T12:20:00.001+02:00</published><updated>2010-11-15T12:33:45.333+02:00</updated><title type='text'>Climate Change – Think about it for a second</title><content type='html'>&lt;p&gt;At least change electricity bulbs in your house. Everyone should be involved. Thumbs up the video.&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:341795af-458e-4250-8272-ad87fc26b084" class="wlWriterEditableSmartContent"&gt;&lt;div id="cdd97c16-d5e3-40b7-b7a0-163f4b107333" style="margin: 0px; padding: 0px; display: inline;"&gt;&lt;div&gt;&lt;a href="http://www.youtube.com/watch?v=FXntPfWi8H0&amp;amp;feature=related" target="_new"&gt;&lt;img src="http://lh3.ggpht.com/_BWELgx6N3yw/TOEJZ3_28aI/AAAAAAAAAhg/prof1eX0J-w/videodd5c8c5c3736%5B21%5D.jpg?imgmax=800" style="border-style: none" galleryimg="no" onload="var downlevelDiv = document.getElementById('cdd97c16-d5e3-40b7-b7a0-163f4b107333'); downlevelDiv.innerHTML = &amp;quot;&amp;lt;div&amp;gt;&amp;lt;object width=\&amp;quot;640\&amp;quot; height=\&amp;quot;360\&amp;quot;&amp;gt;&amp;lt;param name=\&amp;quot;movie\&amp;quot; value=\&amp;quot;http://www.youtube.com/v/FXntPfWi8H0?hl=en&amp;amp;hd=1\&amp;quot;&amp;gt;&amp;lt;\/param&amp;gt;&amp;lt;embed src=\&amp;quot;http://www.youtube.com/v/FXntPfWi8H0?hl=en&amp;amp;hd=1\&amp;quot; type=\&amp;quot;application/x-shockwave-flash\&amp;quot; width=\&amp;quot;640\&amp;quot; height=\&amp;quot;360\&amp;quot;&amp;gt;&amp;lt;\/embed&amp;gt;&amp;lt;\/object&amp;gt;&amp;lt;\/div&amp;gt;&amp;quot;;" alt=""&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p align="left"&gt;Also you can check a lot of internet flash games related to eco-system. &lt;a href="http://clevergames.wordpress.com/2009/10/22/eco-games-top-list-new-%E2%80%9Cgreen%E2%80%9D-online-games-for-the-environment/"&gt;For example these games&lt;/a&gt;.&lt;/p&gt;  &lt;p align="left"&gt;There is also a game which will be out in 2011 which whole subject is Ecology and disastrous state: &lt;a href="http://www.fateoftheworld.net/"&gt;Fate of the World&lt;/a&gt;.&lt;/p&gt;  &lt;p align="left"&gt;P.S. You can comment out what exactly do you think we could do, to save the planet, but something doable which depends on us, not those big corporations.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2127794245010916172-1980334844385483610?l=udevi-community.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udevi-community.blogspot.com/feeds/1980334844385483610/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://udevi-community.blogspot.com/2010/11/climate-change-think-about-it-for.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/1980334844385483610'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/1980334844385483610'/><link rel='alternate' type='text/html' href='http://udevi-community.blogspot.com/2010/11/climate-change-think-about-it-for.html' title='Climate Change – Think about it for a second'/><author><name>Timur</name><uri>http://www.blogger.com/profile/14594716207428319651</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/_BWELgx6N3yw/S49Bi5bOhxI/AAAAAAAAAcA/Xf12ZX1FEc0/S220/Timur_face.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh3.ggpht.com/_BWELgx6N3yw/TOEJZ3_28aI/AAAAAAAAAhg/prof1eX0J-w/s72-c/videodd5c8c5c3736%5B21%5D.jpg?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2127794245010916172.post-8345352830296772829</id><published>2010-11-02T01:44:00.000+02:00</published><updated>2010-11-03T10:01:19.986+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ruby challenge 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='Git'/><category scheme='http://www.blogger.com/atom/ns#' term='Gems'/><category scheme='http://www.blogger.com/atom/ns#' term='Pik'/><category scheme='http://www.blogger.com/atom/ns#' term='Rails'/><category scheme='http://www.blogger.com/atom/ns#' term='NetBeans'/><title type='text'>Ruby Challenge 2010: Installing Ruby and its tools on Windows</title><content type='html'>&lt;p&gt;Hi, &lt;/p&gt;  &lt;p&gt;Today I decided to install all the prerequisites and to show you how I’ve done this, may be for some people it will be useful. And I’m doing it by reproducing the Rails 3.0 tutorial but for Windows.&lt;/p&gt;  &lt;h6&gt;1. Text editor / IDE&lt;/h6&gt;  &lt;p&gt;From various IDEs and Unix-style editors like vi or emacs or whatever. I decided to go with a full IDE solution so … the nominees are&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;a href="http://www.aptana.com/" target="_blank"&gt;Aptana Studio 2.0&lt;/a&gt; – standalone version &lt;/li&gt;    &lt;li&gt;&lt;a href="http://netbeans.org/downloads/index.html" target="_blank"&gt;NetBeans 6.9.1&lt;/a&gt; – ruby version &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.jetbrains.com/ruby/" target="_blank"&gt;RubyMine 2.0&lt;/a&gt; – from JetBrains (creators of Resharper, TeamCity and a lot of other cool software for programmers). &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;I wanted to go with RubyMine because I already know the difference Resharper brings in my development process, but it’s a 30-days trial, and I don’t want to switch to something new in next few months, so no. I don’t have previous experience with Aptana Studio, and may be I will try it some day, but I had a pleasant experience with NetBeans so for now I will go with that.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://netbeans.org/downloads/index.html"&gt;&lt;img title="NetBeansDownload" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="222" alt="NetBeansDownload" src="http://lh5.ggpht.com/_BWELgx6N3yw/TNAFGTwb2vI/AAAAAAAAAgA/LyI0zhftTpo/NetBeansDownload%5B4%5D.png?imgmax=800" width="378" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;h6&gt;2. Git&lt;/h6&gt;  &lt;p&gt;Ruby community uses intensely a &lt;a href="http://en.wikipedia.org/wiki/Revision_control"&gt;version control system&lt;/a&gt; called &lt;a href="http://git-scm.com/"&gt;Git&lt;/a&gt;, so I will install it too. For windows part it is very simple. You go to &lt;a href="http://code.google.com/p/msysgit/"&gt;http://code.google.com/p/msysgit/&lt;/a&gt;. Click “Downloads” and choose current version Git.exe installer.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://code.google.com/p/msysgit/"&gt;&lt;img title="DownloadingGitForWindows" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="155" alt="DownloadingGitForWindows" src="http://lh4.ggpht.com/_BWELgx6N3yw/TNAFG74UNuI/AAAAAAAAAgE/pqwQcMhCDnY/DownloadingGitForWindows%5B4%5D.png?imgmax=800" width="564" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;Install process is Windows-style - very simple as well. We don’t have to manually compile something or edit, everything goes quite simple.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_BWELgx6N3yw/TNAFHCBpSwI/AAAAAAAAAgI/4LJFl_IWY7Y/s1600-h/InstallingGit%5B3%5D.png"&gt;&lt;img title="InstallingGit" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; border-right-width: 0px" height="241" alt="InstallingGit" src="http://lh5.ggpht.com/_BWELgx6N3yw/TNAFHlLy6VI/AAAAAAAAAgM/gmzhgojQAXs/InstallingGit_thumb%5B1%5D.png?imgmax=800" width="311" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;h6&gt;3. Installing Ruby&lt;/h6&gt;  &lt;p&gt;First we need to be sure that our system doesn’t already has Ruby installed. Let’s try it.&lt;/p&gt;  &lt;pre class="brush: plain;"&gt;C:\Users\user_name&amp;gt;ruby -v
'ruby' is not recognized as an internal or external command,
operable program or batch file.&lt;/pre&gt;

&lt;p&gt;Well looks like I don’t have it installed. Not a problem. First we’ll install Ruby 1.8.7 which works well with Rails 2.3. We’ll go to &lt;a href="http://www.ruby-lang.org/en/downloads/"&gt;Download Ruby&lt;/a&gt; page search for “Ruby on Windows” section and select Ruby 1.8.7-p302 RubyInstaller. Installation goes smoothly. I associated my *.rb files with ruby and added Ruby executables to my path.&lt;/p&gt;

&lt;p&gt;Now we see this in our command line:&lt;/p&gt;

&lt;pre class="brush: plain;"&gt;C:\Users\user_name&amp;gt;ruby -v
ruby 1.8.7 (2010-08-16 patchlevel 302) [i386-mingw32]&lt;/pre&gt;

&lt;h6&gt;4. Installing and using Pik&lt;/h6&gt;

&lt;p&gt;&lt;a href="http://lh3.ggpht.com/_BWELgx6N3yw/TNAFIGM-crI/AAAAAAAAAgU/N6loEj8I95s/s1600-h/pikScreenshot%5B7%5D.png"&gt;&lt;img title="pikScreenshot" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; margin: 0px 15px 0px 0px; border-right-width: 0px" height="149" alt="pikScreenshot" src="http://lh4.ggpht.com/_BWELgx6N3yw/TNAFISgu-5I/AAAAAAAAAgY/h-30PCUhJzM/pikScreenshot_thumb%5B5%5D.png?imgmax=800" width="145" align="left" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;What is Pik? Pik is a Windows alternative to &lt;a href="http://rvm.beginrescueend.com/"&gt;Ruby Version Manager (RVM)&lt;/a&gt; which allows us to have multiple Ruby versions installed at the same time, as I said before we need Ruby 1.8.7 to work with Rails 2.3 and Ruby 1.9.2 to work with Rails 3.0.1 and Pik will help us in dealing with this. You can &lt;a href="http://github.com/vertiginous/pik/"&gt;download Pik&lt;/a&gt; from github. Also be sure to check its Wiki page &lt;a href="http://github.com/vertiginous/pik/wiki/Usage"&gt;“Usage”&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Now when we run the first time pik it adds the default Ruby path which right now points to version 1.8.7. I also set Pik default install directory to “C:\Rubies” and I also show how to add an existing ruby installation to pik with the “add” command.&lt;/p&gt;

&lt;pre class="brush: plain;"&gt;C:\Users\user_name&amp;gt;pik
** Adding:  187: ruby 1.8.7 (2010-08-16 patchlevel 302) [i386-mingw32]
 Located at:  C:\Rubies\Ruby187\bin
Usage: pik command [options]

To get help with a command

  pik help (command)

To list all commands and descriptions:

  pik help commands

    -V, --version                    Pik version
    -d, --debug                      Outputs debug information

C:\Users\user_name&amp;gt;pik config installs=&amp;quot;C:\Rubies&amp;quot;

C:\Users\user_name&amp;gt;pik add C:\Rubies\Ruby-1.9.2dev-p3-i386-mingw32\bin
** Adding:  192: ruby 1.9.2dev (2010-05-31) [i386-mingw32]
 Located at:  C:\Rubies\Ruby-1.9.2dev-p3-i386-mingw32\bin&lt;/pre&gt;

&lt;p&gt;Next I show how to install a Ruby version using “install” command. In my particular case I installed IronRuby specifying the version, and then not specifying it. When you don’t specify it then Pik downloads the latest version. (although at the moment the latest version of IronRuby is 1.1.1, don’t know what is wrong there). Than I show how to list all the available Rubies installations (note that * marks the default ruby used at the moment), how to remove a Ruby install from Pik management, and how to switch to another Ruby installation.&lt;/p&gt;

&lt;pre class="brush: plain; collapse: true;"&gt;C:\Users\user_name&amp;gt;pik install IronRuby 1.0.0
** Downloading:  http://rubyforge.org/frs/download.php/69853/ironruby-1.0.0rc.zi
p
   to:  C:\Users\user_name\.pik\downloads\ironruby-1.0.0rc.zip

ironruby-1.0.0rc.zip: 100% |ooooooooooooooooooo|   4.7MB/  4.7MB Time: 00:00:06

** Extracting:  C:\Users\user_name\.pik\downloads\ironruby-1.0.0rc.zip
   to:  C:\rubies\IronRuby-100rc
done

Couldn't find a Ruby version at C:\rubies\IronRuby-100rc\bin

C:\Users\user_name&amp;gt;pik add C:\Rubies\IronRuby-100rc\ironruby\bin
** Adding:  100: IronRuby 1.0.0.0 on .NET 2.0.50727.4454
 Located at:  C:\Rubies\IronRuby-100rc\ironruby\bin

C:\Users\user_name&amp;gt;pik install IronRuby
** Downloading:  http://rubyforge.org/frs/download.php/70181/ironruby-1.0v4.zip

   to:  C:\Users\user_name\.pik\downloads\ironruby-1.0v4.zip

ironruby-1.0v4.zip: 100% |ooooooooooooooooooooo|   2.9MB/  2.9MB Time: 00:00:04

** Extracting:  C:\Users\user_name\.pik\downloads\ironruby-1.0v4.zip
   to:  C:\rubies\IronRuby-10v4
done

** Adding:  100: IronRuby 1.0.0.0 on .NET 4.0.30319.1
 Located at:  C:\rubies\IronRuby-10v4\bin

C:\Users\user_name&amp;gt;pik remove C:\Rubies\IronRuby-100rc\ironruby\bin

Quitting...

C:\Users\user_name&amp;gt;pik help commands

  add             Adds another ruby location to pik.
  benchmark|bench Runs bencmarks with all versions that pik is aware of.
  config          Adds/modifies configuration options.
  default         Switches back to the default settings.
  devkit          Configures devkit settings
  gem             Runs the gem command with all versions that pik is aware of.
  gemsync         Synchronizes gems from the version specified to the current ve
rsion.
  help            Displays help information.
  implode         Removes your pik configuration.
  info|checkup|cu Displays information about the current ruby version.
  install|in      Downloads and installs different ruby versions.
  list|ls         Lists ruby versions that pik is aware of.
  rake            Runs the rake command with all versions that pik is aware of.
  remove|rm       Removes a ruby location from pik.
  ruby|rb         Runs ruby with all versions that pik is aware of.
  run             Runs command with all versions of ruby that pik is aware of.
  tag             Adds the given tag to the current version.
  tags            Runs the pik command against the given tags.
  uninstall|unin  Deletes a ruby version from the filesystem and removes it from
 Pik.
  update|up       updates pik.
  use|switch|sw   Switches ruby versions based on patterns.

For help on a particular command, use 'pik help COMMAND'.

C:\Users\user_name&amp;gt;pik list
  100: IronRuby 1.0.0.0 on .NET 2.0.50727.4454
  100: IronRuby 1.0.0.0 on .NET 4.0.30319.1
* 187: ruby 1.8.7 (2010-08-16 patchlevel 302) [i386-mingw32]
  192: ruby 1.9.2dev (2010-05-31) [i386-mingw32]

C:\Users\user_name&amp;gt;pik remove 100
Select which Ruby you want:
1. 100: IronRuby 1.0.0.0 on .NET 2.0.50727.4454
2. 100: IronRuby 1.0.0.0 on .NET 4.0.30319.1
?  1
Are you sure you'd like to remove '100: IronRuby 1.0.0.0 on .NET 2.0.50727.4454'
?  |yes|

100: IronRuby 1.0.0.0 on .NET 2.0.50727.4454 removed.

C:\Users\user_name&amp;gt;pik use 192

C:\Users\user_name&amp;gt;pik list
  100: IronRuby 1.0.0.0 on .NET 4.0.30319.1
  187: ruby 1.8.7 (2010-08-16 patchlevel 302) [i386-mingw32]
* 192: ruby 1.9.2dev (2010-05-31) [i386-mingw32]&lt;/pre&gt;

&lt;p&gt;The only thing that I can’t find is an alternative to RVM –create command which is often convenient to create separate &lt;em&gt;gemsets.&lt;/em&gt;&amp;#160;&lt;/p&gt;

&lt;h6&gt;5. Installing and using RubyGems&lt;/h6&gt;

&lt;p&gt;&lt;a href="http://lh3.ggpht.com/_BWELgx6N3yw/TNAFIhqYcnI/AAAAAAAAAgc/J3KnCZP-PGo/s1600-h/gems%5B5%5D.png"&gt;&lt;img title="gems" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; margin: 0px 10px 10px 0px; border-right-width: 0px" height="106" alt="gems" src="http://lh3.ggpht.com/_BWELgx6N3yw/TNAFI4Bf5II/AAAAAAAAAgg/iL0nWGotQ-g/gems_thumb%5B3%5D.png?imgmax=800" width="106" align="left" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;UPDATE: &lt;/strong&gt;&lt;em&gt;After installing any version of Ruby you already should have RubyGems installed. You can check it up by using &lt;font face="Courier New"&gt;&lt;strong&gt;“gem –v”&lt;/strong&gt;&lt;/font&gt; command. I talk about installing RubyGems here just because I was having errors with default installation of gem.&lt;/em&gt;&amp;#160; &lt;/p&gt;

&lt;p&gt;After everything done I already have gems installed but it has some errors so I will download the latest version from &lt;a href="http://rubyforge.org/frs/?group_id=126"&gt;here&lt;/a&gt;. After that you unpack it somewhere cd into its directory and say&lt;/p&gt;

&lt;pre class="brush: plain;"&gt;ruby setup.rb&lt;/pre&gt;

&lt;p&gt;Now gems should be installed. Next thing you could do is see what is your Gems environment with &lt;font face="Courier New"&gt;“gem env”&lt;/font&gt; command, or see the gems sources with &lt;font face="Courier New"&gt;“gem sources”&lt;/font&gt; command. Finally you could do &lt;font face="courier new"&gt;“gem list”&lt;/font&gt; for list of local gems, &lt;font face="Courier New"&gt;“gem list –r”&lt;/font&gt; for remote gems, and &lt;font face="Courier New"&gt;“gem list STRING”&lt;/font&gt; which will bring you the list of gems starting with string.&lt;/p&gt;

&lt;h6&gt;6. Installing Rails&lt;/h6&gt;

&lt;p&gt;&lt;a href="http://lh5.ggpht.com/_BWELgx6N3yw/TNAFJRXjF3I/AAAAAAAAAgk/vcCwTii2FTE/s1600-h/rails%5B6%5D.png"&gt;&lt;img title="rails" style="border-top-width: 0px; display: inline; border-left-width: 0px; border-bottom-width: 0px; margin: 0px 15px 10px 0px; border-right-width: 0px" height="114" alt="rails" src="http://lh4.ggpht.com/_BWELgx6N3yw/TNAFJ9NUxcI/AAAAAAAAAgo/QIML6rMpHEY/rails_thumb%5B4%5D.png?imgmax=800" width="93" align="left" border="0" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;Now having Gems installed it’s really easy to install Rails. You should just say&lt;/p&gt;

&lt;pre class="brush: plain;"&gt;gem install rails&lt;/pre&gt;

&lt;p&gt;Or &lt;/p&gt;

&lt;pre class="brush: plain;"&gt;gem install rails --version 3.0.1&lt;/pre&gt;

&lt;p&gt;Now everything should be prepared and installed. You can verify it by writing “rails –v” and have the rails version.&lt;/p&gt;

&lt;p&gt;Well that’s a lot of things to do, especially if you’re used already with Windows way of installing things. Hope this post will help someone.&lt;/p&gt;

&lt;p&gt;Next time we’ll do our first application in RoR (Ruby on Rails), so stay tuned! &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2127794245010916172-8345352830296772829?l=udevi-community.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udevi-community.blogspot.com/feeds/8345352830296772829/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://udevi-community.blogspot.com/2010/11/ruby-challenge-2010-installing-ruby-and.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/8345352830296772829'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/8345352830296772829'/><link rel='alternate' type='text/html' href='http://udevi-community.blogspot.com/2010/11/ruby-challenge-2010-installing-ruby-and.html' title='Ruby Challenge 2010: Installing Ruby and its tools on Windows'/><author><name>Timur</name><uri>http://www.blogger.com/profile/14594716207428319651</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/_BWELgx6N3yw/S49Bi5bOhxI/AAAAAAAAAcA/Xf12ZX1FEc0/S220/Timur_face.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh5.ggpht.com/_BWELgx6N3yw/TNAFGTwb2vI/AAAAAAAAAgA/LyI0zhftTpo/s72-c/NetBeansDownload%5B4%5D.png?imgmax=800' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2127794245010916172.post-3211533061773929377</id><published>2010-10-26T23:50:00.000+03:00</published><updated>2010-11-02T10:06:16.081+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ruby challenge 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='Heroku'/><category scheme='http://www.blogger.com/atom/ns#' term='Ruby'/><category scheme='http://www.blogger.com/atom/ns#' term='IronRuby'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET MVC 2.0'/><category scheme='http://www.blogger.com/atom/ns#' term='Rails'/><title type='text'>Started learning Ruby</title><content type='html'>&lt;p&gt;Hi,&lt;/p&gt;  &lt;p&gt;Today I decided to start learning Ruby on Rails 3.0.&lt;/p&gt;  &lt;p&gt;Why? Well, there are a dozen of reasons but the most important are: &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;I’ve seen and listened enough about this language and all I’ve heard are positive things, well I assume there are also some negative things like debugging for example (debugging is an issue for a lot of dynamic type languages), &lt;/li&gt;    &lt;li&gt;also I’d like to be able to make things a little bit more easy. I’d like to do it in a faster manner. I’d also like to have an alternative to .NET, because of its initial costs. &lt;/li&gt;    &lt;li&gt;Well, also it is because of one of the podcasts I listen, &lt;em&gt;&lt;a href="http://thisdeveloperslife.com/"&gt;This developer’s life&lt;/a&gt;&lt;/em&gt;. In podcast #5 &lt;a href="http://thisdeveloperslife.com/post/1270441885/1-0-5-homerun"&gt;Homerun&lt;/a&gt; Rob Conery talks with Rails creator David Heinemeier Hansson about Rails creation and about Rails in general, he seems very excited and is very confident about Rails future. Also one listening &lt;a href="http://streaming.ndc2010.no/tcs/?id=44950364-77F8-49AA-91D7-13441F398DD0"&gt;was watching the panel discussion of .NET Rocks! from NDC&lt;/a&gt; (Norwegian Developer Conference 2010). There were a lot of .NET folks and also Ruby folks as well, the panel topic was “ASP.NET MVC vs Ruby on Rails”, in the end silently everybody agreed that Ruby is simpler for startups, and it costs less (I mean you don’t need Visual Studio licenses and SQL Servers). &lt;/li&gt;    &lt;li&gt;They all talk about this great Ruby community which is willing to help you if you will have any problems at all. I want to check that out. &lt;/li&gt;    &lt;li&gt;I hope understanding more ASP.NET MVC 3 after making something practical in Ruby on Rails. &lt;/li&gt;    &lt;li&gt;We do have now DLR&amp;#160; and IronRuby 1.0 in .NET so I could use my new set of skills in my usual environment. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Now where should I start from?&lt;/p&gt;  &lt;p&gt;Assuming that I want to learn fast I found these two videos which apparently enough are very famous in Ruby world, and gave me a taste of what kind of power Ruby is:&lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:b5fd9872-b25d-42f4-bccc-734fd06f0dbd" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;   &lt;div id="046c187a-fb9d-4fc3-bc14-6910f52d9b1b" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;     &lt;div&gt;&lt;embed src="http://www.youtube.com/v/Gzj723LkRJY?hl=en&amp;amp;hd=1" width="564" height="317" type="application/x-shockwave-flash" /&gt;&lt;/div&gt;   &lt;/div&gt;    &lt;div style="clear: both; font-size: 0.8em; width: 564px"&gt;Rails creator David Heinemeier Hansson shows how to make a blog in 15 minutes using Ruby on Rails&lt;/div&gt; &lt;/div&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;And the same kind of video but using already Rails 2.0 (it has 2 parts)&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:abf2af21-b7b5-4179-89ba-21545eb4a840" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;   &lt;div id="194ee373-a008-4096-9b72-006232435bab" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;     &lt;div&gt;&lt;embed src="http://www.youtube.com/v/tUH1hewXnC0?hl=en&amp;amp;hd=1" width="407" height="227" type="application/x-shockwave-flash" /&gt;&lt;/div&gt;   &lt;/div&gt;    &lt;div style="clear: both; font-size: 0.8em; width: 407px"&gt;Creating blog in 15 minutes by Ryan Bates Part 1&lt;/div&gt; &lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:c17d2ef8-19dc-4022-80e1-e9a8dba0596b" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;   &lt;div id="6f560bb1-f263-49b7-9522-c3adc3d9bb14" style="padding-right: 0px; display: inline; padding-left: 0px; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;     &lt;div&gt;&lt;embed src="http://www.youtube.com/v/zG_mvp8u4cI?hl=en&amp;amp;hd=1" width="412" height="231" type="application/x-shockwave-flash" /&gt;&lt;/div&gt;   &lt;/div&gt;    &lt;div style="clear: both; font-size: 0.8em; width: 412px"&gt;Creating blog in 15 minutes by Ryan Bates Part 2&lt;/div&gt; &lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Now I must admit that I’ve seen it before using ASP.NET MVC but still I think it is very power. By the way the new ASP.NET MVC 3 is in beta now so you can check it out.&lt;/p&gt;  &lt;p&gt;I also found a nice site on starting Ruby on Rails 3.0 using all modern tools which are used in the community like Git, GitHub and Heroku. And because it is not too long I’ll start to read these tutorial. &lt;a href="http://railstutorial.org/book/ruby-on-rails-tutorial" target="_blank"&gt;Learn Rails by Example&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;Also to be motivated I’ll need to do something real. Because I’m playing in a strategic web game &lt;a href="http://fr.europe1400.com" target="_blank"&gt;fr.europe1400.com&lt;/a&gt;, and I’m the founder of the guild there I will try to create a web site for this guild.&lt;/p&gt;  &lt;p&gt;What should this website include:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Authentication &lt;/li&gt;    &lt;li&gt;User roles: admin, moderator, others &lt;/li&gt;    &lt;li&gt;User details &lt;/li&gt;    &lt;li&gt;Informative section: includes videos, pictures &lt;/li&gt;    &lt;li&gt;Discussion panel: which is pretty much the same as a forum or blog: someone creates a post and then someone else comment this post. &lt;/li&gt;    &lt;li&gt;Some admin only functionalities. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Well I hope it won’t take too long till this site will be up and running on Heroku. See ya, hope next time I’ll bring some code.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2127794245010916172-3211533061773929377?l=udevi-community.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udevi-community.blogspot.com/feeds/3211533061773929377/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://udevi-community.blogspot.com/2010/10/started-learning-ruby.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/3211533061773929377'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/3211533061773929377'/><link rel='alternate' type='text/html' href='http://udevi-community.blogspot.com/2010/10/started-learning-ruby.html' title='Started learning Ruby'/><author><name>Timur</name><uri>http://www.blogger.com/profile/14594716207428319651</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/_BWELgx6N3yw/S49Bi5bOhxI/AAAAAAAAAcA/Xf12ZX1FEc0/S220/Timur_face.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2127794245010916172.post-5930317901829965543</id><published>2010-10-20T01:30:00.001+03:00</published><updated>2010-10-20T01:30:59.069+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tools'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='Xslt'/><title type='text'>Tools I can’t imagine my dev life without #2: XSLT Debugger in Visual Studio</title><content type='html'>&lt;p&gt;Hi,&lt;/p&gt;  &lt;p&gt;While a lot of us .NET developers at some point in our life used XSLT, it was never easy. Of course our logic and XSLT syntax should help us to understand different things but that is not always the case. Probably because it’s almost always a black box abstraction. &lt;/p&gt;  &lt;p&gt;In my last project we use a lot of XSLT for generating all kind of documents with all kind of restrictions and filtering, usually you have an XML document, you got an XSLT and a &lt;a href="http://msdn.microsoft.com/en-us/library/system.xml.xsl.xslcompiledtransform.aspx"&gt;XslCompiledTransform&lt;/a&gt; object which you use to actually get your transformed document. But because of the thing that it is like a black box all you can do is sit back and hope you did well the XSLT thing and you’ll get needed document out of the box. At least this is what I thought until this week.&lt;/p&gt;  &lt;p&gt;This week I needed to change one of my XSLT document templates, because I was getting a very strange error at document generation. I thought at this moment that I couldn’t do it without debugging and I was &lt;em&gt;hoping &lt;/em&gt;that somewhere in the world existed a nice tool which could manage XSLT debugging and which would have at least a trial period. I googled “debug XSLT”, and guess what I found? &lt;a href="http://msdn.microsoft.com/en-us/library/ms255605(v=VS.100).aspx"&gt;This link&lt;/a&gt; which gave me the power I didn’t even imagined to have without having to install some third-party tools. &lt;/p&gt;  &lt;p&gt;It is incorporated directly in Visual Studio !!! I tried it in VS 2008 and VS 2010, Visual Studio 2010 even got a profiler for XSLT, so you could measure your transformation sheets and make reports on that. Isn’t that great? Plus you got a lot of way to do debugging. And now some screenshots.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_BWELgx6N3yw/TL4cBZN_hNI/AAAAAAAAAe8/jt-j2KKPUwA/s1600-h/DebugXslt%5B5%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="DebugXslt" border="0" alt="DebugXslt" src="http://lh4.ggpht.com/_BWELgx6N3yw/TL4cCMrBlHI/AAAAAAAAAfA/4kaPJy8S3mM/DebugXslt_thumb%5B3%5D.png?imgmax=800" width="551" height="225" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;em&gt;1. While stylesheet open click on XML =&amp;gt; Debug Xslt&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_BWELgx6N3yw/TL4cDeP-jLI/AAAAAAAAAfE/2vXVevMcmpk/s1600-h/ChooseXml%5B6%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="ChooseXml" border="0" alt="ChooseXml" src="http://lh6.ggpht.com/_BWELgx6N3yw/TL4cD_ega5I/AAAAAAAAAfI/gu_W8qjIQ0M/ChooseXml_thumb%5B4%5D.png?imgmax=800" width="515" height="376" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;em&gt;2. Choose input XML file&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh3.ggpht.com/_BWELgx6N3yw/TL4cEuF2_EI/AAAAAAAAAfM/8a73rfdHZhI/s1600-h/Debugging%5B7%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Debugging" border="0" alt="Debugging" src="http://lh5.ggpht.com/_BWELgx6N3yw/TL4cFwG_pUI/AAAAAAAAAfQ/Fj9NV1NYxzA/Debugging_thumb%5B5%5D.png?imgmax=800" width="761" height="382" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;3. Debug and actually see the magic ! In parallel you can see the output.&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;Same things could be done in VS 2010&lt;/p&gt;  &lt;p&gt;&lt;a href="http://lh6.ggpht.com/_BWELgx6N3yw/TL4cHoRl8sI/AAAAAAAAAfU/SGZ_gEuSjOg/s1600-h/Visual%20Studio%202010%5B3%5D.png"&gt;&lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="Visual Studio 2010" border="0" alt="Visual Studio 2010" src="http://lh3.ggpht.com/_BWELgx6N3yw/TL4cIXKTIdI/AAAAAAAAAfY/sm-o9E3WUD8/Visual%20Studio%202010_thumb%5B1%5D.png?imgmax=800" width="762" height="377" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;And you automatically get the html output. Plus you can always see the source of html.&lt;/p&gt;  &lt;p&gt;So get ready to a new era of XSLT debugging with all the tools you are used to: Locals, Watches, Immediate Window and others as well.&lt;/p&gt;  &lt;h6&gt;&lt;a href="http://www.humyo.com/FFYdqDF/Code4Food%20Projects/XsltDebugging.zip?a=AVnnpfRkCqE"&gt;Link for Download&lt;/a&gt;&lt;/h6&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2127794245010916172-5930317901829965543?l=udevi-community.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udevi-community.blogspot.com/feeds/5930317901829965543/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://udevi-community.blogspot.com/2010/10/tools-i-cant-imagine-my-dev-life.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/5930317901829965543'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/5930317901829965543'/><link rel='alternate' type='text/html' href='http://udevi-community.blogspot.com/2010/10/tools-i-cant-imagine-my-dev-life.html' title='Tools I can’t imagine my dev life without #2: XSLT Debugger in Visual Studio'/><author><name>Timur</name><uri>http://www.blogger.com/profile/14594716207428319651</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/_BWELgx6N3yw/S49Bi5bOhxI/AAAAAAAAAcA/Xf12ZX1FEc0/S220/Timur_face.png'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://lh4.ggpht.com/_BWELgx6N3yw/TL4cCMrBlHI/AAAAAAAAAfA/4kaPJy8S3mM/s72-c/DebugXslt_thumb%5B3%5D.png?imgmax=800' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2127794245010916172.post-1833191048194466061</id><published>2010-04-27T16:23:00.001+03:00</published><updated>2010-04-27T16:29:32.989+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='QandA'/><category scheme='http://www.blogger.com/atom/ns#' term='Bytes.com'/><category scheme='http://www.blogger.com/atom/ns#' term='CSV'/><category scheme='http://www.blogger.com/atom/ns#' term='Code4Food'/><title type='text'>Code4Food #6: How to join multiple CSV files with the same structure ?</title><content type='html'>&lt;p&gt;Hi,&lt;/p&gt;  &lt;p&gt;Reading another question on &lt;a href="http://bytes.com/topic/c-sharp/answers/886665-how-join-more-than-two-csv-file" target="_blank"&gt;Bytes.com&lt;/a&gt; I found this question. So assuming these CSV files have the same structure, I can easily join them.&lt;/p&gt;  &lt;p&gt;Now to test it I split this CSV file into 5 files: CsvFile1.csv … CsvFile5.csv&lt;/p&gt;  &lt;pre&gt;&amp;quot;REVIEW_DATE&amp;quot;,&amp;quot;AUTHOR&amp;quot;,&amp;quot;ISBN&amp;quot;,&amp;quot;DISCOUNTED_PRICE&amp;quot;
&amp;quot;1985/01/21&amp;quot;,&amp;quot;Douglas Adams&amp;quot;,0345391802,5.95
&amp;quot;1990/01/12&amp;quot;,&amp;quot;Douglas Hofstadter&amp;quot;,0465026567,9.95
&amp;quot;1998/07/15&amp;quot;,&amp;quot;Timothy &amp;quot;&amp;quot;The Parser&amp;quot;&amp;quot; Campbell&amp;quot;,0968411304,18.99
&amp;quot;1999/12/03&amp;quot;,&amp;quot;Richard Friedman&amp;quot;,0060630353,5.95
&amp;quot;2001/09/19&amp;quot;,&amp;quot;Karen Armstrong&amp;quot;,0345384563,9.95
&amp;quot;2002/06/23&amp;quot;,&amp;quot;David Jones&amp;quot;,0198504691,9.95
&amp;quot;2002/06/23&amp;quot;,&amp;quot;Julian Jaynes&amp;quot;,0618057072,12.50
&amp;quot;2003/09/30&amp;quot;,&amp;quot;Scott Adams&amp;quot;,0740721909,4.95
&amp;quot;2004/10/04&amp;quot;,&amp;quot;Benjamin Radcliff&amp;quot;,0804818088,4.95
&amp;quot;2004/10/04&amp;quot;,&amp;quot;Randel Helms&amp;quot;,0879755725,4.50&lt;/pre&gt;

&lt;p&gt;Now I made the program which makes the deal. Nothing to special here, just want to mention you do not need joining multiple times the column headers.&lt;/p&gt;

&lt;pre class="brush: c#"&gt;using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.IO;
using System.Text;

namespace CsvJoiner
{
    static class Program
    {
        public static void Main()
        {
            string[] csvFileNames = Directory.GetFiles(&amp;quot;.&amp;quot;, &amp;quot;CsvFile*.csv&amp;quot;);

            JoinCsvFiles(csvFileNames, &amp;quot;CsvOutput.csv&amp;quot;);
        }

        private static void JoinCsvFiles(string[] csvFileNames, string outputDestinationPath)
        {
            StringBuilder sb = new StringBuilder();

            bool columnHeadersRead = false;

            foreach (string csvFileName in csvFileNames)
            {
                TextReader tr = new StreamReader(csvFileName);

                string columnHeaders = tr.ReadLine();

                // Skip appending column headers if already appended
                if (!columnHeadersRead)
                {
                    sb.AppendLine(columnHeaders);
                    columnHeadersRead = true;
                }

                sb.AppendLine(tr.ReadToEnd());  
            }

            File.WriteAllText(outputDestinationPath, sb.ToString());
        }
    }
}&lt;/pre&gt;
Now I'll show the output. To check out this project 

&lt;h6&gt;&lt;a href="http://www.humyo.com/9591867/Code4Food%20Projects/CsvJoiner.zip?a=Vat1zdkffG0" target="_blank"&gt;download the sources here&lt;/a&gt;&lt;/h6&gt;

&lt;pre&gt;&amp;quot;REVIEW_DATE&amp;quot;,&amp;quot;AUTHOR&amp;quot;,&amp;quot;ISBN&amp;quot;,&amp;quot;DISCOUNTED_PRICE&amp;quot;
&amp;quot;1985/01/21&amp;quot;,&amp;quot;Douglas Adams&amp;quot;,0345391802,5.95
&amp;quot;1990/01/12&amp;quot;,&amp;quot;Douglas Hofstadter&amp;quot;,0465026567,9.95
&amp;quot;1998/07/15&amp;quot;,&amp;quot;Timothy &amp;quot;&amp;quot;The Parser&amp;quot;&amp;quot; Campbell&amp;quot;,0968411304,18.99
&amp;quot;1999/12/03&amp;quot;,&amp;quot;Richard Friedman&amp;quot;,0060630353,5.95
&amp;quot;2001/09/19&amp;quot;,&amp;quot;Karen Armstrong&amp;quot;,0345384563,9.95
&amp;quot;2002/06/23&amp;quot;,&amp;quot;David Jones&amp;quot;,0198504691,9.95
&amp;quot;2002/06/23&amp;quot;,&amp;quot;Julian Jaynes&amp;quot;,0618057072,12.50
&amp;quot;2003/09/30&amp;quot;,&amp;quot;Scott Adams&amp;quot;,0740721909,4.95
&amp;quot;2004/10/04&amp;quot;,&amp;quot;Benjamin Radcliff&amp;quot;,0804818088,4.95
&amp;quot;2004/10/04&amp;quot;,&amp;quot;Randel Helms&amp;quot;,0879755725,4.50&lt;/pre&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2127794245010916172-1833191048194466061?l=udevi-community.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udevi-community.blogspot.com/feeds/1833191048194466061/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://udevi-community.blogspot.com/2010/04/code4food-5-how-to-join-multiple-csv.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/1833191048194466061'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/1833191048194466061'/><link rel='alternate' type='text/html' href='http://udevi-community.blogspot.com/2010/04/code4food-5-how-to-join-multiple-csv.html' title='Code4Food #6: How to join multiple CSV files with the same structure ?'/><author><name>Timur</name><uri>http://www.blogger.com/profile/14594716207428319651</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/_BWELgx6N3yw/S49Bi5bOhxI/AAAAAAAAAcA/Xf12ZX1FEc0/S220/Timur_face.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2127794245010916172.post-593043648306335281</id><published>2010-04-26T00:00:00.001+03:00</published><updated>2010-04-26T00:02:08.809+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='QandA'/><category scheme='http://www.blogger.com/atom/ns#' term='Bytes.com'/><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='Code4Food'/><title type='text'>Code4Food #5: How to get specific XML nodes using Linq to XML ?</title><content type='html'>&lt;p&gt;Hi, another question has been received from &lt;a href="http://bytes.com/topic/net/answers/886514-linq-xml-question"&gt;Bytes.com&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;So the problem was that we needed to get all the tags “Error” from a specific XML without actually caring to much about where exactly in the XML tree is Error tag. And we need to do this using Linq to Xml.&lt;/p&gt;  &lt;p&gt;So he got an xml like these:&lt;/p&gt;  &lt;pre class="brush: xml"&gt;&amp;lt;Users&amp;gt;
      &amp;lt;User&amp;gt;
           &amp;lt;FirstName&amp;gt;Tom&amp;lt;/FirstName&amp;gt;
           &amp;lt;LastName&amp;gt;Won&amp;lt;/LastName&amp;gt;
           &amp;lt;Error&amp;gt;Test 2&amp;lt;/Error&amp;gt;
       &amp;lt;/User&amp;gt;
      &amp;lt;User&amp;gt;
           &amp;lt;FirstName&amp;gt;Jim&amp;lt;/FirstName&amp;gt;
           &amp;lt;LastName&amp;gt;Kim&amp;lt;/LastName&amp;gt;
           &amp;lt;Error&amp;gt;Test 2&amp;lt;/Error&amp;gt;
       &amp;lt;/User&amp;gt;
       &amp;lt;Error&amp;gt;Test 3&amp;lt;/Error&amp;gt;
&amp;lt;/Users&amp;gt;&lt;/pre&gt;

&lt;p&gt;Now this problem isn't actually a problem at all. All you need is to use Linq to XML objects like &lt;a href="http://msdn.microsoft.com/en-us/library/system.xml.linq.xelement.aspx"&gt;XElement&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/system.xml.linq.xdocument.aspx"&gt;XDocument&lt;/a&gt;, &lt;a href="http://msdn.microsoft.com/en-us/library/system.xml.linq.xnode.aspx"&gt;XNode&lt;/a&gt;, and so on (opposite thing to &lt;a href="http://msdn.microsoft.com/en-us/library/system.xml.xmlelement.aspx"&gt;XmlElement&lt;/a&gt;, XmlDocument, and XmlNode). Actually you can do it without directly using Linq, by callings &lt;a href="http://msdn.microsoft.com/en-us/library/bb353813(v=VS.100).aspx"&gt;Descendants(XName name)&lt;/a&gt; method.&lt;/p&gt;

&lt;p&gt;So this is the code that I’ve written to make this done.&lt;/p&gt;

&lt;pre class="brush: c#"&gt;using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using System.Xml.Linq;

namespace GetErrorTags.Linq2Xml
{
    static class Program
    {
        static void Main()
        {
            // Load the document into root XElement.
            // Remember in Linq you work with XDocument, XElement, XNode and not with XmlDocument, etc.
            XElement rootElement = XElement.Load(&amp;quot;ErrorTags.xml&amp;quot;);

            // without directly using Linq
            var errorTags = rootElement.Descendants(&amp;quot;Error&amp;quot;);

            Console.WriteLine(&amp;quot;==============Without using Linq=========&amp;quot;);

            foreach (XElement tagError in errorTags)
            {
                Console.WriteLine(tagError);
            }

            Console.ReadKey();

            // using Ling directly, we'll select only &amp;quot;Test 2&amp;quot; errors
            var linqErrorTags = rootElement.Descendants(&amp;quot;Error&amp;quot;).Where(element =&amp;gt; element.Value.Equals(&amp;quot;Test 2&amp;quot;));

            Console.WriteLine(&amp;quot;==============Using Linq=========&amp;quot;);

            foreach (XElement tagError in linqErrorTags)
            {
                Console.WriteLine(tagError);
            }

            Console.ReadKey();

        }
    }
}&lt;/pre&gt;

&lt;p&gt;And here is the output:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://img227.imageshack.us/img227/4263/errortaglinq2xml.png" /&gt; &lt;/p&gt;

&lt;h6&gt;&lt;font size="4"&gt;&lt;a href="http://www.humyo.com/9591867/Code4Food%20Projects/GetErrorTags.Linq2Xml.zip?a=9QQPpg3o8Vw"&gt;Download source&lt;/a&gt;&lt;/font&gt;&lt;/h6&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2127794245010916172-593043648306335281?l=udevi-community.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udevi-community.blogspot.com/feeds/593043648306335281/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://udevi-community.blogspot.com/2010/04/code4food-5-how-to-get-specific-xml.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/593043648306335281'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/593043648306335281'/><link rel='alternate' type='text/html' href='http://udevi-community.blogspot.com/2010/04/code4food-5-how-to-get-specific-xml.html' title='Code4Food #5: How to get specific XML nodes using Linq to XML ?'/><author><name>Timur</name><uri>http://www.blogger.com/profile/14594716207428319651</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/_BWELgx6N3yw/S49Bi5bOhxI/AAAAAAAAAcA/Xf12ZX1FEc0/S220/Timur_face.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2127794245010916172.post-7441236138472123353</id><published>2010-04-22T10:46:00.002+03:00</published><updated>2010-04-22T10:47:37.215+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='QandA'/><category scheme='http://www.blogger.com/atom/ns#' term='Bytes.com'/><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='Code4Food'/><title type='text'>Code4Food #4: How to change WinForms Treeview control image size?</title><content type='html'>&lt;p&gt;Hi,&lt;/p&gt;

&lt;p&gt;Today I visited &lt;a href="http://bytes.com/topic/c-sharp/answers/886291-treeview-image-size#post3564811" target="_blank"&gt;Bytes.com&lt;/a&gt; and saw a question about Treeview.&lt;/p&gt;

&lt;p&gt;Indeed how would one change ImageSize of a node ? So I had 15 free minutes and this is what I found.&lt;/p&gt;

&lt;pre class="brush: c#"&gt;using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace TreeView.ImageSize
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            FillTreeView();
        }

        private void FillTreeView()
        {
            // Load the images in an ImageList.
            ImageList myImageList = new ImageList();
            myImageList.Images.Add(Image.FromFile(&amp;quot;63vts4.jpg&amp;quot;));
            myImageList.Images.Add(Image.FromFile(&amp;quot;ToDeleteIfNotSold.png&amp;quot;));
            
            // Change the size of the images.
            myImageList.ImageSize = new Size(50, 50);

            // Assign the ImageList to the TreeView.
            trvImages.ImageList = myImageList;
            trvImages.ItemHeight = 50;

            // Set the TreeView control's default image and selected image indexes.
            trvImages.ImageIndex = 0;
            trvImages.SelectedImageIndex = 1;

            // Create the root tree node.
            TreeNode rootNode = new TreeNode(&amp;quot;CustomerList&amp;quot;);

            TreeNode childNode1 = new TreeNode(&amp;quot;Customer1&amp;quot;);
            TreeNode childNode2 = new TreeNode(&amp;quot;Customer2&amp;quot;);

            // Add a main root tree node.
            trvImages.Nodes.Add(rootNode);
            trvImages.Nodes[0].Nodes.Add(childNode1);
            trvImages.Nodes[0].Nodes.Add(childNode2);
        }
    }
}&lt;/pre&gt;

&lt;p&gt;So the magic line was &lt;em&gt;myImageList.ImageSize = new Size(50, 50);&lt;/em&gt; Here is the output and the code to download.&lt;/p&gt;

&lt;p&gt;&lt;img src="http://img405.imageshack.us/img405/593/treeview.png" /&gt; &lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;h6&gt;&lt;a href="http://www.humyo.com/9591867/Code4Food%20Projects/TreeView.ImageSize.zip?a=qqFhiAfX0pM" target="_blank"&gt;Download source code link&lt;/a&gt;&lt;/h6&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2127794245010916172-7441236138472123353?l=udevi-community.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udevi-community.blogspot.com/feeds/7441236138472123353/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://udevi-community.blogspot.com/2010/04/code4food-4-how-to-change-winforms.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/7441236138472123353'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/7441236138472123353'/><link rel='alternate' type='text/html' href='http://udevi-community.blogspot.com/2010/04/code4food-4-how-to-change-winforms.html' title='Code4Food #4: How to change WinForms Treeview control image size?'/><author><name>Timur</name><uri>http://www.blogger.com/profile/14594716207428319651</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/_BWELgx6N3yw/S49Bi5bOhxI/AAAAAAAAAcA/Xf12ZX1FEc0/S220/Timur_face.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2127794245010916172.post-1919185814442865660</id><published>2010-04-01T11:31:00.000+03:00</published><updated>2010-04-01T13:46:22.065+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET 4.0'/><title type='text'>.NET 4.0 : System.Tuple</title><content type='html'>&lt;p&gt;So, let’s go back to our subject, .NET 4.0 new stuff &amp;amp; features.&lt;/p&gt;  &lt;p&gt;One of the newest things that we will have in .NET 4.0 is a &lt;strong&gt;&lt;em&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.tuple(v=VS.100).aspx"&gt;tuple&lt;/a&gt;, &lt;/em&gt;&lt;/strong&gt;what’s right and it’s not a joke!&lt;/p&gt;  &lt;p&gt;A tuple is data structure which can contain different types of data coupled. This is what makes it different from a List or other generic types.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;&lt;u&gt;Note:&lt;/u&gt;&lt;/strong&gt; Do not confuse it with &lt;a href="http://msdn.microsoft.com/en-us/library/cc588125.aspx"&gt;Microsoft.Dynamics.Framework.Reports.Tuple&lt;/a&gt;&lt;strong&gt;. &lt;/strong&gt;It is another type. &lt;/p&gt;  &lt;p&gt;So a tuple which will contain to 7 elements is created with a factory. &lt;em&gt;System.Tuple.Create. &lt;/em&gt;A tuple with 8 elements will contain 7 elements and another tuple &lt;em&gt;Rest.&lt;/em&gt; &lt;/p&gt;  &lt;p&gt;Why would we need this&amp;#160; type? Well, this allows us to return two or more values of different types.&lt;/p&gt;  &lt;p&gt;Here is the code which i made to play a little bit with this type.&lt;/p&gt;  &lt;pre class="brush: c#"&gt;using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;


namespace Intro.Tuple
{
    class Program
    {
        static void Main(string[] args)
        {
            var squaresList = System.Tuple.Create(1, 4, 9, 16, 25, 36, 49, 64);

            Console.WriteLine(&amp;quot;1st item: {0}&amp;quot;, squaresList.Item1);
            Console.WriteLine(&amp;quot;4th item: {0}&amp;quot;, squaresList.Item4);
            Console.WriteLine(&amp;quot;8th item: {0}&amp;quot;, squaresList.Rest);
            Console.ReadKey();

            Console.WriteLine(Environment.NewLine);
            
            var tupleWithMoreThan8Elements =
                System.Tuple.Create(&amp;quot;is&amp;quot;, 2.3, 4.0f,
                new List&lt;char&gt; { 'e', 't', 'h' }, &amp;quot;udevi&amp;quot;, new Stack&lt;int&gt;(4), &amp;quot;best&amp;quot;, squaresList);

            // we'll sort the list of chars in descending order
            tupleWithMoreThan8Elements.Item4.Sort();
            tupleWithMoreThan8Elements.Item4.Reverse();

            Console.WriteLine(&amp;quot;{0} {1} {2} {3}&amp;quot;, tupleWithMoreThan8Elements.Item5,
                tupleWithMoreThan8Elements.Item1,
                string.Concat(tupleWithMoreThan8Elements.Item4),
                tupleWithMoreThan8Elements.Item7);

            Console.WriteLine(&amp;quot;Rest: {0}&amp;quot;, tupleWithMoreThan8Elements.Rest);
            Console.WriteLine(&amp;quot;Rest's 2nd element: {0}&amp;quot;, tupleWithMoreThan8Elements.Rest.Item1.Item2);
            Console.WriteLine(&amp;quot;Rest's 5th element: {0}&amp;quot;, tupleWithMoreThan8Elements.Rest.Item1.Item5);
            Console.ReadKey();

            Console.WriteLine(Environment.NewLine);

            var tuple = GetNameAndAge();

            Console.WriteLine(Environment.NewLine);
            Console.WriteLine(&amp;quot;Name: {0}&amp;quot;, tuple.Item1);
            Console.WriteLine(&amp;quot;Age: {0}&amp;quot;, tuple.Item2);
            Console.ReadKey();
        }

        private static Tuple&lt;string int ,&gt; GetNameAndAge()
        {
            var resultingTuple = System.Tuple.Create(string.Empty, 0);

            Console.WriteLine(&amp;quot;Enter your name please: &amp;quot;);
            string name = Console.ReadLine();
            Console.WriteLine(&amp;quot;Enter your age please: &amp;quot;);
            string ageValue = Console.ReadLine();

            int age = -1;

            if (int.TryParse(ageValue, out age))
            {
                resultingTuple = new Tuple&lt;string int ,&gt;(name, age);
            }

            return resultingTuple;
        }
    }
}&lt;/pre&gt;

&lt;p&gt;And here is what in our case the Rest is:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://img240.imageshack.us/img240/5551/tuplerest.png" width="693" height="64" /&gt; &lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;And the output:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://img253.imageshack.us/img253/5027/tupleoutput.png" width="674" height="360" /&gt; &lt;/p&gt;

&lt;p&gt;Hope it helps you! See you around!&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2127794245010916172-1919185814442865660?l=udevi-community.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udevi-community.blogspot.com/feeds/1919185814442865660/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://udevi-community.blogspot.com/2010/04/net-40-systemtuple.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/1919185814442865660'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/1919185814442865660'/><link rel='alternate' type='text/html' href='http://udevi-community.blogspot.com/2010/04/net-40-systemtuple.html' title='.NET 4.0 : System.Tuple'/><author><name>Timur</name><uri>http://www.blogger.com/profile/14594716207428319651</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/_BWELgx6N3yw/S49Bi5bOhxI/AAAAAAAAAcA/Xf12ZX1FEc0/S220/Timur_face.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2127794245010916172.post-7295527317895186668</id><published>2010-03-31T12:09:00.000+03:00</published><updated>2010-03-31T13:24:08.155+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tools'/><category scheme='http://www.blogger.com/atom/ns#' term='Ninite'/><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><title type='text'>Tools I can’t imagine my dev life without #1: Ninite.com</title><content type='html'>&lt;p&gt;&lt;img style="margin: 0px 25px 0px 0px; display: inline" align="left" src="http://img638.imageshack.us/img638/2219/ninite.png" width="94" height="88" /&gt; &lt;/p&gt;  &lt;p&gt;Hi,&lt;/p&gt;  &lt;p&gt;Last day of March and I want to start today this new series of posts where I’ll try to share with you some of the gems already there, but I suppose the majority of developers in the world don’t really know about.&lt;/p&gt;  &lt;p&gt;So one of these gems is site &lt;a href="http://ninite.com"&gt;Ninite.com&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;Every time when I need to install a fresh version of Windows somewhere (and as a programmer I do this more than I would like to) and there is an internet connection I use Ninite installer to install all the software that is needed. It does have almost everything there, and the list is growing.&lt;/p&gt;  &lt;p&gt;Once you’ve chosen the programs you’d like to install, it will generate an installer for you, and you should save it on your machine and download it. Now after you’ve downloaded it, run it and you will see something like these (it depends on the programs you’ve chosen).&lt;/p&gt;  &lt;p&gt;&lt;img src="http://img715.imageshack.us/img715/8944/ninitemoneyshot.png" width="659" height="373" /&gt; &lt;/p&gt;  &lt;p&gt; After that, you’ll just need to wait while all of your programs will finish to install, and that’s all!&lt;/p&gt;  &lt;p&gt; Awesome!!! Isn’t it?&lt;/p&gt;  &lt;p&gt; Ideas, concerns, suggestions, tips &amp;amp; tricks – I’m waiting for all these. Take care.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2127794245010916172-7295527317895186668?l=udevi-community.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udevi-community.blogspot.com/feeds/7295527317895186668/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://udevi-community.blogspot.com/2010/03/tools-i-cant-imagine-my-dev-life.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/7295527317895186668'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/7295527317895186668'/><link rel='alternate' type='text/html' href='http://udevi-community.blogspot.com/2010/03/tools-i-cant-imagine-my-dev-life.html' title='Tools I can’t imagine my dev life without #1: Ninite.com'/><author><name>Timur</name><uri>http://www.blogger.com/profile/14594716207428319651</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/_BWELgx6N3yw/S49Bi5bOhxI/AAAAAAAAAcA/Xf12ZX1FEc0/S220/Timur_face.png'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2127794245010916172.post-6925617671023953267</id><published>2010-03-26T16:05:00.001+02:00</published><updated>2010-03-31T11:47:08.575+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET MVC 2.0'/><title type='text'>jQuery - SlideShare</title><content type='html'>I love and use JQuery, it should be used in each and every single web application. Don't use raw javascript use JQuery instead.   &lt;br /&gt;  &lt;br /&gt;Here is the presentation of Rey Bango jQuery Team Member. It should gave you a little overview on what is JQuery and how to use it.  &lt;br /&gt;  &lt;br /&gt;Have questions, ideas? Post a comment and I will try to answer you.  &lt;div style="width: 425px" id="__ss_3562646"&gt;&lt;strong style="margin: 12px 0px 4px; display: block"&gt;&lt;a title="jQuery - A Walk On The Client Side" href="http://www.slideshare.net/reybango/jquery-a-walk-on-the-client-side-3562646"&gt;jQuery - A Walk On The Client Side&lt;/a&gt;&lt;/strong&gt;&lt;object width="425" height="355"&gt;&lt;param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=jquery-awalkontheclientside-100326082755-phpapp01&amp;amp;stripped_title=jquery-a-walk-on-the-client-side-3562646" /&gt;&lt;param name="allowFullScreen" value="true" /&gt;&lt;param name="allowScriptAccess" value="always" /&gt;&lt;embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=jquery-awalkontheclientside-100326082755-phpapp01&amp;amp;stripped_title=jquery-a-walk-on-the-client-side-3562646" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;    &lt;div style="padding-bottom: 12px; padding-left: 0px; padding-right: 0px; padding-top: 5px"&gt;View more &lt;a href="http://www.slideshare.net/"&gt;presentations&lt;/a&gt; from &lt;a href="http://www.slideshare.net/reybango"&gt;reybango&lt;/a&gt;.&lt;/div&gt; &lt;/div&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2127794245010916172-6925617671023953267?l=udevi-community.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udevi-community.blogspot.com/feeds/6925617671023953267/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://udevi-community.blogspot.com/2010/03/jquery-slideshare.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/6925617671023953267'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/6925617671023953267'/><link rel='alternate' type='text/html' href='http://udevi-community.blogspot.com/2010/03/jquery-slideshare.html' title='jQuery - SlideShare'/><author><name>Timur</name><uri>http://www.blogger.com/profile/14594716207428319651</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/_BWELgx6N3yw/S49Bi5bOhxI/AAAAAAAAAcA/Xf12ZX1FEc0/S220/Timur_face.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2127794245010916172.post-5978173402922426573</id><published>2010-03-19T10:17:00.001+02:00</published><updated>2010-03-31T11:48:02.616+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.NET 4.0'/><title type='text'>.NET 4.0 : String.IsNullOrWhiteSpace Method</title><content type='html'>&lt;p&gt;Hello one more time guys,&lt;/p&gt;  &lt;p&gt;So I think the most of you are familiar with string.IsNullOrEmpty method which is very useful when you’re checking your string on actually having the data for different reasons:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Sometimes we need to parse the string &lt;/li&gt;    &lt;li&gt;Add something to the string &lt;/li&gt;    &lt;li&gt;Use some of the string members &lt;/li&gt;    &lt;li&gt;AND try to see if the data from the database/xml/file is valid. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;But now another problem is around: often the data in database has some whitespaces because there are constraints on some &lt;strong&gt;varchar&lt;/strong&gt; columns NOT NULL. To works these around when something is not available, someone could insert a whitespace, and this would solve the problem, for the moment.&lt;/p&gt;  &lt;p&gt;Actually it’s not a lot of fun to do something like &lt;/p&gt;  &lt;pre class="brush: c#"&gt;if (!string.IsNullOrEmpty(&amp;quot; &amp;quot;) &amp;amp;&amp;amp; &amp;quot; &amp;quot;.Trim() != string.Empty) 

{
            

}&lt;/pre&gt;

&lt;p&gt;What’s why .NET framework 4.0 has the string.IsNullOrWhiteSpace method.&lt;/p&gt;

&lt;p&gt;To compare there 2 methods I did the following program:&lt;/p&gt;

&lt;pre class="brush: c#"&gt;using System;
using System.Collections.Generic;

namespace Intro.StringIsNullOrWhiteSpace
{
    class Program
    {
        /// &lt;summary&gt;
        /// The main entry point for the application.
        /// &lt;/summary&gt;
        static void Main(string[] args)
        {
            // let's say we have a Dictionary of int - string
            // the string representation of a number. Example: 1 - one
            Dictionary&lt;int  ,STRING&gt; integerDictionary = new Dictionary&lt;int  ,STRING&gt;();
            integerDictionary.Add(1, &amp;quot;one&amp;quot;);
            integerDictionary.Add(2, &amp;quot;two&amp;quot;);
            integerDictionary.Add(300, &amp;quot;three hundreds&amp;quot;);
            integerDictionary.Add(4, &amp;quot;four&amp;quot;);
            integerDictionary.Add(67, &amp;quot;sixty seven&amp;quot;);

            // let's assume that we don't know anything about the data in the dictionary
            // we also could have something like
            integerDictionary.Add(5000, null);
            integerDictionary.Add(50001, string.Empty);
            integerDictionary.Add(56565, &amp;quot; &amp;quot;);
            integerDictionary.Add(23, &amp;quot; \r\n &amp;quot;);

            // now let's check it with string.IsNullOrEmpty
            Console.WriteLine(&amp;quot;string.IsNullOrEmpty&amp;quot;);
            Console.WriteLine(&amp;quot;===================================&amp;quot;);
            foreach (var keyValuePair in integerDictionary)
            {
                if (string.IsNullOrEmpty(keyValuePair.Value))
                {
                    Console.WriteLine(keyValuePair.Value + &amp;quot; - True&amp;quot;);
                }
                else
                {
                    Console.WriteLine(keyValuePair.Value + &amp;quot; - False&amp;quot;);
                }
            }
            Console.ReadKey();
            Console.WriteLine(Environment.NewLine);

            // let's check it now with the new one : string.IsNullOrWhiteSpace
            Console.WriteLine(&amp;quot;string.IsNullOrWhiteSpace&amp;quot;);
            Console.WriteLine(&amp;quot;===================================&amp;quot;);
            foreach (var keyValuePair in integerDictionary)
            {
                if (string.IsNullOrWhiteSpace(keyValuePair.Value))
                {
                    Console.WriteLine(keyValuePair.Value + &amp;quot; - True&amp;quot;);
                }
                else
                {
                    Console.WriteLine(keyValuePair.Value + &amp;quot; - False&amp;quot;);
                }
            }
            Console.ReadKey();
        }
    }
}&lt;/pre&gt;

&lt;p&gt;Here is the output of the program:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://img341.imageshack.us/img341/617/isnullorwhitespace.png" /&gt; &lt;/p&gt;

&lt;p&gt;Have a nice day and&amp;#160; use it in .NET 4.0 ! &lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2127794245010916172-5978173402922426573?l=udevi-community.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udevi-community.blogspot.com/feeds/5978173402922426573/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://udevi-community.blogspot.com/2010/03/net-40-stringisnullorwhitespace-method.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/5978173402922426573'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/5978173402922426573'/><link rel='alternate' type='text/html' href='http://udevi-community.blogspot.com/2010/03/net-40-stringisnullorwhitespace-method.html' title='.NET 4.0 : String.IsNullOrWhiteSpace Method'/><author><name>Timur</name><uri>http://www.blogger.com/profile/14594716207428319651</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/_BWELgx6N3yw/S49Bi5bOhxI/AAAAAAAAAcA/Xf12ZX1FEc0/S220/Timur_face.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2127794245010916172.post-6444405609638650604</id><published>2010-02-26T18:39:00.001+02:00</published><updated>2010-04-01T19:36:49.120+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET 4.0'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><title type='text'>.NET 4.0 : Complex Numbers</title><content type='html'>&lt;p&gt;&amp;#160;&lt;img style="margin: 0px 15px 0px 0px; display: inline" align="left" src="http://img24.imageshack.us/img24/4840/msnetnewlogothumb.png" width="98" height="93" /&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&amp;#160;&amp;#160; Hello today I’m going to start to describe and apply the new classes which were added into .NET 4.0 Framework.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;When I was 16, it always was a problem there. Sex was in the air, a lot of different opportunities had the habit to rise without any prevention at all, and I was loving challenges. BUT, it also was the period when the most useless and useful information was taken in and out from the classes. Physics, mathematics, chemistry and others were at the same time boring and challenging. &lt;/p&gt;  &lt;p&gt;One of the basic subjects in math was : Quadratic equations, and also introduction of &lt;a href="http://en.wikipedia.org/wiki/Complex_number"&gt;complex numbers&lt;/a&gt;, which was pretty strange… imaginary and real parts formed the complex number. But these numbers has a lot applications in physics, astronomy and geometry.&lt;/p&gt;  &lt;p&gt;Question how did we solved these kind of equations in the past?    &lt;br /&gt;We did a structure or a class and tried different things with it, like multiplication and division, and others as well. But sometimes we didn’t really figured out very well the logic. &lt;/p&gt;  &lt;p&gt;Now, guess what, in .NET 4.0 we already got a &lt;a href="http://msdn.microsoft.com/en-us/library/system.numerics.complex(VS.100).aspx"&gt;Complex structure&lt;/a&gt;, which in fact represents the complex number.&lt;/p&gt;  &lt;p&gt;So here is a very simple application of it:&lt;/p&gt;  &lt;pre class="brush: c#"&gt;using System;
using System.Numerics;

namespace Intro.ComplexNumbers
{
    class Program
    {

        static void Main(string[] args)
        {
            // do it always, we'll stop the loop by pressing Ctrl + C.
            while (true)
            {
                string errorMsg = string.Empty;

                Console.WriteLine(&amp;quot;To solve the quadratic equations using the Quadratic Formula,&amp;quot;);

                int a = ReadCoeficientValueFromConsole(&amp;quot;a&amp;quot;, &amp;quot;Please enter ax^2: &amp;quot;, ref errorMsg);

                if (!string.IsNullOrEmpty(errorMsg))
                {
                    ShowErrorMessage(errorMsg);
                    break;    
                }

                int b = ReadCoeficientValueFromConsole(&amp;quot;b&amp;quot;, &amp;quot;Please enter bx: &amp;quot;, ref errorMsg);

                if (!string.IsNullOrEmpty(errorMsg))
                {
                    ShowErrorMessage(errorMsg);
                    break;
                }

                int c = ReadCoeficientValueFromConsole(&amp;quot;c&amp;quot;, &amp;quot;Please enter c: &amp;quot;, ref errorMsg);

                if (!string.IsNullOrEmpty(errorMsg))
                {
                    ShowErrorMessage(errorMsg);
                    break;
                }

                // we're assuming that the discriminant is negative
                // for more information visit http://en.wikipedia.org/wiki/Quadratic_Formula#Quadratic_formula
                Complex root1 = new Complex(-b / 2 * a, Math.Sqrt(4 * a * c - b * b) / 2 * a);
                Complex root2 = new Complex(-b / 2 * a, (-1) * Math.Sqrt(4 * a * c - b * b) / 2 * a);

                Console.WriteLine(&amp;quot;Roots are: &amp;quot;);
                Console.WriteLine(&amp;quot;Root1 (positive): {0}&amp;quot;, root1);
                Console.WriteLine(&amp;quot;Root2 (negative): {0}&amp;quot;, root2);
            }
        }

        /// &lt;summary&gt;
        /// Shows error message in console.
        /// &lt;/summary&gt;
        /// &lt;param name="errorMsg" /&gt;Error message.&lt;/param&gt;
        private static void ShowErrorMessage(string errorMsg)
        {
            Console.WriteLine(errorMsg);
            Console.ReadKey();
        }

        /// &lt;summary&gt;
        /// Reads a string from console and tries to convert it into an Int32, and assign it 
        /// to a coefficient.
        /// &lt;/summary&gt;
        /// &lt;param name="coefficientName" /&gt;Coefficient name.&lt;/param&gt;
        /// &lt;param name="requieringString" /&gt;String which will be shown to ask the coefficient introduction.&lt;/param&gt;
        /// &lt;returns&gt;The coefficient Int32 value.&lt;/returns&gt;
        private static int ReadCoeficientValueFromConsole(string coefficientName, string requieringString, ref string errorMsg)
        {
            int coeficient = 0;

            Console.WriteLine(requieringString);

            string aValue = Console.ReadLine();
            if (!string.IsNullOrEmpty(aValue))
            {
                try
                {
                    coeficient = Convert.ToInt32(aValue);
                }
                catch (FormatException)
                {
                    errorMsg = &amp;quot;Your '&amp;quot; + coefficientName + &amp;quot;' coeficient is not a numeric value.&amp;quot;;
                }
                catch (Exception)
                {
                    errorMsg = &amp;quot;There was an exception raised because of coeficient '&amp;quot; + coefficientName + &amp;quot;'&amp;quot;;
                }
            }

            return coeficient;
        }
    }
}&lt;/pre&gt;

&lt;p&gt;Here are some screenshots:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://img716.imageshack.us/img716/9703/complexnumberserror.png" /&gt; &lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Figure 1&lt;/strong&gt;&lt;em&gt;. Coefficient error&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;img src="http://img710.imageshack.us/img710/40/complexnumbersok.png" /&gt; &lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Figure 2. &lt;/strong&gt;&lt;em&gt;Good coefficients solving 3x&lt;sup&gt;2&lt;/sup&gt; + 9x +7 = 0&lt;/em&gt;&lt;/p&gt;

&lt;h6&gt;&lt;a href="http://www.humyo.com/9591867/Code4Food%20Projects/ComplexNumbers.zip?a=iWYKuexizLE"&gt;Download source from here&lt;/a&gt;&lt;/h6&gt;

&lt;p&gt;NOTE: I’ve done this project using Visual Studio 2010 RC.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2127794245010916172-6444405609638650604?l=udevi-community.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udevi-community.blogspot.com/feeds/6444405609638650604/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://udevi-community.blogspot.com/2010/02/net-40-complex-numbers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/6444405609638650604'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/6444405609638650604'/><link rel='alternate' type='text/html' href='http://udevi-community.blogspot.com/2010/02/net-40-complex-numbers.html' title='.NET 4.0 : Complex Numbers'/><author><name>Timur</name><uri>http://www.blogger.com/profile/14594716207428319651</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/_BWELgx6N3yw/S49Bi5bOhxI/AAAAAAAAAcA/Xf12ZX1FEc0/S220/Timur_face.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2127794245010916172.post-4568546626360160686</id><published>2010-02-24T22:47:00.001+02:00</published><updated>2010-02-24T22:49:36.626+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Udevi'/><category scheme='http://www.blogger.com/atom/ns#' term='JQuery'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET 4.0'/><category scheme='http://www.blogger.com/atom/ns#' term='ASP.NET MVC 2.0'/><category scheme='http://www.blogger.com/atom/ns#' term='F# 2.0'/><title type='text'>What’s going to blow our mind in 2010 ?</title><content type='html'>&lt;p&gt;Hi guys, now a little time passed, half of the year while I'm semi-actively posting here.&lt;/p&gt;  &lt;p&gt;We took a step back and tried to write about things which could matters. And which isn’t really discussed by anyone else.&lt;/p&gt;  &lt;p&gt;I really tried to make it better, although I hope that this year I’m gonna obtain my goal of writing at least once per week.&lt;/p&gt;  &lt;h1&gt;&lt;font size="5"&gt;So what is going to blow our mind ?&lt;/font&gt;&lt;/h1&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I will be writing about:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Udevi community&lt;/li&gt;    &lt;li&gt;F# 2.0 &lt;/li&gt;    &lt;li&gt;Visual Studio 2010&lt;/li&gt;    &lt;li&gt;ASP.NET MVC 2.0&lt;/li&gt;    &lt;li&gt;.NET 4.0&lt;/li&gt;    &lt;li&gt;JQuery&lt;/li&gt;    &lt;li&gt;Open source projects in which I’ll be participating&lt;/li&gt;    &lt;li&gt;Tips and tricks&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Hope you will like it !&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2127794245010916172-4568546626360160686?l=udevi-community.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udevi-community.blogspot.com/feeds/4568546626360160686/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://udevi-community.blogspot.com/2010/02/whats-going-to-blow-our-mind-in-2010.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/4568546626360160686'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/4568546626360160686'/><link rel='alternate' type='text/html' href='http://udevi-community.blogspot.com/2010/02/whats-going-to-blow-our-mind-in-2010.html' title='What’s going to blow our mind in 2010 ?'/><author><name>Timur</name><uri>http://www.blogger.com/profile/14594716207428319651</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/_BWELgx6N3yw/S49Bi5bOhxI/AAAAAAAAAcA/Xf12ZX1FEc0/S220/Timur_face.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2127794245010916172.post-8447504716658321307</id><published>2010-02-21T04:06:00.001+02:00</published><updated>2010-02-21T04:06:30.637+02:00</updated><title type='text'>Stack Overflow</title><content type='html'>Check out this SlideShare Presentation: &lt;br /&gt;Webstock 2010 - Stack Overflow: Building Social Software for the Anti-Social (Jeff Atwood)&lt;div style="width:425px;text-align:left" id="__ss_3213070"&gt;&lt;a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" href="http://www.slideshare.net/codinghorror/webstock-2010-stack-overflow-building-social-software-for-the-antisocial" title="Webstock 2010 - Stack Overflow: Building Social Software for the Anti-Social"&gt;Webstock 2010 - Stack Overflow: Building Social Software for the Anti-Social&lt;/a&gt;&lt;object style="margin:0px" width="425" height="355"&gt;&lt;param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=webstock-2010-100217225836-phpapp02&amp;stripped_title=webstock-2010-stack-overflow-building-social-software-for-the-antisocial" /&gt;&lt;param name="allowFullScreen" value="true"/&gt;&lt;param name="allowScriptAccess" value="always"/&gt;&lt;embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=webstock-2010-100217225836-phpapp02&amp;stripped_title=webstock-2010-stack-overflow-building-social-software-for-the-antisocial" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;"&gt;View more &lt;a style="text-decoration:underline;" href="http://www.slideshare.net/"&gt;presentations&lt;/a&gt; from &lt;a style="text-decoration:underline;" href="http://www.slideshare.net/codinghorror"&gt;codinghorror&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2127794245010916172-8447504716658321307?l=udevi-community.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udevi-community.blogspot.com/feeds/8447504716658321307/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://udevi-community.blogspot.com/2010/02/stack-overflow.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/8447504716658321307'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/8447504716658321307'/><link rel='alternate' type='text/html' href='http://udevi-community.blogspot.com/2010/02/stack-overflow.html' title='Stack Overflow'/><author><name>Timur</name><uri>http://www.blogger.com/profile/14594716207428319651</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/_BWELgx6N3yw/S49Bi5bOhxI/AAAAAAAAAcA/Xf12ZX1FEc0/S220/Timur_face.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2127794245010916172.post-3879233860450767523</id><published>2009-12-05T17:09:00.000+02:00</published><updated>2009-12-06T09:49:58.638+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Text editor'/><category scheme='http://www.blogger.com/atom/ns#' term='Code4Food'/><category scheme='http://www.blogger.com/atom/ns#' term='FileSystemWatcher'/><title type='text'>Code4Food #3: Text Editor in 5 minutes – Part II. FileSystemWatcher class.</title><content type='html'>&lt;h6&gt;&lt;em&gt;By the way I installed a rating widget on my blog. So now you can rate my posts if you like them, or if you dislike them you can put a 1 star rate too.&lt;/em&gt;&lt;/h6&gt;  &lt;p&gt;Hi, &lt;/p&gt;  &lt;p&gt;Finally I found time to continue my little experiment with the text editor. Here you can read the previous post on text editor.&lt;/p&gt;  &lt;h6&gt;&lt;/h6&gt;  &lt;ul&gt;   &lt;li&gt;     &lt;h6&gt;&lt;a href="http://udevi-community.blogspot.com/2009/10/code4food-2-create-text-editor-in-5.html"&gt;Code4Food #2: Create a Text Editor in 5 minutes. C# - magic&lt;/a&gt;&lt;/h6&gt;   &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;Today we’re going to talk about:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="#saveFile"&gt;How to save file&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="#notifications"&gt;Notifications when your file is changed&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="#shortcutsToOpen"&gt;Shortcuts to open/save file&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;a href="#newFeatures"&gt;Features to implement&lt;/a&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;So here is the to download it :&lt;/p&gt; &lt;img border="0" alt="" src="http://img215.imageshack.us/img215/4133/zip.gif" /&gt; &lt;a href="http://www.humyo.com/F/9591867-2201175221"&gt;ViewFile_0.2 sourcecode&lt;/a&gt;   &lt;br /&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h6&gt;&lt;a name="saveFile"&gt;&lt;font size="2"&gt;SaVE FilE&lt;/font&gt;&lt;/a&gt;&lt;/h6&gt;  &lt;p&gt;This part actually was relatively easy to do. It was very similar to reading. Using TextWriter was enough to save the file. I still like looking fancy that’s why I used a SaveFileDialog for saving a file. &lt;/p&gt;  &lt;p&gt;I indicated that saving would be possible by default in 2 formats without indicating extension (see saveFileDialog.Filter property), text files and C# class files. &lt;/p&gt;  &lt;pre class="brush: c#"&gt;private void btnSaveFile_Click(object sender, EventArgs e)
{
	SaveFileDialog saveFileDialog = new SaveFileDialog();
	saveFileDialog.Filter = &amp;quot;Text Files (*.txt)|*.txt|C# files (*.cs)|*.cs|All files (*.*)|*.*&amp;quot;;

	saveFileDialog.SupportMultiDottedExtensions = true;

	DialogResult result = saveFileDialog.ShowDialog();

	if (result == DialogResult.OK)
	{
		_fileName = saveFileDialog.FileName;
		
		if (!string.IsNullOrEmpty(_fileName))
			SaveFileContent();
	}
}

private void SaveFileContent()
{
	lblFileName.Text = Path.GetFileName(_fileName);

	try
	{
		// we'll make only a textual file for instance
		TextWriter tw = File.CreateText(_fileName);

		try
		{
			tw.Write(txtFileContent.Text);
		}
		catch (Exception ex)
		{ MessageBox.Show(ex.Message); }
		finally
		{
			tw.Close();

			StartMonitorization();
		}
	}
	catch (UnauthorizedAccessException ex)
	{ MessageBox.Show(&amp;quot;Sorry, you lack sufficient privileges.&amp;quot;); }
	catch (Exception ex)
	{ MessageBox.Show(ex.Message); }
}&lt;/pre&gt;

&lt;h6&gt;&lt;a name="notifications"&gt;&lt;font size="2"&gt;Notifications Sending when Your file is changed&lt;/font&gt;&lt;/a&gt;&lt;/h6&gt;

&lt;p&gt;I didn’t actually planned to implement this but I saw a great opportunity. It was already a class there that could permit me to do this in a very easy way.&lt;/p&gt;

&lt;p&gt;So here it is: &lt;/p&gt;

&lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.aspx"&gt;FileSystemWatcher&lt;/a&gt; class – this class is particularly used to “watch” the changes that occur on a particular map or folder or a group of files (for example: textual files).&lt;/p&gt;

&lt;p&gt;The most important things in this class are:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;&lt;u&gt;Properties&lt;/u&gt;&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;string Filter&amp;#160; -&amp;#160; Gets or sets the filter string used to determine what files are monitored in a directory. &lt;/li&gt;

  &lt;li&gt;string Path&amp;#160; -&amp;#160; Gets or sets the path of the directory to watch. &lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
  &lt;p&gt;&lt;em&gt;Both of these properties are indicated in constructor: &lt;/em&gt;&lt;em&gt;FileSystemWatcher(String path, String filter)&lt;/em&gt; 

    &lt;br /&gt;&lt;font face="Calibri"&gt;&lt;em&gt;Initializes a new instance of the &lt;/em&gt;&lt;em&gt;FileSystemWatcher&lt;/em&gt;&lt;em&gt; class, given the specified directory and type of files to monitor.&lt;/em&gt;&lt;/font&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.io.notifyfilters.aspx"&gt;NotifyFilters&lt;/a&gt; NotifyFilter – Here you specify what kind of events do you want to watch: 

    &lt;ul&gt;
      &lt;li&gt;FileName - The name of the file. &lt;/li&gt;
    &lt;/ul&gt;

    &lt;ul&gt;
      &lt;li&gt;DirectoryName - The name of the directory. &lt;/li&gt;
    &lt;/ul&gt;

    &lt;ul&gt;
      &lt;li&gt;Attributes - The attributes of the file or folder. &lt;/li&gt;
    &lt;/ul&gt;

    &lt;ul&gt;
      &lt;li&gt;Size - The size of the file or folder. &lt;/li&gt;
    &lt;/ul&gt;

    &lt;ul&gt;
      &lt;li&gt;LastWrite - The date the file or folder last had anything written to it. &lt;/li&gt;
    &lt;/ul&gt;

    &lt;ul&gt;
      &lt;li&gt;LastAccess - The date the file or folder was last opened. &lt;/li&gt;
    &lt;/ul&gt;

    &lt;ul&gt;
      &lt;li&gt;CreationTime - The time the file or folder was created. &lt;/li&gt;
    &lt;/ul&gt;

    &lt;ul&gt;
      &lt;li&gt;Security - The security settings of the file or folder. &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;

  &lt;li&gt;bool IncludeSubdirectories - Gets or sets a value indicating whether subdirectories within the specified path should be monitored. &lt;/li&gt;

  &lt;li&gt;bool EnableRaisingEvents - Gets or sets a value indicating whether the component is enabled. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;&lt;u&gt;Events&lt;/u&gt;&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Created&amp;#160; -&amp;#160; Occurs when a file or directory in the specified Path is created. &lt;/li&gt;

  &lt;li&gt;Changed&amp;#160; -&amp;#160; Occurs when a file or directory in the specified Path is changed. &lt;/li&gt;

  &lt;li&gt;Renamed&amp;#160; -&amp;#160; Occurs when a file or directory in the specified Path is renamed. &lt;/li&gt;

  &lt;li&gt;Deleted&amp;#160; -&amp;#160; Occurs when a file or directory in the specified Path is deleted. &lt;/li&gt;

  &lt;li&gt;Error -&amp;#160; Occurs when the internal buffer overflows. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For more information consult MSDN on &lt;a href="http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher_members.aspx"&gt;FileSystemWatcher&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;So here is the code I implemented for support of notifications.&lt;/p&gt;

&lt;p&gt;First I implemented &lt;strong&gt;StartMonitorization&lt;/strong&gt; method where i initialized my FileSystemWatcher, and wired the events to it. I also specified the name of the file to monitor (it is always the file i load or save), and set the events I want to catch. This was done by setting &lt;strong&gt;NotifyFilter = NotifyFilters.FileName | NotifyFilters.LastWrite&lt;/strong&gt;. This means that I would like to catch the events then the filename is changed or when the file is saved. Then i set &lt;strong&gt;EnableRaisingEvents = true&lt;/strong&gt; for my _fileMonitor. If this property is set to false, events are not generated.&lt;/p&gt;

&lt;p&gt;Then I implemented the event handlers. First of all I got to say that I made a single handler for Created and Changed event, and another two for Deleted and Renamed events. &lt;/p&gt;

&lt;p&gt;The workflow was easy: when an event occurs I display a message box and ask if user wants to reload the file in case of Created, Renamed, Changed events, or remove the file from text editor if i get the Deleted event. If user answers OK, then I execute the needed method.&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;img src="http://img704.imageshack.us/img704/5350/texteditorchangedevent.png" width="314" height="281" /&gt; &lt;img src="http://img704.imageshack.us/img704/9599/texteditordeletedevent.png" width="300" height="277" /&gt; &lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;em&gt;Problems I’ve met&lt;/em&gt;&lt;/u&gt;&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Now the first problem I saw was that my methods were not executed because I try to modify the UI thread from watcher thread. That is not working that way. We need to use &lt;strong&gt;BeginInvoke&lt;/strong&gt; method and to create a delegate in UI thread, and to pass him the names of the methods to execute. The difference is that this delegate is on UI thread, and he is allowed to execute the methods from the same thread. So I created &lt;strong&gt;LoadContentCallback&lt;/strong&gt; delegate. &lt;/li&gt;

  &lt;li&gt;Second problem that I had was that the events were generated twice. To solve this problem I created 3 boolean fields to match the events. When the event is generated I set this boolean to true. Second time I set it to false, without actually executing the logic. With the Deleted event I had no problems because i dispose the _fileMonitor once user deletes file from text editor. &lt;/li&gt;

  &lt;li&gt;Changed event handler handled 2 events Created and Changed, so I was wondering how am I gonna determine which event is actually handled. But the arguments of the event &lt;strong&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.io.filesystemeventargs.aspx"&gt;FileSystemEventArgs&lt;/a&gt;&lt;/strong&gt; helped me because there is a property &lt;strong&gt;WatcherChangeTypes&lt;/strong&gt; e.ChangeType which indicate what kind of change was made. From here it was easy because I knew what boolean to reset. &lt;/li&gt;

  &lt;li&gt;To determine the new file name when Renamed event occurs was super easy thanks to &lt;a href="http://msdn.microsoft.com/en-us/library/system.io.renamedeventargs.aspx"&gt;RenamedEventArgs&lt;/a&gt; class which contains the following info, that did helped me: &lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
  &lt;ul&gt;
    &lt;li&gt;FullPath - Gets the new fully qualifed path of the affected file or directory. &lt;/li&gt;

    &lt;li&gt;Name&amp;#160; -&amp;#160; Gets the new name of the affected file or directory. &lt;/li&gt;

    &lt;li&gt;OldName&amp;#160; -&amp;#160; Gets the old name of the affected file or directory. &lt;/li&gt;

    &lt;li&gt;OldFullPath - Gets the previous fully qualified path of the affected file or directory. &lt;/li&gt;
  &lt;/ul&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src="http://img692.imageshack.us/img692/7238/texteditorrenaming1.png" /&gt; &lt;img src="http://img706.imageshack.us/img706/7717/texteditorrenaming2.png" /&gt;&lt;/p&gt;

&lt;p&gt;&amp;#160;&lt;img style="margin: 0px" src="http://img704.imageshack.us/img704/6011/texteditorrenamedevent.png" width="336" height="315" /&gt; &lt;img src="http://img706.imageshack.us/img706/9767/texteditorrenamedevent1.png" width="339" height="315" /&gt; &lt;/p&gt;

&lt;pre class="brush: c#"&gt;private FileSystemWatcher _fileMonitor;

private bool _wasChanged;
private bool _wasRenamed;
private bool _wasCreated;

public delegate void LoadContentCallback();

private void StartMonitorization()
{
	_fileMonitor = new FileSystemWatcher(Path.GetDirectoryName(_fileName), Path.GetFileName(_fileName))
		{
			NotifyFilter = NotifyFilters.FileName | NotifyFilters.LastWrite,
			IncludeSubdirectories = false
		};

	_fileMonitor.Changed += FileMonitor_OnChanged;
	_fileMonitor.Created += FileMonitor_OnChanged;
	_fileMonitor.Deleted += FileMonitor_OnDeleted;
	_fileMonitor.Renamed += FileMonitor_OnRenamed;

	_fileMonitor.EnableRaisingEvents = true;
}

private void FileMonitor_OnRenamed(object sender, RenamedEventArgs e)
{
	if (!_wasRenamed)
	{
		DialogResult result = MessageBox.Show(&amp;quot;The file &amp;quot; + e.OldName + &amp;quot; was renamed. \r\n&amp;quot; +
											&amp;quot;Do you want to load the new file ?&amp;quot;, &amp;quot;File was renamed&amp;quot;, MessageBoxButtons.OKCancel);

		_wasRenamed = true;

		if (result == DialogResult.OK)
		{
			_fileName = e.FullPath;
			this.BeginInvoke(new LoadContentCallback(LoadFileContent));
		}
	}
	else
	{
		_wasRenamed = false;
	}
}

private void FileMonitor_OnDeleted(object sender, FileSystemEventArgs e)
{
	DialogResult result = MessageBox.Show(&amp;quot;The file &amp;quot; + e.Name + &amp;quot; was deleted. \r\n&amp;quot; + &amp;quot;Do you want to remove it from text editor ?&amp;quot;, &amp;quot;File was deleted&amp;quot;,
MessageBoxButtons.YesNo);

	if (result == DialogResult.Yes)
	{
		_fileMonitor.Dispose();

		this.BeginInvoke(new LoadContentCallback(ResetUiContent));
	}

}

private void FileMonitor_OnChanged(object sender, FileSystemEventArgs e)
{
	if ((!_wasCreated &amp;amp;&amp;amp; e.ChangeType == WatcherChangeTypes.Created) ||
		(!_wasChanged &amp;amp;&amp;amp; e.ChangeType == WatcherChangeTypes.Changed))
	{
		DialogResult result = MessageBox.Show(&amp;quot;The content of the file &amp;quot; + e.Name + &amp;quot; was changed. \r\n&amp;quot; + &amp;quot;Do you want to reload it ?&amp;quot;, &amp;quot;File was changed&amp;quot;,
MessageBoxButtons.OKCancel);

		if (e.ChangeType == WatcherChangeTypes.Changed)
		{
			_wasChanged = true;
		}
		else
		{
			_wasCreated = true;
		}

		if (result == DialogResult.OK)
		{
			this.BeginInvoke(new LoadContentCallback(LoadFileContent));
		}
	}
	else
	{
		if (e.ChangeType == WatcherChangeTypes.Changed &amp;amp;&amp;amp; _wasChanged)
		{
			_wasChanged = false;
		}
		else if (e.ChangeType == WatcherChangeTypes.Created &amp;amp;&amp;amp; _wasCreated)
		{
			_wasCreated = false;
		}
	}
}

private void ResetUiContent()
{
	txtFileContent.Text = string.Empty;
	lblFileName.Text = string.Empty;
	_fileName = string.Empty;
}&lt;/pre&gt;

&lt;h6&gt;&lt;a name="shortcutsToOpen"&gt;&lt;font size="2"&gt;PUTTING Keyboard shortcuts on your buttons&lt;/font&gt;&lt;/a&gt;&lt;/h6&gt;

&lt;p&gt;This is I think really the easiest part. First you wire up your form with KeyDown event, make a event handler (in my case it was &lt;strong&gt;ViewFile_KeyDown &lt;/strong&gt;handler). Then you need to set your form KeyPreview property on true, because otherwise it would not be able to catch keyboard events. &lt;/p&gt;

&lt;p&gt;Than you just indicate what kind of combination will execute your action. For example I wanted my app to react at&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; Ctrl + S as a save action shortcut. In event handler I just indicate that I want it to react on Control + S for saving and Control + O for loading/opening the file. &lt;/p&gt;

&lt;pre class="brush: c#"&gt;this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.ViewFile_KeyDown);
this.KeyPreview = true;

private void ViewFile_KeyDown(object sender, KeyEventArgs e)
{
	if (e.Modifiers == Keys.Control)
	{
		switch (e.KeyCode)
		{
			case Keys.S:
				btnSaveFile_Click(btnSaveFile, null);
				break;
			case Keys.O:
				btnLoadFile_Click(btnSaveFile, null);
				break;
		}
	}
}&lt;/pre&gt;

&lt;h6&gt;&lt;a name="newFeatures"&gt;&lt;font size="2"&gt;New Features coming…&lt;/font&gt;&lt;/a&gt;&lt;/h6&gt;

&lt;p&gt;Now I think about new features that could be done on top of what already exists:&lt;/p&gt;
&lt;script language="JavaScript" src="http://www.micropoll.com/akira/MicroPoll?id=220566"&gt;&lt;/script&gt;&lt;noscript&gt;&lt;div&gt;&lt;a href="http://www.micropoll.com/akira/mpview/755521-220566"&gt;Click Here for Poll&lt;/a&gt;&lt;a href="http://www.questionpro.com" title="online survey"&gt;Online Survey&lt;/a&gt;&lt;BR&gt; | &lt;a href="http://www.micropoll.com" title="Website Polls"&gt;Website Polls&lt;/a&gt;&lt;BR&gt; | &lt;a href="http://www.contactpro.com" title="email marketing"&gt;Email Marketing&lt;/a&gt;&lt;BR&gt;&lt;BR&gt; | &lt;a href="http://www.ideascale.com/crowdsourcing-software.html" title="crowdsourcing software"&gt;Crowdsourcing Software&lt;/a&gt;&lt;BR&gt;&lt;a href="http://www.micropoll.com/akira/MicroPoll?mode=html&amp;amp;id=220566"&gt;View MicroPoll&lt;/A&gt;&lt;/div&gt;&lt;/noscript&gt;&lt;!-- END MICROPOLL JAVASCRIPT CODE --&gt;

&lt;p&gt;I also think about migrating this app on WPF to provide better visual experience. I think I will do it in the next 2 releases.&lt;/p&gt;

&lt;h6&gt;&lt;font size="2"&gt;The Entire Sourcecode &lt;/font&gt;&lt;/h6&gt;

&lt;p&gt;Here you can see entire sourcecode file in collapsed way.&lt;/p&gt;

&lt;pre class="brush: c#; collapse: true"&gt;using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Windows.Forms;

// Author : Poperecinii Timur
namespace ViewFile
{
    public partial class ViewFile : Form
    {
        private string _fileName;
        private FileSystemWatcher _fileMonitor;

        private bool _wasChanged;
        private bool _wasRenamed;
        private bool _wasCreated;

        public delegate void LoadContentCallback();

        public ViewFile()
        {
            InitObjects();

            InitializeComponent();
        }

        private void InitObjects()
        {
            _fileName = string.Empty;
        }

        private void btnLoadFile_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();

            ofd.CheckFileExists = true;
            ofd.Multiselect = false;

            DialogResult result = ofd.ShowDialog();

            if (result == DialogResult.OK)
            {
                _fileName = ofd.FileName;

                if (_fileName != string.Empty)
                    LoadFileContent();
            }
        }

        private void LoadFileContent()
        {
            lblFileName.Text = Path.GetFileName(_fileName);

            try
            {
                TextReader tr = new StreamReader(_fileName);
                try
                { txtFileContent.Text = tr.ReadToEnd(); }
                catch (Exception ex)
                { MessageBox.Show(ex.Message); }
                finally
                {
                    tr.Close();

                    StartMonitorization();
                }
            }
            catch (FileNotFoundException ex)
            { MessageBox.Show(&amp;quot;Sorry, the file does not exist.&amp;quot;); }
            catch (UnauthorizedAccessException ex)
            { MessageBox.Show(&amp;quot;Sorry, you lack sufficient privileges.&amp;quot;); }
            catch (Exception ex)
            { MessageBox.Show(ex.Message); }
        }

        private void StartMonitorization()
        {
            _fileMonitor = new FileSystemWatcher(Path.GetDirectoryName(_fileName), Path.GetFileName(_fileName))
                               {
                                   NotifyFilter = NotifyFilters.FileName | NotifyFilters.LastWrite,
                                   IncludeSubdirectories = false
                               };

            _fileMonitor.Changed += FileMonitor_OnChanged;
            _fileMonitor.Created += FileMonitor_OnChanged;
            _fileMonitor.Deleted += FileMonitor_OnDeleted;
            _fileMonitor.Renamed += FileMonitor_OnRenamed;

            _fileMonitor.EnableRaisingEvents = true;
        }

        private void FileMonitor_OnRenamed(object sender, RenamedEventArgs e)
        {
            if (!_wasRenamed)
            {
                DialogResult result = MessageBox.Show(&amp;quot;The file &amp;quot; + e.OldName + &amp;quot; was renamed. \r\n&amp;quot; +
                                                    &amp;quot;Do you want to load the new file ?&amp;quot;, &amp;quot;File was renamed&amp;quot;, MessageBoxButtons.OKCancel);

                _wasRenamed = true;

                if (result == DialogResult.OK)
                {
                    _fileName = e.FullPath;
                    this.BeginInvoke(new LoadContentCallback(LoadFileContent));
                }
            }
            else
            {
                _wasRenamed = false;
            }

        }

        private void FileMonitor_OnDeleted(object sender, FileSystemEventArgs e)
        {
            DialogResult result = MessageBox.Show(&amp;quot;The file &amp;quot; + e.Name + &amp;quot; was deleted. \r\n&amp;quot; +
                                                  &amp;quot;Do you want to remove it from text editor ?&amp;quot;, &amp;quot;File was deleted&amp;quot;,
                                                  MessageBoxButtons.YesNo);

            if (result == DialogResult.Yes)
            {
                _fileMonitor.Dispose();

                this.BeginInvoke(new LoadContentCallback(ResetUiContent));
            }

        }

        private void FileMonitor_OnChanged(object sender, FileSystemEventArgs e)
        {
            if ((!_wasCreated &amp;amp;&amp;amp; e.ChangeType == WatcherChangeTypes.Created) ||
                (!_wasChanged &amp;amp;&amp;amp; e.ChangeType == WatcherChangeTypes.Changed))
            {
                DialogResult result = MessageBox.Show(&amp;quot;The content of the file &amp;quot; + e.Name + &amp;quot; was changed. \r\n&amp;quot; +
                                                      &amp;quot;Do you want to reload it ?&amp;quot;, &amp;quot;File was changed&amp;quot;,
                                                      MessageBoxButtons.OKCancel);

                if (e.ChangeType == WatcherChangeTypes.Changed)
                {
                    _wasChanged = true;
                }
                else
                {
                    _wasCreated = true;
                }

                if (result == DialogResult.OK)
                {
                    this.BeginInvoke(new LoadContentCallback(LoadFileContent));
                }
            }
            else
            {
                if (e.ChangeType == WatcherChangeTypes.Changed &amp;amp;&amp;amp; _wasChanged)
                {
                    _wasChanged = false;
                }
                else if (e.ChangeType == WatcherChangeTypes.Created &amp;amp;&amp;amp; _wasCreated)
                {
                    _wasCreated = false;
                }
            }
        }

        private void ResetUiContent()
        {
            txtFileContent.Text = string.Empty;
            lblFileName.Text = string.Empty;
            _fileName = string.Empty;
        }



        private void btnSaveFile_Click(object sender, EventArgs e)
        {
            SaveFileDialog saveFileDialog = new SaveFileDialog();
            saveFileDialog.Filter = &amp;quot;Text Files (*.txt)|*.txt|C# files (*.cs)|*.cs|All files (*.*)|*.*&amp;quot;;

            saveFileDialog.SupportMultiDottedExtensions = true;

            DialogResult result = saveFileDialog.ShowDialog();

            if (result == DialogResult.OK)
            {
                _fileName = saveFileDialog.FileName;
                
                if (!string.IsNullOrEmpty(_fileName))
                    SaveFileContent();
            }
        }

        private void SaveFileContent()
        {
            lblFileName.Text = Path.GetFileName(_fileName);

            try
            {
                // we'll make only a textual file for instance
                TextWriter tw = File.CreateText(_fileName);

                try
                {
                    tw.Write(txtFileContent.Text);
                }
                catch (Exception ex)
                { MessageBox.Show(ex.Message); }
                finally
                {
                    tw.Close();

                    StartMonitorization();
                }
            }
            catch (UnauthorizedAccessException ex)
            { MessageBox.Show(&amp;quot;Sorry, you lack sufficient privileges.&amp;quot;); }
            catch (Exception ex)
            { MessageBox.Show(ex.Message); }
        }

        private void ViewFile_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.Modifiers == Keys.Control)
            {
                switch (e.KeyCode)
                {
                    case Keys.S:
                        btnSaveFile_Click(btnSaveFile, null);
                        break;
                    case Keys.O:
                        btnLoadFile_Click(btnSaveFile, null);
                        break;
                }
            }
        }
    }
}&lt;/pre&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2127794245010916172-3879233860450767523?l=udevi-community.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udevi-community.blogspot.com/feeds/3879233860450767523/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://udevi-community.blogspot.com/2009/12/code4food-3-text-editor-in-5-minutes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/3879233860450767523'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/3879233860450767523'/><link rel='alternate' type='text/html' href='http://udevi-community.blogspot.com/2009/12/code4food-3-text-editor-in-5-minutes.html' title='Code4Food #3: Text Editor in 5 minutes – Part II. FileSystemWatcher class.'/><author><name>Timur</name><uri>http://www.blogger.com/profile/14594716207428319651</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/_BWELgx6N3yw/S49Bi5bOhxI/AAAAAAAAAcA/Xf12ZX1FEc0/S220/Timur_face.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2127794245010916172.post-688063310804282894</id><published>2009-10-23T01:09:00.001+03:00</published><updated>2009-10-23T12:13:08.546+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Studio 2010'/><category scheme='http://www.blogger.com/atom/ns#' term='.NET 4.0'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows 7'/><category scheme='http://www.blogger.com/atom/ns#' term='Vista'/><title type='text'>Windows 7 officially released today + Visual Studio 2010 Beta 2 is available</title><content type='html'>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h6&gt;&lt;font size="5"&gt;Windows 7&lt;/font&gt;&lt;/h6&gt;  &lt;p&gt;&amp;#160;&lt;img src="http://img16.imageshack.us/img16/5449/win7logoz.jpg" /&gt;&lt;/p&gt;  &lt;p&gt;Hi, &lt;/p&gt;  &lt;p&gt;since the Vista “nightmare” begun, the end-users, Microsoft customers and general client in software development had fear passing multimillion companies to Vista, and after all why XP is bad? What made Vista so bug full ? &lt;/p&gt;  &lt;p&gt;The answer is evident. In windows Vista Microsoft tried to do something very different that they were doing before. With the power of WPF, and a lot of other new features for Windows, as Sidebar for example with all those gadgets, came the possibility to make bugs, because then people try something new, at first it is not really an ideal thing.&lt;/p&gt;  &lt;p&gt;That is why most costumers continued to stay on XP and Microsoft was obliged in a way to make the SP3 for Windows XP. At the same time another team was working on Windows Vista SP1, which eliminated most problems. But these people seem to forget that we had 3 Service packs for XP and the original version was far from ideal too.&lt;/p&gt;  &lt;p&gt;But as clients were already disappointed they were actively refusing to accept Vista as a default OS on their computers, and Microsoft in a year started to develop the new brand Windows 7, which was labeled lately Windows Heaven. :)&lt;/p&gt;  &lt;p&gt;&lt;img src="http://img98.imageshack.us/img98/9936/msstore.jpg" /&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;Windows 7 in comparison with Vista and even XP SP3 is:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font size="4" face="Calibri"&gt;&lt;em&gt;Faster loading, more responsive, more intuitive and much more compatible + ideal on 64 bits machines. You will fall in love with this OS, and I think it is the release which will make people forget about Vista, and try to create with it better quality software. Anyway the future year will show us all the improvements that can be done on Windows 7, because nothing is really ideal.&lt;/em&gt;&lt;/font&gt;&amp;#160; &lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;And it is already released today! So from now on I will also be publishing tips for Windows 7. Hope that you will grab your copy in next months. And by the way here is the link for &lt;font size="5" face="Book Antiqua"&gt;&lt;a href="http://windows.microsoft.com/en-us/windows7/products/system-requirements"&gt;the requirements for Windows 7&lt;/a&gt;.&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;img style="margin: 0px 0px 0px 25px" src="http://img41.imageshack.us/img41/1558/win7ultimatedisk.png" width="322" height="245" /&gt; &lt;/p&gt;  &lt;h6&gt;&lt;font size="5"&gt;Visual Studio 2010 Beta 2&lt;/font&gt;&lt;/h6&gt;  &lt;h6&gt;&lt;font size="5"&gt;&lt;img style="margin: 0px 0px 0px 25px" src="http://img24.imageshack.us/img24/4840/msnetnewlogothumb.png" width="121" height="115" /&gt;&lt;/font&gt;&lt;/h6&gt;  &lt;p&gt;While a lot of us, .NET developers still try to learn all the features from the framework and .NET 3.5 in general, because as one man said&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;font size="5" face="V"&gt;&lt;em&gt;Framework big, brain small :) &lt;/em&gt;&lt;/font&gt;&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;.NET 4.0 is coming out, which a whole new bunch of features and possibilities and a new IDE: Visual Studio 2010 is coming out and bringing with it a lot of goodies. And first what I appreciated was the new look of Visual Studio&lt;/p&gt;  &lt;p&gt;&lt;img src="http://img97.imageshack.us/img97/5708/vs2010splashscreen.png" width="451" height="309" /&gt; &lt;/p&gt;  &lt;p&gt;The new design plus a lot of different new features of Visual Studio 2010, I won’t describe them but I will give you the starting points&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a href="http://channel9.msdn.com/shows/10-4/"&gt;Channel 9’s show 10-4&lt;/a&gt;. It has a lot of content which everyone will like, no matter what kind of developer you are: web developer, office applications, WPF and Silverlight things are all there. So don’t waste more time and check it out. &lt;/li&gt;    &lt;li&gt;&lt;a href="http://weblogs.asp.net/scottgu/archive/2009/08/25/vs-2010-and-net-4-series.aspx"&gt;Visual Studio series&lt;/a&gt; on Scott Guthrie blog. &lt;/li&gt;    &lt;li&gt;&lt;a href="http://hanselman.com"&gt;Scott Hanselman blog&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;And last but not least &lt;a href="http://www.microsoft.com/visualstudio/en-us/products/2010/default.mspx"&gt;Visual Studio 2010 page&lt;/a&gt; and &lt;a href="http://msdn.microsoft.com/en-gb/vstudio/dd582936.aspx"&gt;Beta 2 page&lt;/a&gt;. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;So go and check Visual Studio 2010 Beta 2 right now, because the RTM is announced on March 22, 2010. And we’ll have some time to play with Beta 2.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://msdn.microsoft.com/en-gb/vstudio/dd582936.aspx"&gt;&lt;img style="margin: 0px 0px 0px 25px" src="http://img204.imageshack.us/img204/3442/beta2whatwillyoudo.png" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2127794245010916172-688063310804282894?l=udevi-community.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udevi-community.blogspot.com/feeds/688063310804282894/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://udevi-community.blogspot.com/2009/10/windows-7-officially-released-today.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/688063310804282894'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/688063310804282894'/><link rel='alternate' type='text/html' href='http://udevi-community.blogspot.com/2009/10/windows-7-officially-released-today.html' title='Windows 7 officially released today + Visual Studio 2010 Beta 2 is available'/><author><name>Timur</name><uri>http://www.blogger.com/profile/14594716207428319651</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/_BWELgx6N3yw/S49Bi5bOhxI/AAAAAAAAAcA/Xf12ZX1FEc0/S220/Timur_face.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2127794245010916172.post-8504306254371751190</id><published>2009-10-12T10:36:00.002+03:00</published><updated>2009-10-18T01:52:26.366+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='Evernote'/><category scheme='http://www.blogger.com/atom/ns#' term='Bookmarklets'/><category scheme='http://www.blogger.com/atom/ns#' term='Delicious'/><category scheme='http://www.blogger.com/atom/ns#' term='Google Chrome'/><title type='text'>Tips 003: Integrating Google Chrome with Delicious and Evernote and other cool tools</title><content type='html'>&lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Hi,I use Google Chrome a lot and also I am already used with such beautiful tools which make my life easier and more structured :). One of those tools are &lt;a href="http://delicious.com/"&gt;Delicious bookmarks&lt;/a&gt; and &lt;a href="http://evernote.com"&gt;Evernote notes&lt;/a&gt;. I use them almost everywhere.&lt;/p&gt;  &lt;p&gt;I can talk hours about the worth of both of these tools, but I think about making a special series about useful tools in our life, I will definitely write about Evernote. So enough about that.&lt;/p&gt;  &lt;h2&gt;EVERNOTE&lt;/h2&gt;  &lt;ul&gt;   &lt;li&gt;Go to &lt;a href="http://www.evernote.com/about/download/web_clipper.php"&gt;http://www.evernote.com/about/download/web_clipper.php&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;Drag the indicated button to your Google Chrome bookmark bar &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;img style="margin: 0px 0px 0px 40px" src="http://img67.imageshack.us/img67/4406/dragevernotebutton.png" /&gt; &lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Now to test it, select something on a webpage and click on this bookmark. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;img style="margin: 0px 0px 0px 35px" src="http://img169.imageshack.us/img169/4475/cliptoevernote.png" width="650" height="222" /&gt;&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;So what do you need to do is just login into Evernote and everything selected will be saved as a note. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;img style="margin: 0px 0px 0px 35px" src="http://img10.imageshack.us/img10/6456/noteinevernote.png" width="654" height="171" /&gt; &lt;/p&gt;  &lt;h2&gt;Delicious&lt;/h2&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;Delicious in another cool app which will take care about your bookmarks. You can add tags, description, title to have the possibility to search through all your bookmarks using one of these attributes.&lt;/p&gt;  &lt;p&gt;The annoying thing was that you would usually use the web site of the &lt;a href="http://delicious.com"&gt;Delicious&lt;/a&gt;. What’s why I always liked the add-ons to Firefox and IE from Delicious it permitted me to use a shortcut to bookmark a website directly in Delicious system.&lt;/p&gt;  &lt;p&gt;That’s why I missed it so much in Chrome.&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Here you should find a very nice description how you can add 2 Delicious bookmarklets in Chrome. Just a simple drag-n-drop opperation will make it for you. Now you can see on your Chrome bookmarks bar these 2 buttons. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;img style="margin: 0px 0px 0px 35px" src="http://img197.imageshack.us/img197/8243/deliciousbookmarlets.png" width="653" height="231" /&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;font size="4"&gt;&lt;em&gt;That’s the &lt;font color="#004080"&gt;way&lt;/font&gt; to add &lt;font color="#f20079"&gt;some more functionality&lt;/font&gt; to &lt;font color="#c184ff"&gt;Chrome&lt;/font&gt; while surfing the web with the great speed of JavaScript loading, that it’s offering. I love this browser and I think we could give it even more functionality.&lt;/em&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;em&gt;&lt;font size="4"&gt;If you know &lt;font color="#008040"&gt;any other apps&lt;/font&gt; which can be used with &lt;font color="#8080ff"&gt;Chrome&lt;/font&gt; as well or have &lt;font color="#efd727"&gt;any ideas, words to share&lt;/font&gt;, please leave a &lt;/font&gt;&lt;font color="#ff8000" size="5"&gt;&lt;strong&gt;comment&lt;/strong&gt;&lt;/font&gt;&lt;/em&gt;.&lt;/p&gt;  &lt;p&gt;&lt;font size="4"&gt;&lt;em&gt;&lt;font color="#307869"&gt;&lt;/font&gt;&lt;/em&gt;&lt;/font&gt;.&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2127794245010916172-8504306254371751190?l=udevi-community.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udevi-community.blogspot.com/feeds/8504306254371751190/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://udevi-community.blogspot.com/2009/10/tips-003-integrating-google-chrome-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/8504306254371751190'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/8504306254371751190'/><link rel='alternate' type='text/html' href='http://udevi-community.blogspot.com/2009/10/tips-003-integrating-google-chrome-with.html' title='Tips 003: Integrating Google Chrome with Delicious and Evernote and other cool tools'/><author><name>Timur</name><uri>http://www.blogger.com/profile/14594716207428319651</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/_BWELgx6N3yw/S49Bi5bOhxI/AAAAAAAAAcA/Xf12ZX1FEc0/S220/Timur_face.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2127794245010916172.post-989957658756356947</id><published>2009-10-05T14:58:00.019+03:00</published><updated>2009-12-05T17:12:59.921+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Text editor'/><category scheme='http://www.blogger.com/atom/ns#' term='Code4Food'/><title type='text'>Code4Food #2: Create a Text Editor in 5 minutes. C# - magic</title><content type='html'>Hi, guys!   &lt;div&gt;It is October and it's the time for another Code4Food episode.&lt;/div&gt;  &lt;div&gt;   &lt;br /&gt;&lt;/div&gt;  &lt;div&gt;Today I'm gonna show you some magic. We'll make a text editor in C#. &lt;/div&gt;  &lt;div&gt;   &lt;br /&gt;&lt;/div&gt;  &lt;br /&gt;Here is the sourcecode for Downloading:   &lt;br /&gt;&lt;img border="0" alt="" src="http://img215.imageshack.us/img215/4133/zip.gif" /&gt; &lt;a href="http://www.humyo.com/F/9591867-2192363265"&gt;ViewFile sourcecode&lt;/a&gt;   &lt;br /&gt;  &lt;br /&gt;  &lt;br /&gt;  &lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;span style="text-decoration: underline" class="Apple-style-span"&gt;Note:&lt;span style="font-style: normal; font-weight: normal" class="Apple-style-span"&gt; This part will contain only loading certain file in a textbox.&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;  &lt;div&gt;   &lt;br /&gt;&lt;/div&gt;  &lt;div&gt;&lt;b&gt;1st minute.&lt;/b&gt;&lt;/div&gt;  &lt;div&gt;&lt;b&gt;     &lt;br /&gt;&lt;/b&gt;&lt;/div&gt;  &lt;div&gt;a) Create a new WinForms app in Visual Studio (File -&amp;gt; New -&amp;gt; Project -&amp;gt; Windows Forms Application) and change the name of the project to &lt;span style="color: #339999" class="Apple-style-span"&gt;&lt;b&gt;ViewFile&lt;span&gt;&lt;span&gt;&lt;span&gt;&lt;span&gt;.&lt;span style="color: #000000" class="Apple-style-span"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;  &lt;div&gt;   &lt;br /&gt;&lt;/div&gt;  &lt;div&gt;&lt;span style="color: rgb(0,0,238); -webkit-text-decorations-in-effect: underline" class="Apple-style-span"&gt;&lt;img style="margin: 0px 10px 10px 0px; width: 682px; display: inline; height: 471px; cursor: pointer" border="0" alt="" src="http://img80.imageshack.us/img80/6603/86092130.png" /&gt;&lt;/span&gt;&lt;/div&gt;  &lt;div&gt;   &lt;br /&gt;&lt;/div&gt;  &lt;div&gt;b) Delete the form Form1.cs from the solution.&lt;/div&gt;  &lt;div&gt;   &lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://img203.imageshack.us/img203/2981/88848168.png"&gt;&lt;img style="margin: 0px 10px 10px 0px; width: 271px; float: none; height: 509px; cursor: hand" border="0" alt="" src="http://img203.imageshack.us/img203/2981/88848168.png" /&gt;&lt;/a&gt;     &lt;br /&gt;&lt;/div&gt;  &lt;div&gt;   &lt;br /&gt;&lt;/div&gt;  &lt;div&gt;c) Add a new form to the project and name it ViewFile&lt;/div&gt;  &lt;div&gt;   &lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://img340.imageshack.us/img340/7725/23618651.png"&gt;&lt;img style="margin: 0px 10px 10px 0px; width: 409px; float: none; height: 675px; cursor: hand" border="0" alt="" src="http://img340.imageshack.us/img340/7725/23618651.png" /&gt;&lt;/a&gt;     &lt;br /&gt;&lt;/div&gt;  &lt;div&gt;&lt;b&gt;2nd minute&lt;/b&gt;&lt;/div&gt;  &lt;div&gt;&lt;b&gt;     &lt;br /&gt;&lt;/b&gt;&lt;/div&gt;  &lt;div&gt;a) Open the ViewFile form in Designer mode. Add a textbox to this form and name it txtFileContent. Change it's 'Multiline' property to true, and 'ScrollBars' to 'Both'.&lt;/div&gt;  &lt;div&gt;   &lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://img340.imageshack.us/img340/2494/39076429.png"&gt;&lt;img style="margin: 0px 10px 10px 0px; width: 800px; float: none; height: 620px; cursor: hand" border="0" alt="" src="http://img340.imageshack.us/img340/2494/39076429.png" /&gt;&lt;/a&gt;     &lt;br /&gt;&lt;/div&gt;  &lt;div&gt;b) Change it's size to fit the form. After this change the 'Anchor' property to 'Top, Bottom, Left, Right'.&lt;/div&gt;  &lt;div&gt;   &lt;br /&gt;&lt;/div&gt;  &lt;div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://img80.imageshack.us/img80/5752/33637137.png"&gt;&lt;img style="width: 750px; height: 570px; cursor: pointer" border="0" alt="" src="http://img80.imageshack.us/img80/5752/33637137.png" /&gt;&lt;/a&gt;&lt;/div&gt;  &lt;div&gt;   &lt;br /&gt;&lt;/div&gt;  &lt;div&gt;c) Add a button to the form and name it btnLoadFile and change it's 'Text' property to 'Load File'. &lt;/div&gt;  &lt;div&gt;&lt;/div&gt;  &lt;div&gt;d) Add a button to the form and name it btnSaveFile and change it's 'Text' property to 'Save File'. &lt;/div&gt;  &lt;div&gt;   &lt;br /&gt;&lt;/div&gt;  &lt;div&gt;e) Add a label where we'll show the file name. Name it lblFileName and change it's 'Text' property to 'File Name'&lt;/div&gt;  &lt;div&gt;   &lt;br /&gt;&lt;/div&gt;  &lt;div&gt;f) In Program.cs change the following line so that your application runs the ViewFile form.&lt;/div&gt;  &lt;div&gt;Application.Run(new ViewFile()); &lt;/div&gt;  &lt;div&gt;   &lt;br /&gt;&lt;/div&gt;  &lt;div&gt;At this point you can run the User Interface of our app.&lt;/div&gt;  &lt;div&gt;   &lt;br /&gt;&lt;/div&gt;  &lt;div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://img143.imageshack.us/img143/5527/63271991.png"&gt;&lt;img style="width: 750px; height: 540px; cursor: pointer" border="0" alt="" src="http://img143.imageshack.us/img143/5527/63271991.png" /&gt;&lt;/a&gt;&lt;/div&gt;  &lt;div&gt;   &lt;br /&gt;&lt;/div&gt;  &lt;div&gt;&lt;b&gt;3rd minute&lt;/b&gt;&lt;/div&gt;  &lt;div&gt;&lt;b&gt;     &lt;br /&gt;&lt;/b&gt;&lt;/div&gt;  &lt;div&gt;a) Create a private field _fileName where we'll store the name of the file we want to open. Create than a method where we'll initialize all the fields in our app and name it InitObjects. Initialize there _fileName to string.Empty. Also we'll make the filename label empty for now, because we don't have a file opened.&lt;/div&gt;  &lt;div&gt;   &lt;br /&gt;&lt;/div&gt;  &lt;div&gt;b) Double click the 'Load File' button and in the event generated by Visual Studio create an instance of OpenFileDialog. Set the properties of this instance: 'CheckFileExists' (verifies if the file exists) - true, 'Multiselect' (the ability to select multiple files in the dialog at once) - false. And call the method ShowDialog.&lt;/div&gt;  &lt;div&gt;   &lt;br /&gt;&lt;/div&gt;  &lt;div&gt;c) When the file is selected we'll show in the label only the name of the file which is stored in 'SafeFileName' property of the OpenFileDialog instance. Also save the full path to the file in _fileName field, and it is equal to 'FileName' property of the instance of the dialog.&lt;/div&gt;  &lt;div&gt;   &lt;br /&gt;&lt;/div&gt;  &lt;div&gt;Now our code should look like this:    &lt;br /&gt;    &lt;pre class="brush: c# "&gt;&lt;br /&gt;using System;&lt;br /&gt;using System.Collections.Generic;&lt;br /&gt;using System.ComponentModel;&lt;br /&gt;using System.Data;&lt;br /&gt;using System.Drawing;&lt;br /&gt;using System.IO;&lt;br /&gt;using System.Linq;&lt;br /&gt;using System.Text;&lt;br /&gt;using System.Windows.Forms;&lt;br /&gt;&lt;br /&gt;namespace ViewFile&lt;br /&gt;{&lt;br /&gt;    public partial class ViewFile : Form&lt;br /&gt;    {&lt;br /&gt;        private string _fileName;&lt;br /&gt;&lt;br /&gt;        public ViewFile()&lt;br /&gt;        {&lt;br /&gt;            InitializeComponent();&lt;br /&gt;            InitObjects();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        private void InitObjects()&lt;br /&gt;        {&lt;br /&gt;            lblFileName.Text = string.Empty;&lt;br /&gt;            _fileName = string.Empty;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        private void btnLoadFile_Click(object sender, EventArgs e)&lt;br /&gt;        {&lt;br /&gt;            OpenFileDialog ofd = new OpenFileDialog();&lt;br /&gt;&lt;br /&gt;            ofd.CheckFileExists = true;&lt;br /&gt;            ofd.Multiselect = false;&lt;br /&gt;&lt;br /&gt;            ofd.ShowDialog();&lt;br /&gt;&lt;br /&gt;            _fileName = ofd.FileName;&lt;br /&gt;            lblFileName.Text = ofd.SafeFileName;&lt;br /&gt; }&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;

  &lt;br /&gt;

  &lt;br /&gt;&lt;b&gt;4th minute&lt;/b&gt;&lt;/div&gt;

&lt;br /&gt;

&lt;div&gt;Now what we need to do is read the file and show its content in our textbox.&lt;/div&gt;

&lt;div&gt;We'll use the StreamReader class, specifically its method ReadToEnd() and nested try-catch blocks to catch all the potential exceptions while we are trying to open a file.&lt;/div&gt;

&lt;br /&gt;

&lt;div&gt;So the final version of our app logic is this: 
  &lt;br /&gt;

  &lt;pre class="brush: c#"&gt;&lt;br /&gt;using System;&lt;br /&gt;using System.Collections.Generic;&lt;br /&gt;using System.ComponentModel;&lt;br /&gt;using System.Data;&lt;br /&gt;using System.Drawing;&lt;br /&gt;using System.IO;&lt;br /&gt;using System.Linq;&lt;br /&gt;using System.Text;&lt;br /&gt;using System.Windows.Forms;&lt;br /&gt;&lt;br /&gt;namespace ViewFile&lt;br /&gt;{&lt;br /&gt;    public partial class ViewFile : Form&lt;br /&gt;    {&lt;br /&gt;        private string _fileName;&lt;br /&gt;&lt;br /&gt;        public ViewFile()&lt;br /&gt;        {&lt;br /&gt;            InitializeComponent();&lt;br /&gt;            InitObjects();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        private void InitObjects()&lt;br /&gt;        {&lt;br /&gt;            lblFileName.Text = string.Empty;&lt;br /&gt;            _fileName = string.Empty;&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        private void btnLoadFile_Click(object sender, EventArgs e)&lt;br /&gt;        {&lt;br /&gt;            OpenFileDialog ofd = new OpenFileDialog();&lt;br /&gt;&lt;br /&gt;            ofd.CheckFileExists = true;&lt;br /&gt;            ofd.Multiselect = false;&lt;br /&gt;&lt;br /&gt;            ofd.ShowDialog();&lt;br /&gt;&lt;br /&gt;            _fileName = ofd.FileName;&lt;br /&gt;            lblFileName.Text = ofd.SafeFileName;&lt;br /&gt;            &lt;br /&gt;            if (_fileName != string.Empty)&lt;br /&gt;                LoadFileContent(_fileName);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        private void LoadFileContent(string chosenFileName)&lt;br /&gt;        {&lt;br /&gt;            try&lt;br /&gt;            {&lt;br /&gt;                TextReader tr = new StreamReader(chosenFileName);&lt;br /&gt;                try&lt;br /&gt;                { txtFileContent.Text = tr.ReadToEnd(); }&lt;br /&gt;                catch (Exception ex)&lt;br /&gt;                { MessageBox.Show(ex.Message); }&lt;br /&gt;                finally&lt;br /&gt;                { tr.Close(); }&lt;br /&gt;            }&lt;br /&gt;            catch (System.IO.FileNotFoundException ex)&lt;br /&gt;            { MessageBox.Show(&amp;quot;Sorry, the file does not exist.&amp;quot;); }&lt;br /&gt;            catch (System.UnauthorizedAccessException ex)&lt;br /&gt;            { MessageBox.Show(&amp;quot;Sorry, you lack sufficient privileges.&amp;quot;); }&lt;br /&gt;            catch (Exception ex)&lt;br /&gt;            { MessageBox.Show(ex.Message); }&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;

  &lt;br /&gt;&lt;b&gt;5th minute&lt;/b&gt; 

  &lt;br /&gt;

  &lt;br /&gt;&lt;/div&gt;

&lt;br /&gt;

&lt;div&gt;For now we can really open any file but I wanted to make it look like a source code file. And disable some things we don't actually use.&lt;/div&gt;

&lt;br /&gt;

&lt;div&gt;
  &lt;br /&gt;&lt;/div&gt;

&lt;br /&gt;

&lt;div&gt;a) We'll make the button 'Save File' disabled. Because we don't actually use it.&lt;/div&gt;

&lt;br /&gt;

&lt;div&gt;b) We'll change the 'Font' property of the txtFileContent to 'Courier New; 9pt'&lt;/div&gt;

&lt;br /&gt;

&lt;div&gt;
  &lt;br /&gt;&lt;/div&gt;

&lt;br /&gt;

&lt;div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://img80.imageshack.us/img80/3755/30956120.png"&gt;&lt;img style="width: 634px; height: 561px; cursor: pointer" border="0" alt="" src="http://img80.imageshack.us/img80/3755/30956120.png" /&gt;&lt;/a&gt;&lt;/div&gt;

&lt;br /&gt;

&lt;div&gt;
  &lt;br /&gt;&lt;/div&gt;

&lt;br /&gt;

&lt;div&gt;
  &lt;br /&gt;&lt;/div&gt;

&lt;br /&gt;

&lt;div&gt;&lt;/div&gt;

&lt;br /&gt;

&lt;div&gt;&lt;/div&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2127794245010916172-989957658756356947?l=udevi-community.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udevi-community.blogspot.com/feeds/989957658756356947/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://udevi-community.blogspot.com/2009/10/code4food-2-create-text-editor-in-5.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/989957658756356947'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/989957658756356947'/><link rel='alternate' type='text/html' href='http://udevi-community.blogspot.com/2009/10/code4food-2-create-text-editor-in-5.html' title='Code4Food #2: Create a Text Editor in 5 minutes. C# - magic'/><author><name>Timur</name><uri>http://www.blogger.com/profile/14594716207428319651</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/_BWELgx6N3yw/S49Bi5bOhxI/AAAAAAAAAcA/Xf12ZX1FEc0/S220/Timur_face.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2127794245010916172.post-5171255395293397540</id><published>2009-09-20T21:08:00.004+03:00</published><updated>2009-09-21T21:35:41.998+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Icons'/><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='Vista'/><category scheme='http://www.blogger.com/atom/ns#' term='Thumbnails'/><title type='text'>Tip 002: Thumbnails not showing in Vista, Pictures folder</title><content type='html'>Hi,
once in a while we all have this thing which seems to be a kinda sick problem, because nobody knows  how to deal with it, and more nobody have ever seen or heard about things like that.

There was this guy calling me and saying that he has this kinda crazy problem, he had a lot of photos, but the thumbnails didn't show up no matter what the poor guy was doing about it, just ordinary Vista icon for the image was shown (like mountains or something like that).  First I was thinking that he has some hidden file where all the thumbnails info should be (something like Thumbnails.db in XP), which should deleted and than creating it one more time.

But this wasn't the case. What it turned out to be is a simple option in Tools menu:

Tools -&gt; Folder Options -&gt; View tab -&gt; Advanced settings -&gt; Files and Folders section, the check box  "Always show icons, never thumbnails" should be unchecked.

&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://img503.imageshack.us/img503/5153/tip002.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 396px; height: 479px;" src="http://img503.imageshack.us/img503/5153/tip002.png" alt="" border="0" /&gt;&lt;/a&gt;Because if it is checked, then you'll always see icons instead of thumbnails, and this refers not only to photos but to all kind of files like PDF or video files. So be aware of this option.

See ya!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2127794245010916172-5171255395293397540?l=udevi-community.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udevi-community.blogspot.com/feeds/5171255395293397540/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://udevi-community.blogspot.com/2009/09/tip-002-thumbnails-not-showing-in-vista.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/5171255395293397540'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/5171255395293397540'/><link rel='alternate' type='text/html' href='http://udevi-community.blogspot.com/2009/09/tip-002-thumbnails-not-showing-in-vista.html' title='Tip 002: Thumbnails not showing in Vista, Pictures folder'/><author><name>Timur</name><uri>http://www.blogger.com/profile/14594716207428319651</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/_BWELgx6N3yw/S49Bi5bOhxI/AAAAAAAAAcA/Xf12ZX1FEc0/S220/Timur_face.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2127794245010916172.post-7793859822902020565</id><published>2009-09-19T23:56:00.005+03:00</published><updated>2009-09-21T21:27:52.519+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Bing'/><category scheme='http://www.blogger.com/atom/ns#' term='Yahoo Messenger'/><category scheme='http://www.blogger.com/atom/ns#' term='FarmVille'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft Office'/><category scheme='http://www.blogger.com/atom/ns#' term='Podcasts'/><category scheme='http://www.blogger.com/atom/ns#' term='Twitter'/><category scheme='http://www.blogger.com/atom/ns#' term='Google Chrome'/><title type='text'>PODCAST #2: Microsoft Online Office Tools and Twitter with voice</title><content type='html'>Hi,
today me and my friend &lt;span style="color: rgb(102, 51, 255);font-size:130%;" &gt;Frank&lt;/span&gt; discussed about latest Tech news: &lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold; color: rgb(0, 153, 0);"&gt;Microsoft Online Office Tools&lt;/span&gt;, &lt;span style="font-size:180%;"&gt;Twitter with voice,&lt;/span&gt; FarmVille, Yahoo! Messenger 10 Beta, and improvements into Yahoo! Mail,&lt;/span&gt; &lt;span style="font-style: italic;"&gt;Google Chrome 3.0, &lt;span style=";font-family:verdana;font-size:180%;"  &gt;&lt;span style="color: rgb(204, 0, 0);"&gt;Bing&lt;/span&gt; search engine&lt;/span&gt;.&lt;/span&gt;

So check it out!

&lt;a href="http://www.fileden.com/files/2009/3/9/2355904/podcast_frank_19092009.mp3" class="htrack" tabindex="1" title="PODCAST #2: Microsoft Online Office Tools and Twitter with voice" type="audio/mpeg"&gt;PODCAST #2: Microsoft Online Office Tools and Twitter with voice!&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2127794245010916172-7793859822902020565?l=udevi-community.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udevi-community.blogspot.com/feeds/7793859822902020565/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://udevi-community.blogspot.com/2009/09/podcast-2-microsoft-online-office-tools.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/7793859822902020565'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/7793859822902020565'/><link rel='alternate' type='text/html' href='http://udevi-community.blogspot.com/2009/09/podcast-2-microsoft-online-office-tools.html' title='PODCAST #2: Microsoft Online Office Tools and Twitter with voice'/><author><name>Timur</name><uri>http://www.blogger.com/profile/14594716207428319651</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/_BWELgx6N3yw/S49Bi5bOhxI/AAAAAAAAAcA/Xf12ZX1FEc0/S220/Timur_face.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2127794245010916172.post-4873451363812853859</id><published>2009-09-17T23:39:00.000+03:00</published><updated>2009-09-17T23:42:31.407+03:00</updated><title type='text'>4 Bo0bochka</title><content type='html'>&lt;a href="http://www.fileden.com/files/2009/3/9/2355904/15%20-%20A%20Reminiscent%20Drive%20-%20Ambrosia.mp3" class="htrack" tabindex="1" title="A Reminiscent Drive - Ambrosia" type="audio/mpeg"&gt;A Reminiscent Drive - Ambrosia.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2127794245010916172-4873451363812853859?l=udevi-community.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udevi-community.blogspot.com/feeds/4873451363812853859/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://udevi-community.blogspot.com/2009/09/4-bo0bochka.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/4873451363812853859'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/4873451363812853859'/><link rel='alternate' type='text/html' href='http://udevi-community.blogspot.com/2009/09/4-bo0bochka.html' title='4 Bo0bochka'/><author><name>Timur</name><uri>http://www.blogger.com/profile/14594716207428319651</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/_BWELgx6N3yw/S49Bi5bOhxI/AAAAAAAAAcA/Xf12ZX1FEc0/S220/Timur_face.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2127794245010916172.post-6267350875334185191</id><published>2009-09-15T23:30:00.000+03:00</published><updated>2009-09-17T12:10:02.284+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Linux'/><category scheme='http://www.blogger.com/atom/ns#' term='Windows 7'/><category scheme='http://www.blogger.com/atom/ns#' term='Unix'/><category scheme='http://www.blogger.com/atom/ns#' term='Video Players'/><category scheme='http://www.blogger.com/atom/ns#' term='Podcasts'/><category scheme='http://www.blogger.com/atom/ns#' term='Laptop'/><title type='text'>PODCAST #1: First try on random topics</title><content type='html'>&lt;span class="Apple-style-span"  style="font-size:large;"&gt;Hi,&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;today i've tried to configure my software properties to make it possible to record a podcast.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;I've tested this posibility with my friend &lt;span class="Apple-style-span"  style="font-size:x-large;"&gt;&lt;span class="Apple-style-span"  style="color:#009900;"&gt;Rajib from India&lt;/span&gt;&lt;/span&gt;, we're talking here about lots of topics like &lt;span class="Apple-style-span"  style="font-size:large;"&gt;&lt;i&gt;&lt;span class="Apple-style-span"  style="color:#000099;"&gt;Unix-like systems, Windows 7, best configuration for an ultimate laptop, Video players...&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;So this is a sample. Hope you will like it and I will be able to do this another time.&lt;/div&gt;

&lt;span class="Apple-style-span"  style="font-size:large;"&gt;&lt;a href="http://www.fileden.com/files/2009/3/9/2355904/rajib_podcast_15092009.mp3" class="htrack" tabindex="1" title="PODCAST #1: First try - Rajib &amp;amp; I" type="audio/mpeg"&gt;Listen or download : PODCAST #1 : First try - Rajib &amp;amp; I.&lt;/a&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2127794245010916172-6267350875334185191?l=udevi-community.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udevi-community.blogspot.com/feeds/6267350875334185191/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://udevi-community.blogspot.com/2009/09/podcast-1-first-try-on-random-topics.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/6267350875334185191'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/6267350875334185191'/><link rel='alternate' type='text/html' href='http://udevi-community.blogspot.com/2009/09/podcast-1-first-try-on-random-topics.html' title='PODCAST #1: First try on random topics'/><author><name>Timur</name><uri>http://www.blogger.com/profile/14594716207428319651</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/_BWELgx6N3yw/S49Bi5bOhxI/AAAAAAAAAcA/Xf12ZX1FEc0/S220/Timur_face.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2127794245010916172.post-3076038861540861302</id><published>2009-09-09T10:47:00.000+03:00</published><updated>2009-09-09T14:23:57.432+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='courses'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='Udev&apos;itRight'/><title type='text'>New Udevi C# courses: Udev'itRight</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://img233.imageshack.us/img233/1940/redsquaretuthillbig.jpg"&gt;&lt;/a&gt;
&lt;div&gt;Hi,&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;I decided to start C# begginers courses online.&lt;/div&gt;&lt;div&gt;I'll cover 3 main branches of applications:&lt;/div&gt;&lt;div&gt;1. Desktop app (console, WinForms, WPF)&lt;/div&gt;&lt;div&gt;2. Web apps (ASP.NET MVC, Silverlight)&lt;/div&gt;&lt;div&gt;3. Mobile Apps (Windows Mobile)&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;and the course itself will consist in writting 3 different applications:&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://img233.imageshack.us/img233/9310/600pxnuvolaappsimportanu.png"&gt;&lt;img src="http://img233.imageshack.us/img233/9310/600pxnuvolaappsimportanu.png" border="0" alt="" style="float: left; margin-top: 0px; margin-right: 10px; margin-bottom: 10px; margin-left: 0px; cursor: pointer; width: 150px; height: 125px; " /&gt;&lt;/a&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-family:arial;"&gt;1st app - &lt;span class="Apple-style-span"  style="color:#009900;"&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;Green&lt;/span&gt;&lt;/span&gt; Application - will be a simple app, which will be made by 2 of us, me and my student. Here I'm gonna try to put the basics of real project knowledges like team work, versionning source code software, code comments, bugtracking and also try to put my student to work. I mean really... put his brain in action, get some logical stuff to do.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="white-space: pre;"&gt;
&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;img src="http://img233.imageshack.us/img233/6641/2008convertibleyellowed.jpg" border="0" alt="" style="float: left; margin-top: 0px; margin-right: 10px; margin-bottom: 10px; margin-left: 0px; cursor: pointer; width: 150px; height: 107px; " /&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-tab-span"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;2nd app - &lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;&lt;span class="Apple-style-span"  style="color:#FFFF00; background-color:#000000;"&gt;Yellow&lt;/span&gt;&lt;/span&gt;&lt;/b&gt; Application will be more complicated so my student could progress and dive into Programming wolrd himself. But any student may need some help in DEV process, so i'm gonna just give him some advices, may be directions.  The yellow level can really permit it. The application itself will have more functional stuff than green app had. Plus it will have a technique to learn as a bonus (it is just a plan for now so let it be a little secret)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; "&gt;&lt;img src="http://img233.imageshack.us/img233/1940/redsquaretuthillbig.jpg" border="0" alt="" style="float: left; margin-top: 0px; margin-right: 10px; margin-bottom: 10px; margin-left: 0px; cursor: pointer; width: 150px; height: 150px; " /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;3rd app - &lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:large;"&gt;&lt;span class="Apple-style-span"  style="color:#CC0000;"&gt;Red&lt;/span&gt;&lt;/span&gt;&lt;/b&gt; application - the highest level of complexity (for begginers), no chance to ask me for an advice, it will be the work of the student itself. Nice bussiness apps with clean functionality, without bugs, with commented code and a series of tests runned over this code. That's what I call the highest level of quality. I know that will be some persons who just won't make it. But that's ok... at least you've tried it and you will know your errors: what was done wrong, where you should pay more attention. Because this is really what we are doing, helping people to get experience.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;So i'm gonna try to combine more persons (5-6)  in a team. And work individually and in team with these persons. Aproximate period of courses duration is 4-5 months. 2 times a week for 2 hours each time.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;You need to have &lt;i&gt;skype&lt;/i&gt; and &lt;i&gt;Mikogo&lt;/i&gt; installed.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;I'll covering a wide range of subjects.  &lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;So if you want to join you should put a comment to this post and give me some details so I could contact you. Or just email me at &lt;i&gt;&lt;b&gt;monomachus85@yahoo.com. &lt;/b&gt;&lt;/i&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;
&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-family:'lucida grande';"&gt;P.S. I am thinking now about improvements to Frank Car System, so if you have some thoughts about that you can comment that post as well.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2127794245010916172-3076038861540861302?l=udevi-community.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udevi-community.blogspot.com/feeds/3076038861540861302/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://udevi-community.blogspot.com/2009/09/new-udevi-c-courses.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/3076038861540861302'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/3076038861540861302'/><link rel='alternate' type='text/html' href='http://udevi-community.blogspot.com/2009/09/new-udevi-c-courses.html' title='New Udevi C# courses: Udev&apos;itRight'/><author><name>Timur</name><uri>http://www.blogger.com/profile/14594716207428319651</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/_BWELgx6N3yw/S49Bi5bOhxI/AAAAAAAAAcA/Xf12ZX1FEc0/S220/Timur_face.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2127794245010916172.post-8633959015758139073</id><published>2009-09-02T20:17:00.000+03:00</published><updated>2009-09-05T06:58:28.002+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Code4Food'/><title type='text'>Code4Food #1: Frank Car Assistant application.</title><content type='html'>Hi!

There are a lot of situations when you as a programmer need to code just for 5 bucks. Of course you don't have to put your soul in these kind of programs, if you don't want to, but remember if you will make a nice piece of code, which will satisfy all client's requirements, you will definitely be able to buy some caviar as a bonus to your butter and bread.

Ladies and gents, &lt;span style="font-weight: bold;"&gt;Code4Food&lt;/span&gt; series is starting.

Yesterday I was talking to my online friend Frank. He already studied Java programming language so I thought I should  presented him C# language, writing down some simple examples.

I'm gonna try to present you the same thing using the same examples.

Here is the sourcecode for Downloading:

&lt;img src="http://img215.imageshack.us/img215/4133/zip.gif" alt="" border="0" /&gt; &lt;a href="http://www.filefreak.com/files/60226_wc474/FrankTestConsoleApp.zip"&gt;FrankTestConsoleApp sourcecode&lt;/a&gt;
&lt;img src="http://img215.imageshack.us/img215/4133/zip.gif" alt="" border="0" /&gt; &lt;a href="http://www.filefreak.com/files/60225_ghol5/FrankCarAssistant.zip"&gt;FrankCarAssistant sourcecode&lt;/a&gt;

&lt;h2 style="font-size: 20px;"&gt;"Hello World"&lt;/h2&gt;
So first program is like always HelloWorld

1. File -&gt; New -&gt; Project
2. Choose Project types -&gt; Visual C# -&gt; Windows -&gt; In templates choose &lt;span style="font-weight: bold;font-family:trebuchet ms;"&gt;Console Application&lt;/span&gt;
3. Choose a name for your project. In my case I chosen the name &lt;span style="font-family:courier new;"&gt;FrankTestConsoleApp&lt;/span&gt;.

In Program.cs file we will have the following thing:
&lt;pre class="brush: c#"&gt;using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FrankTestConsoleApp
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!!!");

            Console.ReadKey();
        }
    }
}
&lt;/pre&gt;
Another thing that I was showing was some loops from C#. We first create an array of strings and than we call each string using different loops.
&lt;pre class="brush: c#"&gt;using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FrankTestConsoleApp
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] names = { "Frank", "Timur", "Jessica", "Helen" };

            Console.WriteLine("=======FOR loop=========");

            for (int i = 0; i &amp;lt; names.Length; i++)
            {
                Console.WriteLine("Hello {0}!", names[i]);
            }

            Console.WriteLine("=======FOREACH loop=========");

            foreach (string name in names)
            {
                Console.WriteLine("Hello {0}!", name);
            }

            Console.WriteLine("=======WHILE loop=========");

            int index = 0;

            while (index &amp;lt; names.Length)
            {
                Console.WriteLine("Hello {0}!", names[index]);
                index++;
            }

            Console.ReadKey();
        }
    }
}
&lt;/pre&gt;
So the result is the same for each loop.

&lt;img src="http://img76.imageshack.us/img76/702/frankconsoletestappoutp.png" alt="" border="0" /&gt;

&lt;h2 style="font-size: 20px;"&gt;Car class&lt;/h2&gt;
The next thing we did was creating a Class Library Project &lt;span style="font-weight: bold;"&gt;CarsModel&lt;/span&gt;.


1. File -&gt; New -&gt; Project
2. Choose Project types -&gt; Visual C# -&gt; Windows -&gt; In templates choose &lt;span style="font-weight: bold;font-family:trebuchet ms;"&gt;Class Library&lt;/span&gt;

When you create a Class Library project it means that all the classes which will be in this project will be built into a single .DLL file. A DLL file can contain multiple &lt;span style="font-family:courier new;"&gt;namespaces&lt;/span&gt;.

In this project we created a class Car which contains 2 properties: int WheelNumber and a string Name, and a method PrintInfo, and 2 constructors.

A property is a public accessor to a private field of the class. This is an analog for Java's get and set methods.

For example: we have a private field _wheelsNumber which can be accessed by other classes using the WheelNumber property.

A property can have 2 parts &lt;span style="font-weight: bold;"&gt;get&lt;/span&gt; and &lt;span style="font-weight: bold;"&gt;set&lt;/span&gt;. When you have in your property the get part it means that the other class can read the value of your private field. The set part  of the property allows to set a value for the private field of the class.

In fact when you read a property (ex.: &lt;span style="font-family:courier new;"&gt;int numberOfCars = car.WheelNumber&lt;/span&gt;) everything inside the &lt;span style="font-weight: bold;"&gt;get&lt;/span&gt; part is executed (in our case it's  &lt;span style="font-family:courier new;"&gt;get { return _wheelsNumber; }&lt;/span&gt;).

When you write a value into a property (ex.: &lt;span style="font-family:courier new;"&gt;car.WheelNumber = 3&lt;/span&gt;) everything inside the &lt;span style="font-weight: bold;"&gt;set&lt;/span&gt; part is executed.

You can have properties with &lt;span style="text-decoration: underline;"&gt;only get&lt;/span&gt; or &lt;span style="text-decoration: underline;"&gt;only set&lt;/span&gt; part. It means that you can only read or write into this property.

The &lt;span style="font-weight: bold;"&gt;PrintInfo&lt;/span&gt; method was only used for printing to our console the Car data (name and wheels number).

By creating this method into the Car class we made it possible to call this method from the class instance (ex.: &lt;span style="font-family:courier new;"&gt;car.PrintInfo()&lt;/span&gt;).

This way of programming is called &lt;span style="font-style: italic;"&gt;to delegate to an object a method&lt;/span&gt;, usually it is used when you refactor your old code and you see that a method only uses the  instance of a class, for example &lt;span style="font-weight: bold;"&gt;X&lt;/span&gt;. It is than logically to move this method into the class X itself, than you can simple call &lt;span style="font-family:courier new;"&gt;x.RefactoredMethod()&lt;/span&gt;

In this class we also have 2 constuctors with and without parameters. The constructor with parameters initializes the properties of this class. The default constructor (without parameters) initializes the properties with its default values (for int it is 0, and for string it's &lt;span style="font-family:courier new;"&gt;string.Empty&lt;/span&gt;).

&lt;pre class="brush: c#"&gt;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CarsModel
{
    public class Car
    {
        private int _wheelsNumber = 0;

        public int WheelNumber
        {
            get { return _wheelsNumber; }
            set { _wheelsNumber = value; }
        }

        private string _name = string.Empty;

        public string Name
        {
            get { return _name; }
            set { _name = value; }
        }

        public Car()
        {

        }

        public Car(int wheelz, string carName)
        {
            this.WheelNumber = wheelz;
            this.Name = carName;
        }

        public void PrintInfo()
        {
            Console.WriteLine(this.Name);
            Console.WriteLine(this.WheelNumber);
            Console.WriteLine("=================");
        }
    }
}
&lt;/pre&gt;

&lt;h2 style="font-size: 20px;"&gt;Frank Car Assistant Console Application&lt;/h2&gt;
Than we build the project and added its DLL file to the references of the FranksTestConsoleApp, and made a little console application which I'm gonna try to explain.

&lt;pre class="brush: c#"&gt;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CarsModel;

namespace FrankTestConsoleApp
{
    class Program
    {
        static void Main(string[] args)
        {
            List&amp;lt;Car&amp;gt; listCar = new List&amp;lt;Car&amp;gt;();

            Car franksCar = new Car(2, "Honda Civic");
            Car timurCar = new Car(1, "4x4");

            listCar.Add(franksCar);
            listCar.Add(timurCar);
            listCar.Add(new Car(14, "Jessica"));

            bool iWantToLeave = false;

            while (!iWantToLeave)
            {
                Console.WriteLine(Environment.NewLine);

                PrintHelp();

                Console.WriteLine(Environment.NewLine);

                int numberEntered = int.Parse(Console.ReadLine());

                switch (numberEntered)
                {
                    case 2: RemoveCarFromList(listCar);
                        break;
                    case 3: listCar.Add(AddNewCar());
                        break;
                    case 4: iWantToLeave = true;
                        break;
                    default: ShowMeTheCars(listCar);
                        break;
                }
            }

            Console.WriteLine("Bye");

            Console.ReadKey();
        }

        /// &lt;summary&gt;
        /// Prints the current list of cars.
        /// &lt;/summary&gt;
        /// The lists of cars.
        private static void ShowMeTheCars(List&amp;lt;Car&amp;gt; listCar)
        {
            Console.WriteLine(Environment.NewLine);

            foreach (Car carName in listCar)
            {
                carName.PrintInfo();
            }
        }

        /// &lt;summary&gt;
        /// Prints the help.
        /// &lt;/summary&gt;
        private static void PrintHelp()
        {
            Console.WriteLine("This is the Frank car system assistant");
            Console.WriteLine("PRESS");
            Console.WriteLine("1 - To see the list of the cars");
            Console.WriteLine("2 - To remove a car from the list");
            Console.WriteLine("3 - To add a car to the list of the cars");
            Console.WriteLine("4 - To say 'Bye'");
        }

        /// &lt;summary&gt;
        /// Adds the new car.
        /// &lt;/summary&gt;
        /// &lt;returns&gt;The new car object&lt;/returns&gt;
        private static Car AddNewCar()
        {
            Console.WriteLine("Enter the name of the car: ");
            string name = Console.ReadLine();
            Console.WriteLine("Enter the number of wheels: ");
            int number = int.Parse(Console.ReadLine());

            return new Car(number, name);
        }

        /// &lt;summary&gt;
        /// Removes the car from list.
        /// &lt;/summary&gt;
        /// The list of cars.
        private static void RemoveCarFromList(List&amp;lt;Car&amp;gt; listCar)
        {
            string nameOfTheCar = Console.ReadLine();

            Car searchedCar = listCar.Find(delegate(Car car) { return car.Name == nameOfTheCar; });

            if (searchedCar == null)
            {
                Console.WriteLine("ERROR! We don't have this car, really, don't try to find it.");
                return;
            }

            listCar.Remove(searchedCar);
        }

    }
}
&lt;/pre&gt;
So first I'm gonna explain what this application is doing. So it can print you the help menu and depending on the part you select, it can show the list of cars available with it's characteristics, add a new car or remove a car with a certain name.

The PrintHelp method only prints some bunch of strings.

In the beggining of our Main method what we do is initialize a List of our object Car from CarsModel namespace, and we add some custom cars in it.

&lt;pre class="brush: c#"&gt;
List&amp;lt;Car&amp;gt; listCar = new List&amp;lt;Car&amp;gt;();

Car franksCar = new Car(2, "Honda Civic");
Car timurCar = new Car(1, "4x4");

listCar.Add(franksCar);
listCar.Add(timurCar);
listCar.Add(new Car(14, "Jessica"));
&lt;/pre&gt;In the &lt;span style=" font-weight: bold;font-family:courier new;"&gt;AddNewCar &lt;/span&gt;method we create a new car by entering its name and the number of the wheels for this particular car and than return this car.

&lt;span style=" font-weight: bold;font-family:courier new;"&gt;ShowMeTheCars &lt;/span&gt;method calls for each Car object from a list of cars (listCar) its method PrintInfo().

The most interesting method is &lt;span style=" font-weight: bold;font-family:courier new;"&gt;RemoveCarFromList &lt;/span&gt;method. &lt;span style="font-style: italic; color: rgb(0, 102, 0);"&gt;What I am doing there is trying to show the power of List objects in C#.&lt;/span&gt;

Firstly we have a &lt;span style="font-family:courier new;"&gt;Find&lt;/span&gt; method in List object which permits us to find an object from the list which satisfy a specified condition.

&lt;span style="font-family:courier new;"&gt;Car searchedCar = listCar.Find(delegate(Car car) { return car.Name == nameOfTheCar; })&lt;/span&gt;;

In this example the condition is that the name of the car which we indicated (&lt;span style="font-family:courier new;"&gt;nameOfTheCar&lt;/span&gt;) should coincide with the car's name from the list (car.Name). And for formulating it we create a delegate with the list's object as an argument which should return a boolean value (true or false), according to specified condition.

Than in Main method we create a boolean field &lt;span style=" font-style: italic;font-family:courier new;"&gt;iWantToLeave = false&lt;/span&gt;, and we will loop, while we'll want to leave.

Firstly we'll call &lt;span style=" font-weight: bold;font-family:courier new;"&gt;PrintHelp &lt;/span&gt;method, than we'll parse the introduced number, and will pass this number in a switch statement, and treat each case apart.

Notice that we'll have a default case, when any other number than specified in case statements will be introduced.

If the user choose the exit option I just set the field &lt;span style=" font-style: italic;font-family:courier new;"&gt;iWantToLeave = true&lt;/span&gt; and the while condition isn't already passed and we close the app.&lt;div&gt;
&lt;/div&gt;&lt;div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://img245.imageshack.us/img245/6847/frankscarassistantconso.png"&gt;&lt;img src="http://img245.imageshack.us/img245/6847/frankscarassistantconso.png" border="0" alt="" style="cursor: pointer; width: 517px; height: 577px; " /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;&lt;h2 style="font-size: 20px; "&gt;Frank Car Assistant App&lt;/h2&gt;&lt;div&gt;Now we need to translate the application logic from a console app to a windows forms app.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;1. File -&gt; New -&gt; Project
2. Choose Project types -&gt; Visual C# -&gt; Windows -&gt; In templates choose &lt;span class="Apple-style-span"  style="font-family:'trebuchet ms';"&gt;&lt;b&gt;Windows Forms Application&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;First we draw our form. And add into references of this project the &lt;i&gt;CarsModel.dll&lt;/i&gt; file.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;                                    &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://img215.imageshack.us/img215/3251/frankscarassistantform.png"&gt;&lt;img src="http://img215.imageshack.us/img215/3251/frankscarassistantform.png" border="0" alt="" style="cursor: pointer; width: 304px; height: 299px; " /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;Now for the &lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;b&gt;Add Car&lt;/b&gt;&lt;/span&gt; and &lt;span class="Apple-style-span"  style="font-family:verdana;"&gt;&lt;b&gt;Remove Car&lt;/b&gt;&lt;/span&gt; buttons we use the same code as for our console application. &lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;The interesting part comes  to populating our listbox and refreshing it.&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;For populating listbox we added this code:&lt;/div&gt;&lt;div&gt;
&lt;pre class="brush: c#"&gt;
BindingSource bSource = new BindingSource();
...
private void Form1_Load(object sender, EventArgs e)
{
   InitListOfCars(listCar);

   bSource.DataSource = listCar;

   lstCars.DataSource = bSource;
   lstCars.DisplayMember = "Name";
}
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;
This means we have a binding source and we put it it (as its Datasource) the list of our cars. Now we put this binding source as Datasource of the listbox. In listbox.DisplayMember we choose the property of our object which will be shown in listbox, in our case it is name that we want to show.

We decided that we need to fill in the textboxes with the data of selected car.

This is made by this code:
&lt;pre class="brush: c#"&gt;
private void lstCars_SelectedIndexChanged(object sender, EventArgs e)
{
   txtCarName.Text = (lstCars.SelectedItem as Car).Name;
   txtNumberOfWheels.Text = (lstCars.SelectedItem as Car).WheelNumber.ToString();
}
&lt;/pre&gt;

And we most difficult part was to find out how to update listbox data when we add or remove a Car object.

The solution s this line: &lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;bSource.ResetBindings(true); &lt;span class="Apple-style-span"  style="font-family:Georgia;"&gt;the program generates automatically a Reload event when the flag is equal to true, and the datasource for bindingSource is reloaded.&lt;/span&gt;&lt;/span&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://img168.imageshack.us/img168/2505/frankscarassistantforme.png"&gt;&lt;img src="http://img168.imageshack.us/img168/2505/frankscarassistantforme.png" border="0" alt="" style="cursor: pointer; width: 296px; height: 297px; " /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;
&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-family:Georgia;"&gt;
So that have been the longest post of mine so far, but we've done a lot of stuff this time. Hope you liked it!
Next time we'll be thinking about possible improvements and bugs in Frank Car Assistant application, and will try to fix them.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2127794245010916172-8633959015758139073?l=udevi-community.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udevi-community.blogspot.com/feeds/8633959015758139073/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://udevi-community.blogspot.com/2009/09/code4food-1-frank-car-assistant.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/8633959015758139073'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/8633959015758139073'/><link rel='alternate' type='text/html' href='http://udevi-community.blogspot.com/2009/09/code4food-1-frank-car-assistant.html' title='Code4Food #1: Frank Car Assistant application.'/><author><name>Timur</name><uri>http://www.blogger.com/profile/14594716207428319651</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/_BWELgx6N3yw/S49Bi5bOhxI/AAAAAAAAAcA/Xf12ZX1FEc0/S220/Timur_face.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2127794245010916172.post-3476798444215108916</id><published>2009-08-25T23:07:00.000+03:00</published><updated>2009-09-04T07:58:22.498+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Agora'/><title type='text'>Agora : Projecting the model. Part 1</title><content type='html'>The model.

What is actually model? Model is the representation of all objects in our system. Having the model projected, we can easily implement that in data base.

How do we project the model ?

We need to create a model using all the infos we have about the application we need to do. And we need to use that data to create the main objects with their properties and methods.

Today I am going to try something different. I am going to explain everything in my video. This is a new format for me and I hope you'll like it. We'll only create the first half of the model.

&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="viddler_9236e21" width="437" height="295"&gt;&lt;param name="movie" value="http://www.viddler.com/player/9236e21/"&gt;&lt;param name="allowScriptAccess" value="always"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;embed src="http://www.viddler.com/player/9236e21/" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" name="viddler_9236e21" width="600" height="400"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2127794245010916172-3476798444215108916?l=udevi-community.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udevi-community.blogspot.com/feeds/3476798444215108916/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://udevi-community.blogspot.com/2009/08/agora-projecting-model-part-1.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/3476798444215108916'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/3476798444215108916'/><link rel='alternate' type='text/html' href='http://udevi-community.blogspot.com/2009/08/agora-projecting-model-part-1.html' title='Agora : Projecting the model. Part 1'/><author><name>Timur</name><uri>http://www.blogger.com/profile/14594716207428319651</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/_BWELgx6N3yw/S49Bi5bOhxI/AAAAAAAAAcA/Xf12ZX1FEc0/S220/Timur_face.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2127794245010916172.post-6522102260045798792</id><published>2009-08-17T22:16:00.000+03:00</published><updated>2009-09-04T08:03:33.728+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='application'/><category scheme='http://www.blogger.com/atom/ns#' term='Scrum'/><category scheme='http://www.blogger.com/atom/ns#' term='Agora'/><title type='text'>My New Application: Agora.</title><content type='html'>Hi,

It was a pretty big period of time while I wasn't posting anything, but I do have a work, and some personal problems like everyone do, I guess. I am posting here some thoughts about programming.

&lt;span style="font-weight: bold;"&gt;New App:  Accounting Application&lt;/span&gt;

So now about the new application. I will be doing a new application for Accounting. It will be a simple application and I will be constantly adding some functionality to it. And may be this will become something interesting.

&lt;span style="font-weight: bold; font-style: italic;"&gt;Methodology&lt;/span&gt;

I'll try to mix some new things in this app. From the ideological view I'll use Agile Scrum methodology. Read more about it in &lt;a href="http://en.wikipedia.org/wiki/Scrum_%28development%29"&gt;Wikipedia&lt;/a&gt;.

Our idea will be dividing the future functionalities in sprints.
Every sprint will have a defined number of tasks.
Each task will cost points depending on its difficulty.
A deadline will be established. If we can't realize everything in time, some functionalities will be moved to next sprint. &lt;span style="font-style: italic;"&gt;THE DEADLINE CAN'T BE MOVED&lt;/span&gt;.

Every functionality should be tested by a number of unit tests + some integration tests. This is done to achieve 2 things: granularity of my application + testability. The better number of coverage will be, the less space will be available for bugs, and the quality of the end product will be better.

For tests we'll be using mocks in some places.

&lt;span style="font-style: italic;"&gt;Application Overview&lt;/span&gt;

The codename is &lt;a href="http://en.wikipedia.org/wiki/Agora"&gt;Agora&lt;/a&gt;.

The application will contain some functionalities:

1. Placing some products in stock
2. Removing products from stock
3. Introducing the products sold for each day
4. Searching products - filters, sorting.
5. Viewing products in stock.
6. Calculating the sums for the month, week, day, period of time. Configuring a number of working hours for a particular day.
7. Calculating the salary of a particular seller on this period.
8. Different sellers.
9. Administration part: 2 types of Users, administrator and simple user.
10. Configuring the salary of the seller: optionally, percentage from sales, fixed salary.
11. Viewing the working days of a particular seller.
12. Setting price, changing price for a product.
13. Some options for configuration of DB. Postgres? Access? MySQL?  port, host.

I'll be thinking about the future architecture of the application.

In the meanwhile you can add/complete some functionalities.

To be continued...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2127794245010916172-6522102260045798792?l=udevi-community.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udevi-community.blogspot.com/feeds/6522102260045798792/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://udevi-community.blogspot.com/2009/08/my-new-application-agora.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/6522102260045798792'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/6522102260045798792'/><link rel='alternate' type='text/html' href='http://udevi-community.blogspot.com/2009/08/my-new-application-agora.html' title='My New Application: Agora.'/><author><name>Timur</name><uri>http://www.blogger.com/profile/14594716207428319651</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/_BWELgx6N3yw/S49Bi5bOhxI/AAAAAAAAAcA/Xf12ZX1FEc0/S220/Timur_face.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2127794245010916172.post-9015195556513525703</id><published>2009-03-25T03:21:00.000+02:00</published><updated>2009-09-04T08:01:45.983+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Udevi'/><category scheme='http://www.blogger.com/atom/ns#' term='MVC Madness'/><title type='text'>Welcome a brand new starting series of posts: MVC Madness</title><content type='html'>&lt;img style="width: 680px; height: 168px;" src="http://img222.imageshack.us/img222/4443/mvcmadness.png" title="MVC Madness" border="0" /&gt;


Hi. A few months ago I've started to read about the ASP.NET MVC. And I loved what I saw there. I thought about comparing it to existing &lt;span style="font-size:130%;"&gt;&lt;span style="color: rgb(153, 51, 153);font-family:verdana;" &gt;MVC frameworks&lt;/span&gt;&lt;/span&gt; in another languages and here we go, I've decided to make a series of posts with examples and snippets from each framework.

Here what we have at the moment:
&lt;ul&gt;&lt;li&gt;&lt;span style=";font-family:arial;font-size:130%;"  &gt;ASP.NET MVC 1.0&lt;/span&gt; - the new released framework which allows us to have better control on page, cleaner HTML source, nice url formatting - routing, and all this is still ASP.NET&lt;/li&gt;&lt;li&gt;&lt;span style=";font-family:arial;font-size:130%;"  &gt;Symfony&lt;/span&gt; - a PHP framework which I will learn about, and you will obviously gonna help me with this.&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:130%;"&gt;&lt;span style="font-family:arial;"&gt;Lift&lt;/span&gt;&lt;/span&gt; - also a new 1.0 framework which is based on &lt;span style="font-size:130%;"&gt;&lt;span style="color: rgb(153, 153, 153);"&gt;Scala&lt;/span&gt;&lt;/span&gt;. Scala is a object-oriented and at the same time functionnal programming language which sits on top of Virtual Machine and lets you have a scalable application using the Scala itself and the libraries from the language which it exploits. For example Scala which sits on the top of Java VM, can use java libraries in Scala by importing them, and by that we achieve an interop language with objected-oriented and functionnal paradigm at the same time. Well some day I'll post particularily about Scala. So Lift is based on Scala and with this framework we can easy create a various range of &lt;span style="color: rgb(0, 153, 0);"&gt;Web 2.0&lt;/span&gt; sites and by that I mean&lt;span style="font-weight: bold;"&gt; &lt;/span&gt;&lt;span style="color: rgb(51, 51, 51); font-weight: bold;font-family:trebuchet ms;" &gt;Ajax/COMET, jQuery and other technologies&lt;/span&gt; used in &lt;span style="color: rgb(0, 153, 0);"&gt;Web 2.0&lt;/span&gt;.&lt;/li&gt;&lt;li&gt;&lt;span style=";font-family:arial;font-size:130%;"  &gt;Spring&lt;/span&gt; - well, this framework is a widely known one. I wanted to present examples in Jakarta Struts, but I've decided that it will be better for me to learn something new, and particularily Spring. By the way, there are a lot of opinions on the Web that point us to idea that Struts has poorly implemented MVC. And that a better implementation is present in Spring. So I'm gonna give it a try.&lt;/li&gt;&lt;/ul&gt;May be there are languages and frameworks which I didn't cover yet, but you would like me to cover. If so let me know about it. I'll see what we can do. By the way, any examples of using MVC in desktop applications?

&lt;span style="font-style: italic;"&gt;So a little bit about the pattern itself.&lt;/span&gt;

It is an old pattern. &lt;a href="http://en.wikipedia.org/wiki/Model-view-controller"&gt; MVC&lt;/a&gt; was first described in 1979 by &lt;a href="http://en.wikipedia.org/wiki/Trygve_Reenskaug" title="Trygve Reenskaug"&gt;Trygve Reenskaug&lt;/a&gt;, who came from that interesting programming community of Smalltalk (we know all the other guys too, Kent Beck, Ward Cunningham, Martin Fowler, and others). It was introduced to separate different functional parts of application, and by that we achieve loused coupling of different parts of a system. So changing one part will not head to changing in all the parts.

&lt;span style="font-weight: bold; font-style: italic;"&gt;So what is it anyway?&lt;/span&gt;

&lt;ul&gt;&lt;li&gt;&lt;span style="color: rgb(51, 102, 255);font-family:georgia;font-size:130%;"  &gt;&lt;span style="font-weight: bold;font-size:180%;" &gt;&lt;span style="font-family:courier new;"&gt;M&lt;/span&gt;&lt;/span&gt;odel&lt;/span&gt;&lt;span style="color: rgb(0, 204, 204);font-family:georgia;" &gt; &lt;/span&gt;- which is data, XML, object, whatever we handle and try visualize in our applications, web pages.&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;span style="font-family:georgia;"&gt;&lt;span style="font-weight: bold;font-size:180%;" &gt;&lt;span style="font-family:courier new;"&gt;V&lt;/span&gt;&lt;/span&gt;iew&lt;/span&gt;&lt;/span&gt; - the presentation layer, window on the screen, our web page, UI elements which visualizes the Model. Note that we can have multiple views for a single model. We call it reusing the Model. That means that for having different views of the same data we don't need multiple tables/objects/XML tags/whatever. We can achieve we same effect using multiple Views.
&lt;/li&gt;&lt;li&gt;&lt;span style="color: rgb(51, 102, 255);font-size:130%;" &gt;&lt;span style="font-family:georgia;"&gt;&lt;span style="font-weight: bold;font-size:180%;" &gt;&lt;span style="font-family:courier new;"&gt;C&lt;/span&gt;&lt;/span&gt;ontroller&lt;/span&gt;&lt;/span&gt; - as the name says, it controls the user input, events which happened on the View side and transmits these results to the Model.

&lt;/li&gt;&lt;/ul&gt;How does it work together:

Ok, here I'll give an example for you, let's say we have an &lt;span style="color: rgb(255, 102, 0);"&gt;Agenda - a web application&lt;/span&gt;. We have the database (which represents our Model) with the Users Table which contains the users id, user name and its password. And we also have the Events Table which contains event id, user id, the name of the event and the date.

      &lt;img src="http://img217.imageshack.us/img217/2131/agendaudevi.png" title="Agenda database model" border="0" /&gt;

1. User interacts with the View

&lt;span style="font-size:85%;"&gt;&lt;span style="font-style: italic;font-family:verdana;" &gt;Now a user wants to add an event into his agenda. His view represents a table with a date column and an event column. If nothing is planned for a specific date he can select this date and plan an event on this date.&lt;/span&gt;&lt;/span&gt;

&lt;pre&gt;
&lt;span style="font-weight: bold;font-size:130%;" &gt;         &lt;span style="font-family:georgia;"&gt;Date                                         Event&lt;/span&gt;&lt;/span&gt;

&lt;span style="font-size:130%;"&gt;&lt;span style="font-family:lucida grande;"&gt;               23th of March, 2009                   David's birthday&lt;/span&gt;
&lt;span style="font-family:lucida grande;"&gt;               24th of March, 2009                  &lt;/span&gt;
&lt;span style="font-family:lucida grande;"&gt;               25th of March, 2009                  &lt;/span&gt;
&lt;/span&gt;&lt;/pre&gt;

2. Now our Controller class obtains the user input and does the processing of the data, &lt;span style="font-style: italic;font-size:85%;" &gt;&lt;span style="font-family:verdana;"&gt;in our case it takes the name of the event and also the date out&lt;/span&gt;&lt;/span&gt;.

3. Our Controller transmits or notifies the Model about the results of his processing (&lt;span style="font-style: italic;font-size:85%;" &gt;&lt;span style="font-family:verdana;"&gt;in our case the name of the event and the date&lt;/span&gt;&lt;/span&gt;). Model reacts at this results in a way or another. &lt;span style="font-size:85%;"&gt;&lt;span style="font-style: italic;font-family:verdana;" &gt;In our case it inserts a new event into the events database&lt;/span&gt;&lt;/span&gt;.

4. The View reloads using &lt;span style="color: rgb(0, 102, 0);font-family:trebuchet ms;font-size:130%;"  &gt;indirectly(!)&lt;/span&gt; the updated Model. So, nor the Controller, neither the Model has the direct information about the View. &lt;span style="font-style: italic;font-size:85%;" &gt;&lt;span style="font-family:verdana;"&gt;In our case the page reloads with the event already set for that specific date&lt;/span&gt;&lt;/span&gt;.

5. The system waits for another user interactions which will restart this from the beginning.

So this is an introductory post, there are a lot of deep things what I hope we will touch in our future examples. What's it for now. Waiting for your feedback and comments.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2127794245010916172-9015195556513525703?l=udevi-community.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udevi-community.blogspot.com/feeds/9015195556513525703/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://udevi-community.blogspot.com/2009/03/welcome-brand-new-starting-series-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/9015195556513525703'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/9015195556513525703'/><link rel='alternate' type='text/html' href='http://udevi-community.blogspot.com/2009/03/welcome-brand-new-starting-series-of.html' title='Welcome a brand new starting series of posts: MVC Madness'/><author><name>Timur</name><uri>http://www.blogger.com/profile/14594716207428319651</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/_BWELgx6N3yw/S49Bi5bOhxI/AAAAAAAAAcA/Xf12ZX1FEc0/S220/Timur_face.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2127794245010916172.post-904030300806367681</id><published>2009-03-16T16:19:00.000+02:00</published><updated>2009-09-04T08:00:04.740+03:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Udevi'/><title type='text'>What is Udevi Community?</title><content type='html'>&lt;span style="font-weight: bold; font-style: italic;"&gt;
Ok, first of all what it's all about? &lt;/span&gt;

Where from this funny name comes ? &lt;span style="font-weight: bold;font-family:trebuchet ms;" &gt;Udevi = U + dev + i = You can develop it!&lt;/span&gt; And the idea behind that is - we know you can do it, we know you can do a great app. And it doesn't matter the language in which you write, Python, Perl, Java, C# or Scala, and it doesn't matter the technology you are using or the application's level you are trying to build.&lt;span style="color: rgb(0, 204, 204);font-size:130%;" &gt; &lt;span style="color: rgb(51, 51, 255);"&gt;You can develop it!&lt;/span&gt;&lt;/span&gt;
You can do a simple calculator in Java or a big desktop app enabling rich user experience using JavaFX, or you can do the same thing using C# and WPF. What really matters in programming world is experience. You need to get up and realize that you can read lots of books and understand how everything underneath your code is working, but the theoretical knowledge isn't equal or doesn't compare with practical experience. While practicing, your skills become more and more sharpen, and you become more and more good at what you're supposed to be... &lt;span style="color: rgb(0, 153, 0);font-size:180%;" &gt;&lt;span style="font-family:lucida grande;"&gt;a programmer, a developer&lt;/span&gt;&lt;/span&gt; which really can apply his vast amount of knowledge, and experience&lt;span style="font-size:130%;"&gt;(!)&lt;/span&gt; to create, design, develop, produce an application/script/test/web page/etc.

&lt;span style="font-weight: bold; font-style: italic;"&gt;Ok, and what is this community about?&lt;/span&gt;

Well, here is the most interesting point. We are trying to simulate real production environment and offer you the possibility to design an application from alpha to the release version, with all the iterations which you can see in &lt;span style="color: rgb(0, 0, 0); font-weight: bold;font-size:130%;" &gt;&lt;span style="font-family:courier new;"&gt;real world&lt;/span&gt;&lt;/span&gt;: &lt;span style="color: rgb(204, 51, 204);font-family:trebuchet ms;font-size:130%;"  &gt;specs, conversation with clients, use cases, declaring bugs, resolving issues, trying to figure what you really want to do, talking with your team leader, creating points to discuss something specific&lt;/span&gt;. This is the simulation of the real world. And we do it for free, you will do it for experience, all your projects are yours, we won't use the results of these projects for our own sake. We will represent the clients, and the team leaders, you will try to make everything to match the specs. We might be able to help you, &lt;span style="font-style: italic;font-family:verdana;font-size:130%;"  &gt;if you're:&lt;/span&gt;

&lt;ul&gt;&lt;li&gt; a novice in &lt;span style="font-size:130%;"&gt;&lt;span style="font-family:courier new;"&gt;programming world &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt; a student which doesn't really knows how to make his first app&lt;/li&gt;&lt;li&gt; a guy trying to make something using a new technology&lt;/li&gt;&lt;li&gt; a person which has an idea, but who doesn't know how to do it
&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;Well, and what do i need to do to apply?&lt;/span&gt;

You need to:

&lt;ul&gt;&lt;li&gt;Have a regular e-mail address (by this I mean an address where you check your mail often enough to communicate)&lt;/li&gt;&lt;li&gt;Have an IRC client (like mIRC)/ICQ/Yahoo! messenger/Skype for chating&lt;/li&gt;&lt;li&gt;Willing to achieve experience and work.&lt;/li&gt;&lt;li&gt;Have an established schedule, when you can work, when we can talk, when every kind of question could be addressed
&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;When can I start?&lt;/span&gt;

&lt;ul&gt;&lt;li&gt;You can start today if you want to (and I bet you want it).&lt;/li&gt;&lt;li&gt;We will be respecting your schedule and please respect ours.&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;I need to know more details.&lt;/span&gt;

To find more details or to put a question contact me at monomachus85@yahoo.com or put a comment here.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2127794245010916172-904030300806367681?l=udevi-community.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udevi-community.blogspot.com/feeds/904030300806367681/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://udevi-community.blogspot.com/2009/03/what-is-udevi-community.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/904030300806367681'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/904030300806367681'/><link rel='alternate' type='text/html' href='http://udevi-community.blogspot.com/2009/03/what-is-udevi-community.html' title='What is Udevi Community?'/><author><name>Timur</name><uri>http://www.blogger.com/profile/14594716207428319651</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/_BWELgx6N3yw/S49Bi5bOhxI/AAAAAAAAAcA/Xf12ZX1FEc0/S220/Timur_face.png'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2127794245010916172.post-530295230515814213</id><published>2009-03-13T04:03:00.000+02:00</published><updated>2009-03-13T04:27:36.911+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='Vista'/><title type='text'>Tip 001: Missing desktop icons in Windows Vista</title><content type='html'>Hi,
today something happened with my Vista, and all the icons (not just Recycle Bin or My Computer ) from the desktop were missing, however they were displayed in Windows Explorer Folder, as well as the sidebar was displayed normally. I tried to google this thing and I've found a simple solution. So this are the steps you need to follow:
&lt;ol&gt;&lt;li&gt;Open Desktop item in Windows Explorer.&lt;/li&gt;&lt;li&gt;Go to menu Tools -&gt; Folder Options -&gt; Tab View -&gt; Hidden files and folders -&gt; Select "Show hidden files and folders" -&gt; Click "Apply" and after that "Ok" (&lt;span style="font-weight: bold;"&gt;Note: &lt;/span&gt;If you don't see menu Tools, press ALT tab on your keyboard)&lt;/li&gt;&lt;li&gt;Find the file desktop.ini in your desktop folder, if there are many of these delete them all.&lt;/li&gt;&lt;li&gt;Restart your Vista (after this step your icons should be back)&lt;/li&gt;&lt;li&gt;Repeat step 2 to Hide hidden files and folders&lt;/li&gt;&lt;/ol&gt;That's all you got to do.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2127794245010916172-530295230515814213?l=udevi-community.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udevi-community.blogspot.com/feeds/530295230515814213/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://udevi-community.blogspot.com/2009/03/tip-001-missing-desktop-icons-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/530295230515814213'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2127794245010916172/posts/default/530295230515814213'/><link rel='alternate' type='text/html' href='http://udevi-community.blogspot.com/2009/03/tip-001-missing-desktop-icons-in.html' title='Tip 001: Missing desktop icons in Windows Vista'/><author><name>Timur</name><uri>http://www.blogger.com/profile/14594716207428319651</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='29' src='http://3.bp.blogspot.com/_BWELgx6N3yw/S49Bi5bOhxI/AAAAAAAAAcA/Xf12ZX1FEc0/S220/Timur_face.png'/></author><thr:total>0</thr:total></entry></feed>
