<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Dot Net Programmer &#124; Windows Phone 7 Developer &#124; Web Page Developer &#124; : Yuvraj Rimal</title>
	<atom:link href="http://www.yuvraj.com.np/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.yuvraj.com.np</link>
	<description>Come, Visit, Read and Get What i know. .</description>
	<lastBuildDate>Wed, 02 Nov 2011 05:58:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Search XML Using LINQ in .Net</title>
		<link>http://www.yuvraj.com.np/index.php/2011/11/search-xml-using-linq-in-net/</link>
		<comments>http://www.yuvraj.com.np/index.php/2011/11/search-xml-using-linq-in-net/#comments</comments>
		<pubDate>Wed, 02 Nov 2011 05:18:36 +0000</pubDate>
		<dc:creator>युवराज रिमाल [ Prince Rimal]</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Dot Net]]></category>
		<category><![CDATA[DataGridView]]></category>
		<category><![CDATA[displaying data dynamically in gridview]]></category>
		<category><![CDATA[searching xml file with linq]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[xpath]]></category>

		<guid isPermaLink="false">http://www.yuvraj.com.np/?p=36</guid>
		<description><![CDATA[I&#8217;m impressed with the features of Linear Query and it&#8217;s reliability. I wonder myself on solving few problems that weren&#8217;t solved using other techniques are solved using LINQ myself. Before starting detail LINQ tutorial did you check my last Post about LINQ? It not Check it here. Well, no more talks, let&#8217;s start our next tutorial to search xml file content using LINQ. In following few lines, i will teach you how to search content [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m impressed with the features of Linear Query and it&#8217;s reliability. I wonder myself on solving few problems that weren&#8217;t solved using other techniques are solved using LINQ myself. Before starting detail LINQ tutorial did you check my last Post about LINQ? It not <a title="Writing Your First LINQ Program. ." href="http://www.yuvraj.com.np/index.php/2011/07/writing-your-first-linq-program/">Check it here</a>. Well, no more talks, let&#8217;s start our next tutorial to search xml file content using LINQ.<span id="more-36"></span></p>
<p>In following few lines, i will teach you how to search content of xml file using .Net. I got solution to this problem after 1 day of practice. So let&#8217;s start now.<br />
Consider a file named Search.xml with the following content.</p>
<pre class="brush: xml; title: copy and paste the code; notranslate">&lt;strong&gt;
&lt;/strong&gt;&lt;productlist title=&quot;ABC&quot;&gt;
  &lt;product title=&quot;ABC-Title&quot;&gt;
    &lt;doc id=&quot;Doc-abc&quot; title=&quot;Abc document&quot;/&gt;
  &lt;/product&gt;

  &lt;product title=&quot;DEF&quot;&gt;
    &lt;doc id=&quot;Doc-DEF&quot; title=&quot;Doc-DEF&quot;/&gt;
  &lt;/product&gt;

  &lt;product title=&quot;EFG&quot;&gt;
    &lt;doc id=&quot;EFG Document&quot; description=&quot;Document of EFT&quot;/&gt;
  &lt;/product&gt;
&lt;/productlist&gt;
</pre>
<p>Great, now add a Textbox to take user input for search content. This code can search with product title and document title.<br />
Under a text change property or in any button control&#8217;s click event, add the following code. To run this code easily, make<br />
sure you have an empty xml file named SearchResult.xml, datagridview control named SrchList and BindingSource control named BS. This code will display all the matching<br />
result in the gridview.</p>
<pre class="brush: csharp; title: copy and paste the code; notranslate">
private void TxtSearchString_TextChanged(object sender, EventArgs e)
        {
            StringBuilder st= new StringBuilder();
            XDocument doc = new XDocument(XDocument.Load(&quot;Search.xml&quot;));
            var data = from item in doc.Descendants(&quot;doc&quot;)
                       select new
                       {
                           Ptitle=item.Parent.Attribute(&quot;title&quot;).Value,
                           title = item.Attribute(&quot;title&quot;).Value,
                       };
            DataSet ds = new DataSet();
            StringBuilder sr = new StringBuilder();
            sr.Append(&quot;&lt;product&gt;&quot;);
            foreach (var p in data)
            {
                if (p.title.ToUpper().Contains(TxtSearchString.Text.ToUpper()) || p.Ptitle.ToUpper().Contains(TxtSearchString.Text.ToUpper()))
                    sr.AppendLine(&quot;&lt;doc Project-Title =\&quot;&quot; + p.Ptitle.ToString() + &quot;\&quot; Document-Title=\&quot;&quot; + p.title.ToString() + &quot;\&quot; /&gt;&quot;);

            }
            sr.Append(&quot;&lt;/product&gt;&quot;);
            TextWriter w = new StreamWriter(&quot;searchResult.xml&quot;);
            w.Write(sr.ToString());
            w.Flush();
            w.Close();
            try
            {
                ds.ReadXml(&quot;searchResult.xml&quot;);
                if (ds.Tables.Count &gt; 0)
                {
                    BS.DataSource = ds.Tables[0];
                    SrchList.DataSource = BS;
                }
            }
            catch (Exception ex)
            {
                throw;
            }

        }
</pre>
<p>Thanks ! ! ! <img src='http://www.yuvraj.com.np/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  Please, do post your comment regarding the post, and if you find helpful refer to your friend as well. Have a happy coding. .</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yuvraj.com.np/index.php/2011/11/search-xml-using-linq-in-net/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to start PHP Programming ?</title>
		<link>http://www.yuvraj.com.np/index.php/2011/09/how-to-start-php-programming/</link>
		<comments>http://www.yuvraj.com.np/index.php/2011/09/how-to-start-php-programming/#comments</comments>
		<pubDate>Fri, 23 Sep 2011 14:35:04 +0000</pubDate>
		<dc:creator>युवराज रिमाल [ Prince Rimal]</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.yuvraj.com.np/?p=32</guid>
		<description><![CDATA[I welcome you back after short break from. . Today i am going to describe you how to write and execute your php program. and how to start Programming in PHP. I will try my best to guide you through this tutorial. Shall We start it now?? Well, all you need is a Notepad editor which comes with your Windows and a PHP Apache Server. There are many PHP servers. I prefer you to use [...]]]></description>
			<content:encoded><![CDATA[<p>I welcome you back after short break from. . Today i am going to describe you how to write and execute your php program. and how to start Programming in PHP. I will try my best to guide you through this tutorial.</p>
<p>Shall We start it now??<br />
Well, all you need is a Notepad editor which comes with your Windows and a PHP Apache Server. There are many PHP servers. I prefer you to use Wamp Server. For your 32-bit windows download it <a title="Wamp Server for 32-bit" href="http://space.dl.sourceforge.net/project/wampserver/WampServer%202/WampServer%202.1/WampServer2.1e-x32.exe" target="_blank">Here</a> and if you have 64-bit windows then download it <a title="Wamp server for 64 bit windows" href="http://space.dl.sourceforge.net/project/wampserver/WampServer%202/WampServer%202.1/WampServer2.1d-x64.exe" target="_blank">Here</a>. <span id="more-32"></span></p>
<p>Double click the installer you just downloaded. On a simple Next-&gt; Next-&gt; Click you will finish the installation of Wamp Server. On your desktop you will find Shortcut named Start WampServer, Open that. To check whether your wamp server is properly installed or not, check on your internet browser by typing http://127.0.0.1 or http://localhost . If you find an error message, your wamp is not installed or started properly. For proper starting At the right side of task bar ( Near the position where clock and date is displayed), click on wamp server and select &#8220;Start All Services&#8221;. Now we are ready to write and taste our first php page.</p>
<p>1) Write the following code in your notepad.</p>
<pre class="brush: php; title: copy and paste the code; notranslate">

&lt;html&gt;
&lt;head&gt;&lt;title&gt;My first Php Page &lt;/title&gt;&lt;/head&gt;
&lt;body&gt;
&lt;?php echo &quot;This is my first PHP Page&quot;; ?&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>2) Save the file into the following directory : C:\wamp\www named test.php or your desire name. Make sure you have installed wamp on C: drive. In case of other drive, replace C by d,e, or your proper drive.</p>
<p>3) Start your internet explorer, and type the following address</p>
<p>http://localhost/test.php</p>
<p>4) If you haven&#8217;t made any error on code, you will see the page saying &#8220;This is my First PHP Page&#8221; to you.</p>
<p>As you see, we can insert php script anywhere inside html just with the &lt;?php ?&gt; tag. All your php code reside within these two tags.</p>
<p>Try it out, for any problem and suggestion you get, please post in comment. I would be happy to help you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yuvraj.com.np/index.php/2011/09/how-to-start-php-programming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Writing Your First LINQ Program. .</title>
		<link>http://www.yuvraj.com.np/index.php/2011/07/writing-your-first-linq-program/</link>
		<comments>http://www.yuvraj.com.np/index.php/2011/07/writing-your-first-linq-program/#comments</comments>
		<pubDate>Sun, 17 Jul 2011 15:07:07 +0000</pubDate>
		<dc:creator>युवराज रिमाल [ Prince Rimal]</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[Dot Net]]></category>
		<category><![CDATA[LINQ]]></category>
		<category><![CDATA[.Net]]></category>
		<category><![CDATA[C Sharp]]></category>

		<guid isPermaLink="false">http://www.yuvraj.com.np/?p=27</guid>
		<description><![CDATA[LINQ (Language Integrated Query) is a methodology that simplifies and unifies the implementation of any kind of data access. LINQ does not force you to use a specific architecture; it facilitates the implementation of several existing architectures for accessing data. As with every tool, it can be used in both good and in bad ways. To get the most out of LINQ, you will have to master it. Today, data managed by a program can [...]]]></description>
			<content:encoded><![CDATA[<p><strong>LINQ (Language Integrated Query)</strong> is a methodology that simplifies and unifies the implementation of any kind of data access. LINQ does not force you to use a specific architecture; it facilitates the implementation of several existing architectures for accessing data. As with every tool, it can be used in both good and in bad ways. To get the most out of LINQ, you will have to master it.</p>
<p>Today, data managed by a program can belong to different data domains: an array, an object graph, an XML document, a database, a text file, a registry key, an e-mail message, Simple Object Access Protocol (SOAP) message content, a Microsoft Office Excel file…. The list is long.</p>
<p><span id="more-27"></span></p>
<p>I will guide you through writing a first LINQ Program in C#.Net.<br />
I hope,you can create new console application in Visual Studio. After you have created new console application in Console Application. On Program.cs or Program.vb file, type the following code inside Main function.</p>
<pre class="brush: csharp; title: copy and paste the code; notranslate">
string[] greetings = { &quot;Hello World&quot;, &quot;Hello LINQ&quot;, &quot;Hello PRince&quot; };
var items = from s in greetings where s.EndsWith(&quot;LINQ&quot;) select s;
foreach (var item in items)
Console.WriteLine(item);
Console.ReadLine();
</pre>
<p>Since you saw, we can search an array just like you use Database Query. First Line declares Array of string.<br />
Look at the second line, it&#8217;s as simple as human language. Don&#8217;t wonder, .Net still supoorts var variable type. var can hold data of any type.Okay, Now lets look at the exact query; It takes all the string which End with &#8220;LINQ&#8221; and store them in variable items.<br />
Foreach reads all values stored in items (Which is collection of String which have &#8220;LINQ&#8221; on last) as loop.</p>
<p>Console.WriteLine(item); is used to display each string in Console screen.</p>
<p>Having trouble on Typing and Executing Query?</p>
<p>1. On Visual Studio, Go to File Menu.<br />
2. From New, select New Projet. On the Project Dialog, Select Language as Visual C# and project type as Console Application.<br />
3. Give Name/Solution Name as First and click Ok.<br />
4. Open Program.cs file and clear all the lines from Program.cs<br />
5. Copy the code below and enjoy your first LINQ Program.</p>
<pre class="brush: csharp; title: copy and paste the code; notranslate">
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace First
{
class Program
{
static void Main(string[] args)
{
string[] greetings = { &quot;Hello World&quot;, &quot;Hello LINQ&quot;, &quot;Hello PRince&quot; };
var items = from s in greetings where s.EndsWith(&quot;LINQ&quot;) select s;
foreach (var item in items)
Console.WriteLine(item);
Console.ReadLine();
}
}
}
</pre>
<p><strong>Happy Coding ! ! ! <img src='http://www.yuvraj.com.np/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.yuvraj.com.np/index.php/2011/07/writing-your-first-linq-program/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Welcome</title>
		<link>http://www.yuvraj.com.np/index.php/2011/07/welcome-2/</link>
		<comments>http://www.yuvraj.com.np/index.php/2011/07/welcome-2/#comments</comments>
		<pubDate>Sat, 16 Jul 2011 12:11:53 +0000</pubDate>
		<dc:creator>युवराज रिमाल [ Prince Rimal]</dc:creator>
				<category><![CDATA[C Programming]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Dot Net]]></category>
		<category><![CDATA[LINQ]]></category>
		<category><![CDATA[Miscellinious]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Social Networking]]></category>
		<category><![CDATA[VB.NET]]></category>
		<category><![CDATA[Windows Phone 7]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://www.yuvraj.com.np/?p=15</guid>
		<description><![CDATA[Hello All, Welcome To My Page. Finally i&#8217;ve got what i&#8217;d wished to keep on page Thanks to wordpress. This is my very first post on this page. I will soon post various information about Programming on C, C++, Dot net, C#, LINQ, Windows Phone 7, WPF, PHP, and Others. I hope your positive response and comments for the page. &#160;]]></description>
			<content:encoded><![CDATA[<div id="attachment_16" class="wp-caption alignleft" style="width: 310px"><a href="http://www.yuvraj.com.np/wp-content/uploads/2011/07/fb.jpg"><img class="size-medium wp-image-16" title="Welcome" src="http://www.yuvraj.com.np/wp-content/uploads/2011/07/fb-300x222.jpg" alt="Welcome" width="300" height="222" /></a><p class="wp-caption-text">Welcome</p></div>
<p>Hello All, Welcome To My Page. Finally i&#8217;ve got what i&#8217;d wished to keep on page Thanks to wordpress. This is my very first post on this page. I will soon post various information about Programming on C, C++, Dot net, C#, LINQ, Windows Phone 7, WPF, PHP, and Others. I hope your positive response and comments for the page.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.yuvraj.com.np/index.php/2011/07/welcome-2/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

<!-- www.000webhost.com Analytics Code -->
<script type="text/javascript" src="http://analytics.hosting24.com/count.php"></script>
<noscript><a href="http://www.hosting24.com/"><img src="http://analytics.hosting24.com/count.php" alt="web hosting" /></a></noscript>
<!-- End Of Analytics Code -->

