<?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/"
	>

<channel>
	<title>muratbudak.com</title>
	<atom:link href="http://www.muratbudak.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.muratbudak.com</link>
	<description>Murat BUDAK's personal BLOG about programming, electronic and photography</description>
	<pubDate>Tue, 19 May 2009 13:56:44 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>ISO 8601 Aviation week number in MSSQL</title>
		<link>http://www.muratbudak.com/sql/iso_8601_aviation_week_number_in_mssql/ </link>
		<comments>http://www.muratbudak.com/sql/iso_8601_aviation_week_number_in_mssql/ #comments</comments>
		<pubDate>Thu, 14 May 2009 08:38:54 +0000</pubDate>
		<dc:creator>mbudak</dc:creator>
		
		<category><![CDATA[Aviation]]></category>

		<category><![CDATA[SQL]]></category>

		<category><![CDATA[ISO 8601]]></category>

		<guid isPermaLink="false">http://www.muratbudak.com/?p=45</guid>
		<description><![CDATA[Week numbers are differ from culture to culture but if you need exact solution of your reports or calculation you have to need individual function for this calculation method. We need ISO 8601 date calculation for this situation because of aviation industry are using this stantard.
You can find a good article about ISO 8601 on [...]]]></description>
			<content:encoded><![CDATA[<p>Week numbers are differ from culture to culture but if you need exact solution of your reports or calculation you have to need individual function for this calculation method. We need ISO 8601 date calculation for this situation because of aviation industry are using this stantard.<br />
You can find a good article about ISO 8601 on wikipedia <a href="http://en.wikipedia.org/wiki/ISO_8601">http://en.wikipedia.org/wiki/ISO_8601</a><br />
A simple solution coming from Books Online<br />
<span id="more-45"></span><br />
<code><br />
CREATE FUNCTION dbo.getISOweek (@DATE DATETIME)<br />
RETURNS INT<br />
AS<br />
BEGIN<br />
DECLARE @ISOweek INT<br />
SET @ISOweek = DATEPART(wk,@DATE)+1<br />
-DATEPART(wk,CAST(DATEPART(yy,@DATE) AS CHAR(4))+'0104')<br />
-- Special cases: Jan 1-3 may belong to the previous year<br />
IF (@ISOweek=0)<br />
SET @ISOweek = dbo.ISOweek(CAST(DATEPART(yy,@DATE) - 1<br />
AS CHAR(4))+'12'+ CAST(24+DATEPART(DAY,@DATE) AS CHAR(2)))+1<br />
-- Special case: Dec 29-31 may belong to the next year<br />
IF ((DATEPART(mm,@DATE)=12) AND<br />
((DATEPART(dd,@DATE)-DATEPART(dw,@DATE))&gt;= 28))<br />
SET @ISOweek=1<br />
RETURN(@ISOweek)<br />
END<br />
GO<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.muratbudak.com/sql/iso_8601_aviation_week_number_in_mssql/ /feed</wfw:commentRss>
		</item>
		<item>
		<title>Distance between two different airports</title>
		<link>http://www.muratbudak.com/sql/distance_between_two_different_airports/ </link>
		<comments>http://www.muratbudak.com/sql/distance_between_two_different_airports/ #comments</comments>
		<pubDate>Wed, 13 May 2009 14:47:36 +0000</pubDate>
		<dc:creator>mbudak</dc:creator>
		
		<category><![CDATA[Aviation]]></category>

		<category><![CDATA[SQL]]></category>

		<category><![CDATA[Airport]]></category>

		<guid isPermaLink="false">http://www.muratbudak.com/?p=37</guid>
		<description><![CDATA[I have large airport database following schema. I am using this airport database for many reports as like seat by kilometers or fuel by kms.

CREATE TABLE [dbo].[AirDromes](
[ID] [int] NOT NULL,
[IATA] [nvarchar](3) NULL
[Name] [nvarchar](255) NULL,
[IDCountry] [int] NULL,
[LAT] [decimal](10, 6) NULL,
[LON] [decimal](10, 6) NULL,

LAT and LOT columns point coordination of that airports. So we can calculate kilometers [...]]]></description>
			<content:encoded><![CDATA[<p>I have large airport database following schema. I am using this airport database for many reports as like seat by kilometers or fuel by kms.<br />
<code><br />
CREATE TABLE [dbo].[AirDromes](<br />
[ID] [int] NOT NULL,<br />
[IATA] [nvarchar](3) NULL<br />
[Name] [nvarchar](255) NULL,<br />
[IDCountry] [int] NULL,<br />
[LAT] [decimal](10, 6) NULL,<br />
[LON] [decimal](10, 6) NULL,<br />
</code><br />
<code><span style="font-family: Georgia;">LAT and LOT columns point coordination of that airports. So we can calculate kilometers between two coordinates as following function;</span></code><br />
<span id="more-37"></span><br />
<code><br />
ALTER FUNCTION [dbo].[Distance_IATA]<br />
(<br />
@DEP nvarchar(4),<br />
@ARR nvarchar(4)<br />
)<br />
RETURNS DECIMAL(12)<br />
AS<br />
BEGIN<br />
DECLARE<br />
@LAT1 DECIMAL(10,6),<br />
@LON1 DECIMAL(10,6),<br />
@LAT2 DECIMAL(10,6),<br />
@LON2 DECIMAL(10,6),<br />
@RADS DECIMAL(10,8),<br />
@DIST DECIMAL(12,3),<br />
@CALC DECIMAL(10,8)</code></p>
<p>SELECT<br />
@rads = 57.29577951,<br />
@LAT1 = LAT,<br />
@LON1 = LON<br />
FROM AirDromes<br />
WHERE IATA = @DEP</p>
<p>SELECT<br />
@LAT2 = LAT,<br />
@LON2 = LON<br />
FROM AirDromes<br />
WHERE IATA = @ARR</p>
<p>SELECT<br />
@lat1 = @lat1 / @rads,<br />
@lon1 = @lon1 / @rads,<br />
@lat2 = @lat2 / @rads,<br />
@lon2 = @lon2 / @rads</p>
<p>IF @lat1 = @lat2 AND @lon1 = @lon2<br />
SET @DIST = 0.00<br />
ELSE<br />
BEGIN<br />
SET @calc = SIN(@lat1) * SIN(@lat2) + COS(@lat1)<br />
* COS(@lat2) * COS(@lon1 - @lon2)<br />
IF (@calc) &gt; 1.0<br />
SET @calc = 1.0<br />
SET @DIST = 3963.1 * ACOS(@calc)<br />
END</p>
<p>RETURN (@DIST / 1.150779)<br />
END</p>
]]></content:encoded>
			<wfw:commentRss>http://www.muratbudak.com/sql/distance_between_two_different_airports/ /feed</wfw:commentRss>
		</item>
		<item>
		<title>Heybeliada trip</title>
		<link>http://www.muratbudak.com/photography/heybeliada_trip/ </link>
		<comments>http://www.muratbudak.com/photography/heybeliada_trip/ #comments</comments>
		<pubDate>Mon, 30 Mar 2009 11:35:34 +0000</pubDate>
		<dc:creator>mbudak</dc:creator>
		
		<category><![CDATA[Photography]]></category>

		<category><![CDATA[Istanbul]]></category>

		<category><![CDATA[Seagull]]></category>

		<guid isPermaLink="false">http://www.muratbudak.com/?p=30</guid>
		<description><![CDATA[Heybeliada, one of the famous island in the Marmara sea near of Istanbul. My wife and I started our journey from Kadikoy dock in Istanbul. 
   
My wife feeding a seagull 

 
]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">Heybeliada, one of the famous island in the Marmara sea near of Istanbul. My wife and I started our journey from Kadikoy dock in Istanbul. </p>
<p style="text-align: center;"><a class="wpGallery" title="A View from Kadikoy dock in Istanbul" href="http://lh4.ggpht.com/_zROeDSczrcM/Ru_152ndatI/AAAAAAAAAI4/wTK3gw2LF8c/Marti_ve_Vapur.jpg" target="_blank"><img src="http://lh4.ggpht.com/_zROeDSczrcM/Ru_192ndawI/AAAAAAAAAJQ/s1IurSX2u6Q/s144/Martilar1.jpg" alt="Seagulls" /> <img src="http://lh3.ggpht.com/_zROeDSczrcM/Ru_1_mndayI/AAAAAAAAAJg/PwpsqWBPI-o/s144/Martilar.jpg" alt="Seagulls" /> <img src="http://lh4.ggpht.com/_zROeDSczrcM/Ru_152ndatI/AAAAAAAAAI4/wTK3gw2LF8c/s144/Marti_ve_Vapur.jpg" alt="A View from Kadikoy dock" /> </a></p>
<p style="text-align: left;">My wife feeding a seagull <br />
<img src="http://lh6.ggpht.com/_zROeDSczrcM/Ru_2CWnda2I/AAAAAAAAAKA/RjT4yXehbCY/Marti_beslemek2.jpg" alt="Feeding a Seagull" /></p>
<p style="text-align: left;"> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.muratbudak.com/photography/heybeliada_trip/ /feed</wfw:commentRss>
		</item>
		<item>
		<title>How do I get random record in MSSQL?</title>
		<link>http://www.muratbudak.com/sql/how_do_i_get_random_record_in_mssql/ </link>
		<comments>http://www.muratbudak.com/sql/how_do_i_get_random_record_in_mssql/ #comments</comments>
		<pubDate>Mon, 23 Feb 2009 12:31:45 +0000</pubDate>
		<dc:creator>mbudak</dc:creator>
		
		<category><![CDATA[SQL]]></category>

		<category><![CDATA[Tricky]]></category>

		<guid isPermaLink="false">http://www.muratbudak.com/?p=26</guid>
		<description><![CDATA[simple question has simple answer.
Select top 1 * From [YourTable] Order by newid()
How it is working?
newid() generates e guid following as like that &#8220;CC5F5296-9D7A-401A-8E54-FDC399CE739D&#8221; . Thats why we can use Order by newid() function with our queries. When we run this query, every time we get different guid, therefore we can get random orders and we [...]]]></description>
			<content:encoded><![CDATA[<p>simple question has simple answer.</p>
<p><code>Select top 1 * From [YourTable] Order by newid()</code></p>
<p>How it is working?</p>
<p>newid() generates e guid following as like that &#8220;CC5F5296-9D7A-401A-8E54-FDC399CE739D&#8221; . Thats why we can use Order by newid() function with our queries. When we run this query, every time we get different guid, therefore we can get random orders and we just select top 1 row in every query.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.muratbudak.com/sql/how_do_i_get_random_record_in_mssql/ /feed</wfw:commentRss>
		</item>
		<item>
		<title>Airport taxiway signs</title>
		<link>http://www.muratbudak.com/travel/airport_taxiway_signs/ </link>
		<comments>http://www.muratbudak.com/travel/airport_taxiway_signs/ #comments</comments>
		<pubDate>Mon, 23 Feb 2009 08:00:51 +0000</pubDate>
		<dc:creator>mbudak</dc:creator>
		
		<category><![CDATA[Aviation]]></category>

		<category><![CDATA[Travel]]></category>

		<category><![CDATA[Airport]]></category>

		<guid isPermaLink="false">http://www.muratbudak.com/?p=19</guid>
		<description><![CDATA[I think most boring part of our flights is when the aircraft is taxiing from the apron to the runway or the other direction after landing.
for a little bit fun for our flights I just try to explain some airport signs here. You can show off with it to the passenger seated next to you.
The [...]]]></description>
			<content:encoded><![CDATA[<p>I think most boring part of our flights is when the aircraft is taxiing from the apron to the runway or the other direction after landing.</p>
<p>for a little bit fun for our flights I just try to explain some airport signs here. You can show off with it to the passenger seated next to you.</p>
<p>The flashcards are taken from PDF file I took on <a title="Aircrafts owners and pilot association" href="http://www.aopa.org/asf/publications/flashcards/flashpdf.pdf" target="_blank">AOPA</a>&#8217;s web site. </p>
<p> <br />
<span id="more-19"></span><br />
Before we get started, let’s clarify some basic expressions:</p>
<p>- <strong>taxiways:</strong> a system of tracks the lead planes from the terminal building to the runway. Once a plane enters the taxiway, it is under the control of the tower and must follow their instructions.</p>
<p>- <strong>runway:</strong> where planes land and take off. It is dangerous to stay on the runway too long, therefore planes are directed to the taxi ways if they need to wait for their slot.</p>
<p>- <strong>holding point:</strong> where the plane has to wait before entering the runway.</p>
<p>- <strong>ILS:</strong> Instrument Landing System - an automated system that helps pilots in landing. Most airports that accept passenger jets are equipped with ILS that becomes extremely important in case of bad weather.</p>
<p>And now the signs:</p>
<p><img class="alignleft size-full wp-image-1453" title="ils" src="http://airlineworld.files.wordpress.com/2009/02/ils.jpg?w=209&amp;h=172" alt="ils" width="209" height="172" /><strong>ILS critical area holding position sign:</strong></p>
<p>Hold at this sign on the taxiway, where the ILS is in use and the weather is less than 800 feet and 2 miles. Aircraft taxiing beyond this point may interfere with the ILS signal to approaching aircraft.</p>
<p> </p>
<p> </p>
<p> </p>
<p><img class="alignleft size-full wp-image-1455" title="1533" src="http://airlineworld.files.wordpress.com/2009/02/1533.jpg?w=199&amp;h=171" alt="1533" width="199" height="171" /><strong>Runway holding position sign:</strong></p>
<p>Hold here. In this example, the threshold for runway 15 is to your left and the threshold for runway 33 is to your right. This sign is located next to the yellow holding position marking painted on taxiways. The “A” sign is the <strong>Taxiway location sign</strong>. It indicates the taxiway you are on.</p>
<p> </p>
<p> </p>
<p><img class="alignleft size-full wp-image-1462" title="taxiway" src="http://airlineworld.files.wordpress.com/2009/02/taxiway.jpg?w=217&amp;h=173" alt="taxiway" width="217" height="173" /><strong>Taxiway direction:</strong></p>
<p>The yellow signs usually seen next to a taxiway location sign, indicate the direction of intersecting taxiways. In this example taxiway Charlie is to the left and right, and Alpha takes a turn to the right ahead.</p>
<p>.</p>
<p> </p>
<p> </p>
<p><img class="alignleft size-full wp-image-1464" title="15apch" src="http://airlineworld.files.wordpress.com/2009/02/15apch.jpg?w=206&amp;h=172" alt="15apch" width="206" height="172" /><strong>Runway approach area holding position sign:</strong></p>
<p>Taxiing past this sign may interfere with operations on the runway. In this case, aircraft arriving to runway 15 or departing from runway 33. It is located next to the yellow <strong>Holding position markings</strong> painted on the taxiway pavement. The aircraft has to stop on the solid lines side of the marking. The dashed lines show the direction towards the runway. Planes must stopped at this line until cleared.</p>
<p> </p>
<p>Have fun with your new knowledge during your next flight!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.muratbudak.com/travel/airport_taxiway_signs/ /feed</wfw:commentRss>
		</item>
		<item>
		<title>Hello there!</title>
		<link>http://www.muratbudak.com/uncategorized/hello-world/ </link>
		<comments>http://www.muratbudak.com/uncategorized/hello-world/ #comments</comments>
		<pubDate>Wed, 18 Feb 2009 13:16:52 +0000</pubDate>
		<dc:creator>mbudak</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://muratbudak.com/?p=1</guid>
		<description><![CDATA[Welcome to my personal BLOG
Hi everyone, I just started to blogging with Wordpress. First off all my purpose will to improve my English skill thats why my choice is this language. So I will blog about my programming skills, SQL and little bit electronic little bit photography.
Happy share
]]></description>
			<content:encoded><![CDATA[<p>Welcome to my personal BLOG</p>
<p>Hi everyone, I just started to blogging with Wordpress. First off all my purpose will to improve my English skill thats why my choice is this language. So I will blog about my programming skills, SQL and little bit electronic little bit photography.</p>
<p>Happy share</p>
]]></content:encoded>
			<wfw:commentRss>http://www.muratbudak.com/uncategorized/hello-world/ /feed</wfw:commentRss>
		</item>
	</channel>
</rss>
