<?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>Diary of an Entrepreneur Web Developer</title>
	<atom:link href="http://www.cosmocentral.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cosmocentral.com</link>
	<description></description>
	<lastBuildDate>Mon, 15 Mar 2010 18:02:33 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Strip HTML Tags &#8211; MS SQL</title>
		<link>http://www.cosmocentral.com/2010/03/strip-html-tags-ms-sql/</link>
		<comments>http://www.cosmocentral.com/2010/03/strip-html-tags-ms-sql/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 18:02:08 +0000</pubDate>
		<dc:creator>manik</dc:creator>
				<category><![CDATA[Programming / Coding]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.cosmocentral.com/?p=642</guid>
		<description><![CDATA[UDF (user defined function) to strip off html tags from a string in MS SQL.]]></description>
			<content:encoded><![CDATA[<p>Here is a UDF (user defined function) to strip off html tags from a  string in MS SQL.</p>
<blockquote><p>CREATE FUNCTION [dbo].[StripHtmlTags]<br />
(<br />
&#8211; Add the parameters for the function here<br />
@HTMLText NVARCHAR(MAX)<br />
)<br />
RETURNS NVARCHAR(MAX)<br />
AS<br />
BEGIN</p>
<p>DECLARE @Start INT<br />
DECLARE @End INT<br />
DECLARE @Length INT</p>
<p>SET @Start = CHARINDEX(&#8216;&lt;&#8217;,@HTMLText)<br />
SET @End = CHARINDEX(&#8216;&gt;&#8217;,@HTMLText,CHARINDEX(&#8216;&lt;&#8217;,@HTMLText))<br />
SET @Length = (@End &#8211; @Start) + 1</p>
<p>WHILE @Start &gt; 0 AND @End &gt; 0 AND @Length &gt; 0<br />
BEGIN<br />
SET @HTMLText = STUFF(@HTMLText,@Start,@Length,&#8221;)<br />
SET @Start = CHARINDEX(&#8216;&lt;&#8217;,@HTMLText)<br />
SET @End = CHARINDEX(&#8216;&gt;&#8217;,@HTMLText,CHARINDEX(&#8216;&lt;&#8217;,@HTMLText))<br />
SET @Length = (@End &#8211; @Start) + 1<br />
END</p>
<p>RETURN LTRIM(RTRIM(@HTMLText))</p>
<p>END</p></blockquote>
<p><strong>Example Use:</strong></p>
<blockquote>
<pre dir="ltr">Execute StripHtmlTags('my &lt;b&gt;html filled&lt;/b&gt; string');
</pre>
</blockquote>
<p>Note: The use of MAX is allowed on MS SQL 2005 or newer versions of MS  SQL servers. To use it with MS SQL versions older then 2005 (e.g. 2000) replace the MAX with a number for example 1500.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cosmocentral.com/2010/03/strip-html-tags-ms-sql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Selling Products &#8211; Where to Sell</title>
		<link>http://www.cosmocentral.com/2010/03/selling-products-where-to-sell/</link>
		<comments>http://www.cosmocentral.com/2010/03/selling-products-where-to-sell/#comments</comments>
		<pubDate>Sun, 14 Mar 2010 05:19:54 +0000</pubDate>
		<dc:creator>manik</dc:creator>
				<category><![CDATA[Advertising / Marketing]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Making Money]]></category>
		<category><![CDATA[e-commerce]]></category>

		<guid isPermaLink="false">http://www.cosmocentral.com/?p=636</guid>
		<description><![CDATA[People sell their products in different ways. Some sell on their very own e-commerce website, some on shopping comparison sites, some on ebay, amazon etc.

Here is a short list of some major places you can sell your products. Remember this is not an elaborated talk on them.]]></description>
			<content:encoded><![CDATA[<p>People sell their products in different ways. Some sell on their very own  e-commerce website, some on shopping comparison sites, some on ebay,  amazon etc.</p>
<p>Here is a short list of some major places you can sell your products. Remember this is not an elaborated talk on them.</p>
<p><strong>Your E-Commerce Site</strong><br />
Although you can control the shopping experience and other aspects of  your business, its really tough to market and make money. Specially it  takes quite a bit of time and effort to get people come to your site and  get used to shopping.<br />
<strong><br />
EBay<br />
</strong>Largest marketplace of all. Your products would be visible to a huge  ebay audience.</p>
<p><strong>Amazon</strong><br />
Amazon is a great marketplace. Although not as big as eBay, it still a giant marketplace.</p>
<p><strong>Google Base</strong><br />
Its free to use. You can upload your products and make them indexed on  Google for people to search.</p>
<p><strong>Shopping Comparison Sites</strong><br />
Most of them charge money to list products. Here are some major ones to  mention:</p>
<ul>
<li>Shopzilla</li>
<li>Bizrate</li>
<li>Shopping.com</li>
<li>Ciao</li>
<li>Price Savvy</li>
<li>Next Tag</li>
<li>Kelkoo</li>
<li>Price Grabber</li>
<li>Price Runner</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.cosmocentral.com/2010/03/selling-products-where-to-sell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Started E-Commerce Website</title>
		<link>http://www.cosmocentral.com/2010/03/started-e-commerce-website/</link>
		<comments>http://www.cosmocentral.com/2010/03/started-e-commerce-website/#comments</comments>
		<pubDate>Thu, 04 Mar 2010 19:04:27 +0000</pubDate>
		<dc:creator>manik</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.cosmocentral.com/?p=632</guid>
		<description><![CDATA[I had this e-commerce website Shopping Cosmo developed few months back. Had big plans selling lot of stuffs and make tons of money  
So check out the site http://www.shoppingcosmo.com/
]]></description>
			<content:encoded><![CDATA[<p>I had this e-commerce website <a title="Shopping Cosmo" href="http://www.shoppingcosmo.com" target="_blank">Shopping Cosmo</a> developed few months back. Had big plans selling lot of stuffs and make tons of money <img src='http://www.cosmocentral.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>So check out the site <a href="http://www.shoppingcosmo.com/">http://www.shoppingcosmo.com/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.cosmocentral.com/2010/03/started-e-commerce-website/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Reading a file from external url &#8211; ASP .NET</title>
		<link>http://www.cosmocentral.com/2010/02/reading-a-file-from-external-url-asp-net/</link>
		<comments>http://www.cosmocentral.com/2010/02/reading-a-file-from-external-url-asp-net/#comments</comments>
		<pubDate>Sun, 14 Feb 2010 18:49:30 +0000</pubDate>
		<dc:creator>manik</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.cosmocentral.com/?p=627</guid>
		<description><![CDATA[Often times you might need to read a file from another website server. For example reading a inventory data file from a vendor website. Here is a sample code to achieve that.]]></description>
			<content:encoded><![CDATA[<p>Often times you might need to read a file from another website server. For example reading a inventory data file from a vendor website. Here is a sample code to achieve that.</p>
<blockquote><p>WebResponse result = null;<br />
string output = &#8220;&#8221;;</p>
<p>try<br />
{<br />
WebRequest req = WebRequest.Create(&#8220;http://www.website.com/filename.txt&#8221;);<br />
result = req.GetResponse();<br />
Stream ReceiveStream = result.GetResponseStream();<br />
Encoding encode = System.Text.Encoding.GetEncoding(&#8220;utf-8&#8243;);<br />
StreamReader sr = new StreamReader(ReceiveStream, encode);<br />
Char[] read = new Char[256];<br />
int count = sr.Read(read, 0, read.Length);<br />
while (count &gt; 0)<br />
{<br />
String str = new String(read, 0, count);<br />
output += str;<br />
count = sr.Read(read, 0, read.Length);<br />
}<br />
}<br />
catch (Exception)<br />
{<br />
Response.Write(&#8220;get failed&#8221;);<br />
}<br />
if (result != null)<br />
{<br />
result.Close();<br />
}</p>
<p>Response.Write(output);</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.cosmocentral.com/2010/02/reading-a-file-from-external-url-asp-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to apply multiple css styles on single element</title>
		<link>http://www.cosmocentral.com/2010/01/621/</link>
		<comments>http://www.cosmocentral.com/2010/01/621/#comments</comments>
		<pubDate>Fri, 22 Jan 2010 22:47:03 +0000</pubDate>
		<dc:creator>manik</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Programming / Coding]]></category>

		<guid isPermaLink="false">http://www.cosmocentral.com/2010/01/621/</guid>
		<description><![CDATA[If you like to apply multiple styles on the single element, all you have to do is separate the style names by a space.]]></description>
			<content:encoded><![CDATA[<p>If you like to apply multiple styles on the single element, all you have to do is separate the style names by a space.</p>
<p><strong>Example:</strong></p>
<p>Lets say you have three classes</p>
<blockquote><p>.a {..}<br />
.b{..}<br />
.c{..}</p></blockquote>
<p>To apply them on a single div tag:</p>
<blockquote><p>&lt;div&gt;<br />
&#8230;..<br />
&lt;/div&gt;</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.cosmocentral.com/2010/01/621/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to add an additional ip address in windows server 2003 and 2008</title>
		<link>http://www.cosmocentral.com/2010/01/how-to-add-an-additional-ip-address-in-windows-server-2003-and-2008/</link>
		<comments>http://www.cosmocentral.com/2010/01/how-to-add-an-additional-ip-address-in-windows-server-2003-and-2008/#comments</comments>
		<pubDate>Fri, 22 Jan 2010 19:46:44 +0000</pubDate>
		<dc:creator>manik</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.cosmocentral.com/?p=616</guid>
		<description><![CDATA[If you have a dedicated server and you need to add an additional ip address, first thing to do is request for the additional ip address from the hosting company. Often time they would not hook it with your server, they would just give it to you.]]></description>
			<content:encoded><![CDATA[<p>If you have a dedicated server and you need to add an additional ip address, first thing to do is request for the additional ip address from the hosting company. Often time they would not hook it with your server, they would just give it to you.</p>
<p><strong>So how you add the additional ip address to your windows server?</strong></p>
<p>These steps are for Windows Server 2003.</p>
<ul>
<li>Click on Start button</li>
<li>Open Cotnrol Panel</li>
<li>Open Network connections</li>
<li>Select Local Area Connection (for first Ethernet card)</li>
<li>Right Click and select Properties</li>
<li>Select Internet Protocol (TCP/IP)</li>
<li>Now click on Properties button</li>
<li>Click on Advanced tab</li>
<li>Now you need to add in an IP address section Enter IP details such as IP address, Subnetmask etc</li>
<li>Save the changes and go back to Windows server desktop</li>
</ul>
<p>These steps are for Windows Server 2008.</p>
<ul>
<li>Click on Start button</li>
<li>Open Cotnrol Panel</li>
<li>Click on Network and Sharing Center</li>
<li>Click on Manage Network Connections</li>
<li>Right Click on the active network icon  and select Properties</li>
<li>Select Internet Protocol Version (TCP/IP). There may be more then version. For me there are 4 and 6. Mine one is at 4.</li>
<li>Now click on Properties button</li>
<li>Click on Advanced tab</li>
<li>Now you need to add in an IP address section Enter IP details such as IP address, Subnetmask etc</li>
<li>Save the changes and go back to Windows server desktop</li>
</ul>
<p><strong>After that you need to verifty that new settings are working. This is how you do that:</strong></p>
<ul>
<li>Open command prompt</li>
<li>Click on Start button</li>
<li>Select Run</li>
<li>Type cmd and press enter</li>
<li>Type the following command at DOS prompt: ipconfig /all</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.cosmocentral.com/2010/01/how-to-add-an-additional-ip-address-in-windows-server-2003-and-2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Maximum Int Value MS SQL</title>
		<link>http://www.cosmocentral.com/2010/01/maximum-int-value-ms-sql/</link>
		<comments>http://www.cosmocentral.com/2010/01/maximum-int-value-ms-sql/#comments</comments>
		<pubDate>Fri, 22 Jan 2010 14:37:24 +0000</pubDate>
		<dc:creator>manik</dc:creator>
				<category><![CDATA[Programming / Coding]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.cosmocentral.com/?p=612</guid>
		<description><![CDATA[When you design database tables care should be taken selecting the type of integer columns. If you predict there is chances to have big numbers on the integer column, consider bigint or int accordingly.]]></description>
			<content:encoded><![CDATA[<p>When you design database tables care should be taken selecting the type of integer columns. If you predict there is chances to have big numbers on the integer column, consider bigint or int accordingly. Of course there are performance issues involved to consider.</p>
<p>Here are the maximum int value in MS SQL server.</p>
<p><strong>bigInt</strong> -9223372036854775808 through 9223372036854775807 (8 bytes)<br />
<strong>int</strong> -2147483648 through 2147483647 (4 bytes)<br />
<strong>smallInt</strong> -32768 through 32767 (2 bytes)<br />
<strong>tinyInt</strong> 0 through 255 (1 byte)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cosmocentral.com/2010/01/maximum-int-value-ms-sql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Neglecting Improving Websites</title>
		<link>http://www.cosmocentral.com/2010/01/neglecting-improving-websites/</link>
		<comments>http://www.cosmocentral.com/2010/01/neglecting-improving-websites/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 22:51:53 +0000</pubDate>
		<dc:creator>manik</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.cosmocentral.com/2010/01/neglecting-improving-websites/</guid>
		<description><![CDATA[I guess with all good comes bad. My problem is before I monetize the websites well I jump into another business idea comes in mind.]]></description>
			<content:encoded><![CDATA[<p>Being an entrepreneur web developer has some advantages, I don&#8217;t have to pay anybody for the web development works. In the past I have developed some websites with great features; take webcosmo.com or shoppingcosmo.com for example. All those sites are custom made. Lot of people would spend tons of money to make those sites.</p>
<p>I guess with all good comes bad. My problem is before I monetize the websites well I jump into another business idea that comes in mind. That&#8217;s not a good business decision at all.</p>
<p>I have set a goal of getting those neglected websites back on track.</p>
<p>Is it only me or you guys also do the same thing?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cosmocentral.com/2010/01/neglecting-improving-websites/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Background does not extend beyond viewport</title>
		<link>http://www.cosmocentral.com/2010/01/background-does-not-extend-viewport/</link>
		<comments>http://www.cosmocentral.com/2010/01/background-does-not-extend-viewport/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 22:07:28 +0000</pubDate>
		<dc:creator>manik</dc:creator>
				<category><![CDATA[Programming / Coding]]></category>

		<guid isPermaLink="false">http://www.cosmocentral.com/?p=592</guid>
		<description><![CDATA[I have two backgrounds for a page; one on left side, another on the right side. Both repeat vertically. ]]></description>
			<content:encoded><![CDATA[<p>While working on a client website got into this situation.</p>
<p>I have two backgrounds for a page; one on left side, another on the right side. Both repeat vertically. This is an example how I have set the code at first:</p>
<blockquote><p>&lt;!DOCTYPE html PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Transitional//EN&#8221;<br />
&#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#8221;&gt;<br />
&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;2 columns, fixed width, right rail, content tallest&lt;/title&gt;<br />
&lt;style type=&#8221;text/css&#8221;&gt;<br />
html, body {height:100%;margin:0;padding:0;}<br />
body {background:url(left.gif) 0 0 repeat-y;color:#010101;font:12px/18px Arial,Verdana;}<br />
#container {background:url(right.gif) 100% 0 repeat-y;width:100%;height:100%;}<br />
&lt;/style&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;div id=&#8221;container&#8221;&gt;<br />
&lt;div style=&#8221;height:950px;&#8221;&gt;Bla Bla Bla&#8230;&lt;/div&gt;<br />
&lt;!&#8211;To force a height so we can see a scrollbar for testing&#8211;&gt;<br />
&lt;/div&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p></blockquote>
<p><strong>Problem:</strong></p>
<p>Everything works fine as long as we dont have a scrollbar on the right. When we have lot of content that makes the browser have a scrollbar, the background on the right does not seem to repeat; it ends at the end of the viewport.</p>
<p><strong>Basics of Percentage Height:</strong></p>
<p>Anytime you want to declare a percentage height of an element you must declare a dimension set for it&#8217;s parents as well(no necessarily by percentage). For example if you want to set 100% height for a div that is inside the body tag, you must set a dimension for the body as well as html tags as well.</p>
<blockquote><p>&lt;html&gt;<br />
&lt;body&gt;<br />
&lt;div class=&#8221;adiv&#8221;&gt;bla bla bla&#8230;&lt;/div&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p></blockquote>
<p>And the css for that:<br />
html, body {height: 100%;}<br />
.adiv {height:100%;}</p>
<p><strong>Solution:</strong></p>
<p>We like our div to be at least as high as the viewport, but if the content is longer than the viewport, stretch to contain it. CSS provides a way for us to do that with the min-height property. If we change the height: 100%  in the #container rule to min-height: 100% everything is pronto. The code would look like this:</p>
<blockquote><p>&lt;!DOCTYPE html PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Transitional//EN&#8221;<br />
&#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#8221;&gt;<br />
&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;2 columns, fixed width, right rail, content tallest&lt;/title&gt;<br />
&lt;style type=&#8221;text/css&#8221;&gt;<br />
html, body {height:100%;margin:0;padding:0;}<br />
body {background:url(left.gif) 0 0 repeat-y;color:#010101;font:12px/18px Arial,Verdana;}<br />
#container {background:url(right.gif) 100% 0 repeat-y;width:100%;min-height:100%;}<br />
&lt;/style&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;div id=&#8221;container&#8221;&gt;<br />
&lt;div style=&#8221;height:950px;&#8221;&gt;Bla Bla Bla&#8230;&lt;/div&gt;<br />
&lt;!&#8211;To force a height so we can see a scrollbar for testing&#8211;&gt;<br />
&lt;/div&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.cosmocentral.com/2010/01/background-does-not-extend-viewport/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Two Cloumn Equal Height Layout With CSS</title>
		<link>http://www.cosmocentral.com/2010/01/two-cloumn-equal-height-layout-with-css/</link>
		<comments>http://www.cosmocentral.com/2010/01/two-cloumn-equal-height-layout-with-css/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 17:43:21 +0000</pubDate>
		<dc:creator>manik</dc:creator>
				<category><![CDATA[Programming / Coding]]></category>

		<guid isPermaLink="false">http://www.cosmocentral.com/?p=578</guid>
		<description><![CDATA[I wanna create a two column layout using CSS. Both clumns would have equal height. This is how we can do it]]></description>
			<content:encoded><![CDATA[<p>I wanna create a two column layout using CSS. Both clumns would have equal height. This is how we can do it:</p>
<blockquote><p>&lt;!DOCTYPE html PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Transitional//EN&#8221;<br />
&#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&#8221;&gt;</p>
<p>&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;Two Cloumn Equal Height CSS Layout&lt;/title&gt;<br />
&lt;style type=&#8221;text/css&#8221;&gt;<br />
#container{<br />
background-color:#fff;<br />
overflow:hidden;<br />
width:750px;<br />
}<br />
#div1{<br />
background-color:#99cccc;<br />
width:600px;<br />
border-right:150px solid #c33; /* The width and color of the div2 */<br />
margin-right:-150px;<br />
float:left;<br />
}<br />
#div2{<br />
background-color:#cc3333;<br />
width:150px;<br />
float:left;<br />
}<br />
&lt;/style&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;div id=&#8221;container&#8221;&gt;<br />
&lt;div id=&#8221;div1&#8243;&gt;This is left div 1 content&lt;br /&gt;This is left div 1 content&lt;/div&gt;<br />
&lt;div id=&#8221;div2&#8243;&gt;This is div 2 content&lt;/div&gt;</p>
<p>&lt;/div&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</p></blockquote>
<p><strong>border-right:150px solid #c33;</strong><br />
This line of code just gives a color to the div2.</p>
<p><strong>margin-right:-150px;</strong><br />
This line of code create space on the right for div2.</p>
<p>Other then that everything else is self explanatory.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cosmocentral.com/2010/01/two-cloumn-equal-height-layout-with-css/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
