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

<channel>
	<title>Duygu's notebook</title>
	<atom:link href="http://www.codeconfig.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.codeconfig.com</link>
	<description></description>
	<pubDate>Thu, 01 Jul 2010 13:26:41 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.5</generator>
	<language>en</language>
			<item>
		<title>CREATING CUSTOM ERROR PAGES ON APACHE</title>
		<link>http://www.codeconfig.com/?p=539</link>
		<comments>http://www.codeconfig.com/?p=539#comments</comments>
		<pubDate>Tue, 25 May 2010 08:30:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[About]]></category>

		<guid isPermaLink="false">http://www.codeconfig.com/?p=539</guid>
		<description><![CDATA[You don&#8217;t like to show your users a  standard and simple http error pages. OK Then let&#8217;s see how to manage to send the users to a different page, and create your custom error pages.

In httpd.conf file,
&#60;Directory /var/www/&#62;
AllowOverride None
Order allow,deny
allow from all
&#60;/Directory&#62;
to
&#60;Directory /var/www/&#62;
AllowOverride All
Order allow,deny
allow from all
&#60;/Directory&#62; 
Create .htaccess file, unless you do have one. [...]]]></description>
			<content:encoded><![CDATA[<p>You don&#8217;t like to show your users a  standard and simple http error pages. OK Then let&#8217;s see how to manage to send the users to a different page, and create your custom error pages.</p>
<ol>
<li>In httpd.conf file,<br />
&lt;Directory /var/www/&gt;<br />
AllowOverride <span style="text-decoration: underline;">None</span><br />
Order allow,deny<br />
allow from all<br />
&lt;/Directory&gt;</p>
<p>to</p>
<p><strong><span style="color: #008000;">&lt;Directory /var/www/&gt;<br />
AllowOverride <span style="text-decoration: underline;">All</span><br />
Order allow,deny<br />
allow from all<br />
&lt;/Directory&gt; </span></strong></li>
<li>Create .htaccess file, unless you do have one. It&#8217;s very simple to create a .htaccess file. Open some text editor and save the blank file name as .htaccess. Do not use any extension for the file name, just .htaccess. And don&#8217;t forget to put a dot before the file name.<br />
Write the page url in it, where you will redirect the user to:<br />
<strong><span style="color: #008000;">ErrorDocument 404 /404page.html<br />
</span></strong><span style="color: #008000;"><span style="color: #000000;">or you can just give a message:<br />
</span></span><strong><span style="color: #008000;">ErrorDocument 404 &#8220;The page you are looking is no longer exists.&#8221;</span></strong></li>
<li>Create a html file with the name you given in the .htaccess. So for our example we will create 404page.html in root directory.</li>
<li>Call a page, that does not in your root directory.</li>
</ol>
<p>! And don&#8217;t forget to restart your apache server, after you do some changes in apache&#8217;s configuration file httpd.conf.</p>
<p>You can extend this example for any other http errors. Use just one .htaccess file per directory.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codeconfig.com/?feed=rss2&amp;p=539</wfw:commentRss>
		</item>
		<item>
		<title>COMPARING DATE FIELDS WITH JAVASCRIPT</title>
		<link>http://www.codeconfig.com/?p=527</link>
		<comments>http://www.codeconfig.com/?p=527#comments</comments>
		<pubDate>Fri, 21 May 2010 08:25:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[About]]></category>

		<guid isPermaLink="false">http://www.codeconfig.com/?p=527</guid>
		<description><![CDATA[You have two date fields, one is for start date and another one is for end date.  You want to compare and ensure that date fields are in the correct order, like start date is before end date and other way around.
HTML Code:
&#60;html&#62;
&#60;head&#62;
&#60;/head&#62;
&#60;body&#62;
&#60;div&#62;
Start Date :&#60;input type=&#8221;text&#8221; name=&#8221;str_date&#8221; id=&#8221;str_date&#8221; size=&#8221;10&#8243; value=&#8221;" onchange=&#8221;controlDate(this.id, &#8216;end_date&#8217;);&#8221; /&#62;
End Date :&#60;input [...]]]></description>
			<content:encoded><![CDATA[<p>You have two date fields, one is for start date and another one is for end date.  You want to compare and ensure that date fields are in the correct order, like start date is before end date and other way around.</p>
<p>HTML Code:</p>
<p><strong><span style="color: #008000;">&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;div&gt;<br />
Start Date :&lt;input type=&#8221;text&#8221; name=&#8221;str_date&#8221; id=&#8221;str_date&#8221; size=&#8221;10&#8243; value=&#8221;" onchange=&#8221;controlDate(this.id, &#8216;end_date&#8217;);&#8221; /&gt;<br />
End Date :&lt;input type=&#8221;text&#8221; name=&#8221;end_date&#8221; id=&#8221;end_date&#8221; size=&#8221;10&#8243; value=&#8221;" onchange=&#8221;controlDate(this.id, &#8217;str_date&#8217;);&#8221; /&gt;<br />
&lt;/div&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</span></strong></p>
<p>You see, we add onchange javascript function to fields. And add below javascript code in the head of your page.</p>
<p>Javascript Code:</p>
<p><strong><span style="color: #008080;"> <span style="color: #008000;">&lt;script&gt;<br />
function controlDate(objId, dateId){<br />
str_first_date = document.getElementById(objId).value;<br />
str_second_date = document.getElementById(dateId).value;<br />
first_date = conv_to_date(str_first_date);<br />
second_date = conv_to_date(str_second_date);<br />
if(objId == &#8220;str_date&#8221; &amp;&amp; second_date != &#8220;&#8221;)<br />
{<br />
if(first_date &gt; second_date)<br />
{<br />
alert(&#8221;Start date must be before end date!&#8221;);<br />
document.getElementById(objId).value = &#8220;&#8221;;<br />
return false;<br />
}</span></span></strong></p>
<p><span style="color: #008000;"><strong>}<br />
if(objId == &#8220;end_date&#8221; &amp;&amp; second_date != &#8220;&#8221;)<br />
{<br />
if(first_date &lt; second_date)<br />
{<br />
alert(&#8221;End date must be after start date!&#8221;);<br />
document.getElementById(objId).value = &#8220;&#8221;;<br />
return false;<br />
}</strong></span></p>
<p><span style="color: #008000;"><strong>}<br />
}</strong></span></p>
<p><span style="color: #008000;"><strong>function conv_to_date(date_val)<br />
{</strong></span></p>
<p><span style="color: #008000;"><strong>var startYear = parseInt(date_val.substr(6,4), 10);<br />
var startMonth = parseInt(date_val.substr(3,2), 10) - 1; // as per Residuum&#8217;s comment<br />
var startDay = parseInt(date_val.substr(0,2), 10);<br />
var dt = new Date(startYear, startMonth, startDay);<br />
return dt;<br />
}<br />
&lt;/script&gt;</strong></span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.codeconfig.com/?feed=rss2&amp;p=527</wfw:commentRss>
		</item>
		<item>
		<title>CHANGE THE ELEMENTS STYLE WITH JAVASCRIPT</title>
		<link>http://www.codeconfig.com/?p=506</link>
		<comments>http://www.codeconfig.com/?p=506#comments</comments>
		<pubDate>Mon, 03 May 2010 07:39:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[About]]></category>

		<guid isPermaLink="false">http://www.codeconfig.com/?p=506</guid>
		<description><![CDATA[If you&#8217;re using templates in your project, you may want to use one template more than once. But what if you want to show some elements in one programme and hide these elements in second one. You constantly, write your ordinary two line of javascript code in the head of your html code. That&#8217;s where [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re using templates in your project, you may want to use one template more than once. But what if you want to show some elements in one programme and hide these elements in second one. You constantly, write your ordinary two line of javascript code in the head of your html code. That&#8217;s where the problem occurs.</p>
<p>For example, you write the code below and run it in your browser,</p>
<p><span style="color: #339966;"><strong>&lt;!DOCTYPE HTML PUBLIC &#8220;-//W3C//DTD HTML 4.01 Transitional//EN&#8221;&gt;<br />
&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;meta http-equiv=&#8221;content-type&#8221; content=&#8221;text/html; charset=windows-1250&#8243;&gt;<br />
&lt;title&gt;&lt;/title&gt;<br />
&lt;script&gt;<br />
var e = document.getElementById(&#8217;mydiv&#8217;);<br />
e.style.display = &#8216;none&#8217;;<br />
&lt;/script&gt;<br />
&lt;/head&gt;</strong><br />
<strong>&lt;body&gt;<br />
&lt;div id=&#8221;mydiv&#8221;&gt;<br />
Hello, How are you today?<br />
&lt;/div&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;</strong></span></p>
<p>Then you will get an javascript error: e is null. Because you can&#8217;t change the style of an element with javascript before the element is loaded in your page. But if you&#8217;re stubborn like me, you can write your javascript code end of your page.</p>
<p><strong><span style="color: #339966;">&lt;!DOCTYPE HTML PUBLIC &#8220;-//W3C//DTD HTML 4.01 Transitional//EN&#8221;&gt;<br />
&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;meta http-equiv=&#8221;content-type&#8221; content=&#8221;text/html; charset=windows-1250&#8243;&gt;<br />
&lt;title&gt;&lt;/title&gt;</span></strong></p>
<p><span style="color: #339966;"><strong>&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;div id=&#8221;mydiv&#8221;&gt;<br />
Hello, How are you today?<br />
&lt;/div&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;<br />
&lt;script&gt;<br />
var e = document.getElementById(&#8217;mydiv&#8217;);<br />
e.style.display = &#8216;none&#8217;;<br />
&lt;/script&gt;</strong></span></p>
<p>I tested the code above, in IE6 and FF.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codeconfig.com/?feed=rss2&amp;p=506</wfw:commentRss>
		</item>
		<item>
		<title>ORA-01417: a table may be outer joined to at most one other table</title>
		<link>http://www.codeconfig.com/?p=496</link>
		<comments>http://www.codeconfig.com/?p=496#comments</comments>
		<pubDate>Thu, 22 Apr 2010 11:15:14 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[About]]></category>

		<guid isPermaLink="false">http://www.codeconfig.com/?p=496</guid>
		<description><![CDATA[I&#8217;ve faced with this error when I tried to join one table with two different tables, in oracle 8i. Someone told me that this is imposibble to overcome and I should write some function and call the function in select statement. I insisted to solve the problem in one query because I wanted to believe [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve faced with this error when I tried to join one table with two different tables, in oracle 8i. Someone told me that this is imposibble to overcome and I should write some function and call the function in select statement. I insisted to solve the problem in one query because I wanted to believe that this should be done in Oracle somehow.  Moral of a fable, I found the solution in <strong>Ask Tom</strong> ( <a title="Ask Tom - Ora-01417" href="http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:3681127952930" target="_blank">http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:3681127952930</a> ) and I want to share it.</p>
<p>I&#8217;m using the same example,</p>
<p>Query that&#8217;s giving the error:<br />
<code><br />
<strong><span style="color: #339966;">SELECT<br />
TIME_DIM.MONTH,<br />
CUSTOMER_DIM.CUSTOMER_NAME,<br />
SUM(SALES_FACTS.HOURS)<br />
FROM<br />
TIME_DIM,<br />
CUSTOMER_DIM,<br />
SALES_FACTS<br />
WHERE<br />
( SALES_FACTS.CUSTOMER_FK(+)=CUSTOMER_DIM.CUSTOMER_PK  )<br />
AND  ( TIME_DIM.TIME_PK=SALES_FACTS.TIME_FK(+)  )<br />
GROUP BY<br />
TIME_DIM.DAY,<br />
CUSTOMER_DIM.CUSTOMER_NAME</span></strong></code></p>
<p>Correct query is:</p>
<pre><strong><span style="color: #339966;">select ...
  from ( select * from time_dim, customer_dim ) A,
       sales_fact
 where a.customer_pk = sales_fact.customer_fk(+)
   and a.time_pk = sales_fact.time_fk(+)</span></strong>
 <strong><span style="color: #339966;">group by a.day, a.customer_name</span></strong></pre>
]]></content:encoded>
			<wfw:commentRss>http://www.codeconfig.com/?feed=rss2&amp;p=496</wfw:commentRss>
		</item>
		<item>
		<title>SQL</title>
		<link>http://www.codeconfig.com/?p=466</link>
		<comments>http://www.codeconfig.com/?p=466#comments</comments>
		<pubDate>Tue, 17 Nov 2009 14:01:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[About]]></category>

		<guid isPermaLink="false">http://www.codeconfig.com/?p=466</guid>
		<description><![CDATA[Though I study with sql so often, I discovered something very important, today. That is the big difference between subqueries and join statements.
I have two tables named COMPANY and WORK_EXPERIENCE. In Company table there are company_id, company_name, company_country columns and in work_experience table there are id, company_id, employee_id and quit_date columns. So here what I&#8217;m [...]]]></description>
			<content:encoded><![CDATA[<p>Though I study with sql so often, I discovered something very important, today. That is the big difference between subqueries and join statements.<br />
I have two tables named COMPANY and WORK_EXPERIENCE. In Company table there are company_id, company_name, company_country columns and in work_experience table there are id, company_id, employee_id and quit_date columns. So here what I&#8217;m trying to do is list all the companies names and the countries where they are in. Also list the number of employees that work in that company beside the name of the company in brackets. Like,<br />
<img src="http://www.codeconfig.com/wp-content/uploads/sql1.JPG" alt="SQL1" /></p>
<p>So writing join statement like this:<br />
<span style="color: #339966;"><strong><span>SELECT dbo.ProperCase([company_name]) + &#8216; (&#8217; + cast(count(work_experience.id) as varchar) + &#8216;)&#8217; COMPANY, COUNTRY_NAME<br />
FROM [COMPANY]<br />
INNER JOIN COUNTRY ON COMPANY.country_id = COUNTRY.country_id<br />
LEFT JOIN WORK_EXPERIENCE ON COMPANY.company_id = WORK_EXPERIENCE.company_id<br />
WHERE quit_date is null<br />
group by COUNTRY_NAME</span></strong></span></p>
<p>will bring our list but with an exception. If all rows related to one company in work_experience table have all values different than null in quit_date column, that company won&#8217;t be seen in the list. Because that is not what we want we can deal with this complication using subqueries.</p>
<p><span style="color: #339966;"><strong><span>SELECT COMPANY_NAME + &#8216; (&#8217; +<br />
(select cast(count(WORK_EXPERIENCE.ID) as varchar)  from WORK_EXPERIENCE WHERE </span></strong><strong><span>WORK_EXPERIENCE</span></strong></span><strong><span style="color: #008080;"><span style="color: #339966;">.company_id = COMPANY.company_id and quit_date is null) + &#8216;)&#8217; COMPANY, country_name<br />
FROM [COMPANY]<br />
INNER JOIN COUNTRY ON COMPANY.country_id = COUNTRY.country_id</span><br />
</span></strong></p>
<p>And the main idea is explaining in  :<br />
<a href="http://www.allinterview.com/showanswers/16430.html">AllInterview.com</a><br />
&#8211; <span style="color: #993366;">Majorly subqueries  run independently and result of the<br />
subquery used in the outer query(other than corelated subquery).<br />
And in case of join a query only give the result when the<br />
joining condition gets satisfied.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.codeconfig.com/?feed=rss2&amp;p=466</wfw:commentRss>
		</item>
		<item>
		<title>HOŞGELDİNİZ</title>
		<link>http://www.codeconfig.com/?p=129</link>
		<comments>http://www.codeconfig.com/?p=129#comments</comments>
		<pubDate>Mon, 29 Dec 2008 11:54:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[About]]></category>

		<guid isPermaLink="false">http://localhost/myblog/?p=129</guid>
		<description><![CDATA[Programcı olmaya karar verdiğim andan itibaren, her öğrendiğimi not defterime yazmaya başlamıştım. Bu notlarla bir site oluşturabilirdim tabii ama bunu yapacak vakit bulamıyordum. Mesleğe yeni başlamıştım, bir taraftan öğreniyordum bir taraftan çalışıyordum. Böylece meslekte 1.5 seneyi geride bıraktım. Artık notlarımı paylaşmamın tam zamanıydı. Bu aslında başta benim fikrim değildi. Bana bu mesleği kazandıran, bu hayatta kalabilmem için bana en değerli armağanlardan birini [...]]]></description>
			<content:encoded><![CDATA[<p>Programcı olmaya karar verdiğim andan itibaren, her öğrendiğimi not defterime yazmaya başlamıştım. Bu notlarla bir site oluşturabilirdim tabii ama bunu yapacak vakit bulamıyordum. Mesleğe yeni başlamıştım, bir taraftan öğreniyordum bir taraftan çalışıyordum. Böylece meslekte 1.5 seneyi geride bıraktım. Artık notlarımı paylaşmamın tam zamanıydı. Bu aslında başta benim fikrim değildi. Bana bu mesleği kazandıran, bu hayatta kalabilmem için bana en değerli armağanlardan birini veren en değerli hocamın, meslektaşımın, yani babamın, fikir vermesi ve yönlendirmesi sonucu not defterimi sizlerle paylaşmaya karar verdim. Sırası gelmişken çok sevdiğim babama buradan çok teşekkür etmek istiyorum. Onun sayesinde buralara geldim. Sonsuz teşekkürler babacığım. Ve anneme sonsuz sabrı, yoğun çalışmalar esnasında evdeki her işe tek başına koştuğu ve babamla çalışmalarımız arasında karnımız acıktığında bize her zaman hazırladığı eşsiz lezzetli yemekleri için çok çok teşekkür etmek istiyorum. Son olarak da sevgili eşime ve ağabeyime, bana her zaman destek verdikleri için çok teşekkür ediyorum. İyiki varsınız.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codeconfig.com/?feed=rss2&amp;p=129</wfw:commentRss>
		</item>
		<item>
		<title>WELCOME</title>
		<link>http://www.codeconfig.com/?p=24</link>
		<comments>http://www.codeconfig.com/?p=24#comments</comments>
		<pubDate>Fri, 05 Dec 2008 13:46:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[About]]></category>

		<guid isPermaLink="false">http://localhost/myblog/?p=24</guid>
		<description><![CDATA[I began to take notes, the moment that i decided to be a programmer. I wanted to make a site with these notes but I couldn&#8217;t find the time to do this because I was new in my career. I was working and learning at the same time. I&#8217;ve been working for 1.5 years in [...]]]></description>
			<content:encoded><![CDATA[<p>I began to take notes, the moment that i decided to be a programmer. I wanted to make a site with these notes but I couldn&#8217;t find the time to do this because I was new in my career. I was working and learning at the same time. I&#8217;ve been working for 1.5 years in this job. Now it is the time to share my notes. This was not my idea, in the beginning. I started to make this site with my notes because someone gave me this idea. He is the one who is my precious teacher, my colleague, my father. He taught me everything which i know now. By the way i want to thank my dear father here. Thank you so much, daddy. And i want to thank my mother for her endless patience, doing all the job in the home when we were hard working and for all those delicious foods when we were hungry. At last i want to thank my dear husband and my brother for their support, everytime.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codeconfig.com/?feed=rss2&amp;p=24</wfw:commentRss>
		</item>
	</channel>
</rss>
