<?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>Flash/Flex Developer &#187; eval</title>
	<atom:link href="http://blog.ismailsimsek.com/tag/eval/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.ismailsimsek.com</link>
	<description></description>
	<lastBuildDate>Thu, 22 Dec 2011 14:58:55 +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>jquery ile php den dönen veriyi almak &#8211; kontrol etmek</title>
		<link>http://blog.ismailsimsek.com/php/jquery-ile-php-den-donen-veriyi-almak-kontrol-etmek.html</link>
		<comments>http://blog.ismailsimsek.com/php/jquery-ile-php-den-donen-veriyi-almak-kontrol-etmek.html#comments</comments>
		<pubDate>Fri, 02 Jul 2010 13:37:30 +0000</pubDate>
		<dc:creator>İsmail Şimşek</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[eval]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[json_encode]]></category>
		<category><![CDATA[uploadify]]></category>

		<guid isPermaLink="false">http://blog.ismailsimsek.com/?p=169</guid>
		<description><![CDATA[Merhaba arkadaşlar. Makalenin başlığından da anlaşılacağı gibi jquery ile php den dönen veriyi nasıl alabileceğimize değineceğim. Aslında bu makaleyi başıma gelen bir sorunun çözümüne ulaştıktan sonra yazıyorum. Yardımları için Şakir Şensoy ve Göksu Kayış’a teşekkür ederim. Başıma gelen şuydu. Jquery uploadify componenti ile hosta resim yüklüyorum. Eğer işlem başarılı ise 1 değilse 0 aynı resim varsa 2 dönüyor. Tabi bu dönen verilere göre kullanıcıya bir uyarı vermek zorundayım. Bunları kontrol etmek için dönen veriyi if [...]]]></description>
			<content:encoded><![CDATA[<p>Merhaba arkadaşlar. Makalenin başlığından da anlaşılacağı gibi jquery ile php den dönen veriyi nasıl alabileceğimize değineceğim. Aslında bu makaleyi başıma gelen bir sorunun çözümüne ulaştıktan sonra yazıyorum. Yardımları için Şakir Şensoy ve Göksu Kayış’a teşekkür ederim.<br />
Başıma gelen şuydu. Jquery uploadify componenti ile hosta resim yüklüyorum. Eğer işlem başarılı ise 1 değilse 0 aynı resim varsa 2 dönüyor. Tabi bu dönen verilere göre kullanıcıya bir uyarı vermek zorundayım. Bunları kontrol etmek için dönen veriyi if le kontrol edip alert ile uyarıyı vereceğim. Bu konuda sorun yok. Ama dönen veriyi if ile kontrol edemiyordum. Ne yaptıysam olmadı. Ama verinin döndüğünden eminim :)<br />
Çözüm ise çok basitmiş. (normal bir ajax request i için yazıyorum kodları. Uploadify için bir satır daha ekleyeceğiz.) Yapmanız gereken şey şu. Php tarafında veriyi json şeklinde göndermek. Yani</p>
<div class="igBar"><span id="lphp-4"><a href="#" onclick="javascript:showPlainTxt('php-4'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-4">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span>resimUpload == <span style="color:#000000; font-weight:bold;">TRUE</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#0000FF;">$json</span> = <a href="http://www.php.net/array"><span style="color:#000066;">array</span></a><span style="color:#006600; font-weight:bold;">&#40;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&amp;quot;sonuc&amp;quot; =&amp;gt; “<span style="color:#CC66CC;color:#800000;">1</span>”,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&amp;quot;mesaj&amp;quot; =&amp;gt; &amp;quot;Yükleme yapıldı.&amp;quot;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.php.net/echo"><span style="color:#000066;">echo</span></a> json_encode<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$json</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>jquery kısmıda şu kodlar var.</p>
<div class="igBar"><span id="ljavascript-5"><a href="#" onclick="javascript:showPlainTxt('javascript-5'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JavaScript:</span>
<div id="javascript-5">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">function</span> uye_giris<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; $.<span style="color: #006600;">ajax</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; type&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: <span style="color: #3366CC;">'POST'</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; dataType&nbsp; &nbsp; &nbsp;: <span style="color: #3366CC;">'json'</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; url&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; : upload.<span style="color: #006600;">php</span><span style="color: #3366CC;">',</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #3366CC;">&nbsp; &nbsp; &nbsp; &nbsp; data&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;: $('</span>form#resim_sonuc’<span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">serialize</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; success&nbsp; &nbsp; &nbsp; : <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>data<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>data.<span style="color: #006600;">giris</span> == “<span style="color: #CC0000;color:#800000;">1</span>”<span style="color: #66cc66;">&#41;</span>&nbsp; &nbsp;<span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066;">alert</span><span style="color: #66cc66;">&#40;</span>JSON.<span style="color: #006600;">mesaj</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>
İşte bu kadar. Bu şekilde dönen veriyi, verileri istediğimiz gibi kullanabiliyoruz. Json sayesinde birden fazla veride döndürebiliyoruz.<br />
Gelelim uploadify ile ilgili olan kısma. Bu component ile dayatype belirleyemiyorum maalesef. Bu durumda dönen verinin json olduğunu ya bizim bildirmemiz lazım yada ona göre bir işlem yapmamız lazım. Dönen veriyi if ile kontrol etmeden önce şunu yazmamız lazım.</p>
<div class="igBar"><span id="ljavascript-6"><a href="#" onclick="javascript:showPlainTxt('javascript-6'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JavaScript:</span>
<div id="javascript-6">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000066; font-weight: bold;">eval</span><span style="color: #66cc66;">&#40;</span>“<span style="color: #003366; font-weight: bold;">var</span> obj =” + data<span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p>
bu şekilde dönen veriyi bir object e atmış olduk. Şimdi aynı şekilde kullanabiliriz. İyi çalışmalar.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ismailsimsek.com/php/jquery-ile-php-den-donen-veriyi-almak-kontrol-etmek.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Actionscript 3.0 da eval kullanımı</title>
		<link>http://blog.ismailsimsek.com/adobe-2/flash-actionscript-3-0/actionscript-3-0-da-eval-kullanimi.html</link>
		<comments>http://blog.ismailsimsek.com/adobe-2/flash-actionscript-3-0/actionscript-3-0-da-eval-kullanimi.html#comments</comments>
		<pubDate>Thu, 27 Aug 2009 18:36:03 +0000</pubDate>
		<dc:creator>İsmail Şimşek</dc:creator>
				<category><![CDATA[Actionscript]]></category>
		<category><![CDATA[actionscript 3.0]]></category>
		<category><![CDATA[eval]]></category>

		<guid isPermaLink="false">http://www.ismailsimsek.com/blog/?p=111</guid>
		<description><![CDATA[Bildiğiniz gibi ya da fark edeceğiniz üzere actionscript 3.0 da artık eval fonksiyonu kullanılmıyor. Peki bunun yerine ne kullanacağız.  Sahnemizde instance name i mc1 olan bir movieclip var ve x özellği 0. Yani sola yaslı durumda. Kodlarımıza bir göz atalım. PLAIN TEXT Actionscript: var fnk:String=&#38;quot;mc1&#38;quot;; function degistir&#40;nesne:String&#41;&#123; &#160; &#160; this&#91;nesne&#93;.x=300; &#125; &#160; degistir&#40;fnk&#41;; trace&#40;mc1.x&#41;;    //300 gördüğünüz gibi "this[]" içine yazdığımız string ifadenin işaret ettiği nesne bulunup x özelliği değiştirilmiştir. Örnek dosyayı indirmek için tıklayınız.]]></description>
			<content:encoded><![CDATA[<p>Bildiğiniz gibi ya da fark edeceğiniz üzere actionscript 3.0 da artık eval fonksiyonu kullanılmıyor. Peki bunun yerine ne kullanacağız.  Sahnemizde instance name i mc1 olan bir movieclip var ve x özellği 0. Yani sola yaslı durumda. Kodlarımıza bir göz atalım.</p>
<div class="igBar"><span id="lactionscript-8"><a href="#" onclick="javascript:showPlainTxt('actionscript-8'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">Actionscript:</span>
<div id="actionscript-8">
<div class="actionscript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">var</span> fnk:<span style="color: #0066CC;">String</span>=&amp;quot;mc1&amp;quot;;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">function</span> degistir<span style="color: #66cc66;">&#40;</span>nesne:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color: #0066CC;">this</span><span style="color: #66cc66;">&#91;</span>nesne<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">x</span>=<span style="color: #cc66cc;color:#800000;">300</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">degistir<span style="color: #66cc66;">&#40;</span>fnk<span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>mc1.<span style="color: #006600;">x</span><span style="color: #66cc66;">&#41;</span>;    <span style="color: #808080; font-style: italic;">//300 </span></div>
</li>
</ol>
</div>
</div>
</div>
<p>
gördüğünüz gibi "this[]" içine yazdığımız string ifadenin işaret ettiği nesne bulunup x özelliği değiştirilmiştir. Örnek dosyayı indirmek için <a href="http://www.ismailsimsek.com/ie/eval.rar" target="_self">tıklayınız.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ismailsimsek.com/adobe-2/flash-actionscript-3-0/actionscript-3-0-da-eval-kullanimi.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

