<?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>NAzT&#039;s Blog &#187; array</title> <atom:link href="http://www.together.in.th/tag/array/feed/" rel="self" type="application/rss+xml" /><link>http://www.together.in.th</link> <description>technology, misc</description> <lastBuildDate>Sat, 17 Dec 2011 14:00:31 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=</generator> <atom:link rel="hub" href="http://superfeedr.com/hubbub"/> <item><title>Javascript สั้นๆ ตอน Array ปลอมๆ [แล้วจะรู้ได้ยังไงว่าเป็น Array หรือ Object]</title><link>http://www.together.in.th/javascript-how-to-distinguish-array-and-object-phony-array/</link> <comments>http://www.together.in.th/javascript-how-to-distinguish-array-and-object-phony-array/#comments</comments> <pubDate>Sat, 23 Jul 2011 11:02:33 +0000</pubDate> <dc:creator>NAzT</dc:creator> <category><![CDATA[Javascript]]></category> <category><![CDATA[array]]></category> <category><![CDATA[awful]]></category> <category><![CDATA[awful part]]></category> <category><![CDATA[javascript]]></category> <category><![CDATA[object]]></category> <category><![CDATA[object as array]]></category> <category><![CDATA[phony array]]></category> <guid
isPermaLink="false">http://www.together.in.th/?p=3852</guid> <description><![CDATA[ใน JavaScript ไม่มีข้อมูลที่เป็น Array จริงๆ Array ที่มีอยู่มัน array แบบหลอกๆ จริงแล้วมันเป็น object ที่มี key เป็นตัวเลข, มี method เกี่ยวกับ array, และมี property length ถ้าเราพึ่งคำสั่ง typeof อย่างเดียวเราก็จะเจ็บอีกตามเคย กล่าวคือถ้าเราสั่ง typeof [] และ typeof {} มันจะบอกว่า เป็น object ทั้งคู่! แบบนี้ แล้วเราจะรู้ได้ยังไงว่ามันเป็น array รึเปล่า ตรวจสอบได้หลายวิธีนะครับ เช็ค constructor ก็ได้ if (my_value &#38;&#38; typeof my_value === 'object' &#38;&#38; my_value.constructor === Array) { } [...]]]></description> <wfw:commentRss>http://www.together.in.th/javascript-how-to-distinguish-array-and-object-phony-array/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Unit Vectors &#8211; Normalizing ใช้ python และ numpy</title><link>http://www.together.in.th/unit-vectors-normalizing-using-python-numpy/</link> <comments>http://www.together.in.th/unit-vectors-normalizing-using-python-numpy/#comments</comments> <pubDate>Thu, 14 Jan 2010 15:15:28 +0000</pubDate> <dc:creator>Nat</dc:creator> <category><![CDATA[Python]]></category> <category><![CDATA[array]]></category> <category><![CDATA[git]]></category> <guid
isPermaLink="false">http://www.together.in.th/?p=1261</guid> <description><![CDATA[&#160; ก่อนที่เราจะ normalize vector ได้ เราต้องหา norm ( magnitude หรือ ขนาด) ของมันก่อน ซึ่งมันหาได้โดยการ ถอด Square root ของ ผลบวกกำลังสองครับ (sumsquare) length = sqrt((ax * ax) + (ay * ay) + (az * az)) length = sqrt(9 + 1 + 4) = 3.742 ซึ่ง 3.742 จะเป็น ขนาดของ Vector [1,2,3] ครับ ถ้าจะ normalize&#160; vector&#160; นี้ก็เอา magnitude ไปหารทุกตัวครับ x [...]]]></description> <wfw:commentRss>http://www.together.in.th/unit-vectors-normalizing-using-python-numpy/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>[Google Maps Geocoding] ลอง Parse Json ด้วย Groovy + Java (Netbeans)</title><link>http://www.together.in.th/try-parse-json-using-groovy-java-netbeans/</link> <comments>http://www.together.in.th/try-parse-json-using-groovy-java-netbeans/#comments</comments> <pubDate>Tue, 12 Jan 2010 09:51:09 +0000</pubDate> <dc:creator>Nat</dc:creator> <category><![CDATA[Geolocation]]></category> <category><![CDATA[Groovy]]></category> <category><![CDATA[Java]]></category> <category><![CDATA[JSON]]></category> <category><![CDATA[array]]></category> <category><![CDATA[geocoding]]></category> <category><![CDATA[git]]></category> <category><![CDATA[php]]></category> <category><![CDATA[Project]]></category> <guid
isPermaLink="false">http://www.together.in.th/?p=1244</guid> <description><![CDATA[โปรเจ็คตลกๆมาอีกแล้ว &#160;เพราะโปรเจ็คนี้ผมใช้ &#160;Json Lib&#160;+ Groovy + Java แต่ผมใช้ Groovy ดึง json (URL.text) แล้วใช้ Java เป็นตัวแกะ jsonObject เป็น jsonArray หลังจากนั้นเอาข้อมูลโยนกลับไปให้ Groovy ถอดเอาเฉพาะส่วนที่ต้องการออกมา (ในที่นี้คือ coordinates &#8212; latitude ,longitude นั่นแหละ) ดูวุ่นวายมาก ทั้งๆที่ เขียน Groovy อย่างเดียวก็ได้ เพราะ Json Lib ก็ลองรับ groovy&#160;&#160;หรือจะเขียน Java เพียวๆ เลยก็ได้&#160; &#160; เรื่องของเรื่องคืออยากเขียน Java ร่วมกับ Groovy อีกครั้ง เพราะไม่ค่อยถูกกับ Java จริงๆ มันดูเวื่นเว้อ &#160;มันเขียนเวิ่นเว้อด้วย ยาวๆ งงๆ (อาจเป็นเพราะไม่ได้ศึกษาอย่างลึกซึ้ง) groovy [...]]]></description> <wfw:commentRss>http://www.together.in.th/try-parse-json-using-groovy-java-netbeans/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>[code] อัพโหลดภาพเข้า twitpic โดยใช้ api</title><link>http://www.together.in.th/code-php-curl-upload-picture-to-twitpic-using-api/</link> <comments>http://www.together.in.th/code-php-curl-upload-picture-to-twitpic-using-api/#comments</comments> <pubDate>Mon, 25 May 2009 15:08:47 +0000</pubDate> <dc:creator>NAzT</dc:creator> <category><![CDATA[Uncategorized]]></category> <category><![CDATA[array]]></category> <category><![CDATA[curl]]></category> <category><![CDATA[CURLOPT]]></category> <category><![CDATA[php]]></category> <category><![CDATA[social-network]]></category> <category><![CDATA[xml]]></category> <guid
isPermaLink="false">http://www.together.in.th/?p=933</guid> <description><![CDATA[[code] อัพโหลดภาพเข้า twitpic โดยใช้ api จะใช้ CURL ซึ่ง จาก function จะ input username ,password , filepath function postTwitpic($username='',$password='',$filepath='') { $postfields = array(); $postfields['username'] = $username; $postfields['password'] = $password; $postfields['media'] = "@$filepath"; $twitter_url = 'http://twitpic.com/api/upload'; $curl = curl_init(); curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 2); curl_setopt($curl, CURLOPT_HEADER, false); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_BINARYTRANSFER, 1); curl_setopt($curl, CURLOPT_URL, $twitter_url); curl_setopt($curl, CURLOPT_POST, 3); [...]]]></description> <wfw:commentRss>http://www.together.in.th/code-php-curl-upload-picture-to-twitpic-using-api/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>[Draft] : NPDigger Version Semi Auto</title><link>http://www.together.in.th/draft-npdigger-version-semi-auto/</link> <comments>http://www.together.in.th/draft-npdigger-version-semi-auto/#comments</comments> <pubDate>Fri, 27 Mar 2009 09:33:10 +0000</pubDate> <dc:creator>NAzT</dc:creator> <category><![CDATA[โปรขุด]]></category> <category><![CDATA[array]]></category> <category><![CDATA[[Draft] : NPDigger Version Semi Auto]]></category> <guid
isPermaLink="false">http://www.together.in.th/?p=893</guid> <description><![CDATA[กำลังทำ npdigger version ใหม่แบบ Semi Automatic เปิดโปรแกรมทิ้งไว้ แล้วมันจะโพสเองเรื่อยๆ จด code  ไว้หน่อยละกัน function getCode($userkey) { if(isset($userkey)) { // $this-&#62;db-&#62;select_min(&#8216;added_time&#8217;); // $this-&#62;db-&#62;where(&#8216;status&#8217;, ); // $query= $this-&#62;db-&#62;get(&#8216;captcha&#8217;); /// $this-&#62;db-&#62;select(&#8216;UNIX_TIMESTAMP(MIN(added_time)) AS MIN_STAMP&#8217;); // $query= $this-&#62;db-&#62;get_where(&#8216;captcha&#8217;, array(&#8216;userkey&#8217; =&#62; $userkey) ); $this-&#62;db-&#62;select(&#8216;captcha, decaptcha&#8217;); // $this-&#62;db-&#62;select_min(&#8216;addfed_time&#8217;); // $array = array(&#8216;UNIX_TIMESTAMP(added_timed)&#8217; =&#62; &#8216;UNIX_TIMESTAMP(MIN(added_time))&#8217;); $where = &#8220;UNIX_TIMESTAMP(added_time) =  (select UNIX_TIMESTAMP(MIN(added_time))  FROM captcha WHERE userkey=&#8217;$userkey&#8217;) [...]]]></description> <wfw:commentRss>http://www.together.in.th/draft-npdigger-version-semi-auto/feed/</wfw:commentRss> <slash:comments>14</slash:comments> </item> <item><title>getPage และ postPage ด้วย php+cURL</title><link>http://www.together.in.th/getpage-%e0%b9%81%e0%b8%a5%e0%b8%b0-postpage-%e0%b8%94%e0%b9%89%e0%b8%a7%e0%b8%a2-phpcurl/</link> <comments>http://www.together.in.th/getpage-%e0%b9%81%e0%b8%a5%e0%b8%b0-postpage-%e0%b8%94%e0%b9%89%e0%b8%a7%e0%b8%a2-phpcurl/#comments</comments> <pubDate>Sun, 04 Jan 2009 03:00:10 +0000</pubDate> <dc:creator>NAzT</dc:creator> <category><![CDATA[Programming]]></category> <category><![CDATA[array]]></category> <category><![CDATA[curl]]></category> <category><![CDATA[curl-get]]></category> <category><![CDATA[curl-post]]></category> <category><![CDATA[getpage]]></category> <category><![CDATA[php]]></category> <guid
isPermaLink="false">http://www.together.in.th/?p=385</guid> <description><![CDATA[มีฟังก์ชั่น 2 อัน ชื่อตรงตัวเลยครับว่าให้ทำอะไร วิธีใช้ก็อ่านเอาที่ Prototype ของ function ได้เลยครับ //----------------------------------------------------------------------------------- function getPage($url, $referer, $timeout, $header){ if(!isset($timeout)) $timeout=30; $curl = curl_init(); if(strstr($referer,"://")){ curl_setopt ($curl, CURLOPT_REFERER, $referer); } curl_setopt ($curl, CURLOPT_URL, $url); curl_setopt ($curl, CURLOPT_TIMEOUT, $timeout); curl_setopt ($curl, CURLOPT_USERAGENT, sprintf("Mozilla/%d.0",rand(4,5))); curl_setopt ($curl, CURLOPT_HEADER, (int)$header); curl_setopt ($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($curl, CURLOPT_SSL_VERIFYPEER, 0); $html = curl_exec ($curl); curl_close [...]]]></description> <wfw:commentRss>http://www.together.in.th/getpage-%e0%b9%81%e0%b8%a5%e0%b8%b0-postpage-%e0%b8%94%e0%b9%89%e0%b8%a7%e0%b8%a2-phpcurl/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>MPI Programming : ตอนที่ 2</title><link>http://www.together.in.th/mpi-programming-%e0%b8%95%e0%b8%ad%e0%b8%99%e0%b8%97%e0%b8%b5%e0%b9%88-2/</link> <comments>http://www.together.in.th/mpi-programming-%e0%b8%95%e0%b8%ad%e0%b8%99%e0%b8%97%e0%b8%b5%e0%b9%88-2/#comments</comments> <pubDate>Sun, 28 Dec 2008 12:19:06 +0000</pubDate> <dc:creator>NAzT</dc:creator> <category><![CDATA[Programming]]></category> <category><![CDATA[array]]></category> <guid
isPermaLink="false">http://www.together.in.th/?p=311</guid> <description><![CDATA[Blocking Communication อันนี้เป็น Prototype ของ MPI_Send และ MPI_Recv ซึ่งเป็นการสื่อสารแบบ Blocking ครับ (มันมี Non-blocking ด้วยไว้ค่อยมาคุยกันอีกทีว่ามันต่างกันยังไงในวันหลังนะครับ) ที่ยกเรื่องนี้มาให้ดูก่อน เพราะตอนหน้าเราจะส่งข้อมูลข้าม Process โดยใช้ MPI (Send &#38; Recv) กันแล้วคร้าบผม int MPI_Send( void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm ); int MPI_Recv( void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Status *status ); [...]]]></description> <wfw:commentRss>http://www.together.in.th/mpi-programming-%e0%b8%95%e0%b8%ad%e0%b8%99%e0%b8%97%e0%b8%b5%e0%b9%88-2/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Ruby Array with Range : Note</title><link>http://www.together.in.th/ruby-array-with-range-note/</link> <comments>http://www.together.in.th/ruby-array-with-range-note/#comments</comments> <pubDate>Thu, 04 Dec 2008 15:10:18 +0000</pubDate> <dc:creator>NAzT</dc:creator> <category><![CDATA[Programming]]></category> <category><![CDATA[array]]></category> <category><![CDATA[หนังสือ]]></category> <guid
isPermaLink="false">http://nazt.gamemun.com/blog/?p=96</guid> <description><![CDATA[กำลังสงสัยว่า  ใน ruby a[0..n] ทำไมมันถึงไม่เหมือนกับ a[0,n] ครับ มันควรจะเหมือนกันไม่ใช่หรอครับ   เพราะไปเขียน Merge Sort แล้ว มันให้ผลไม่เหมือนกันเกิด Infinite Loop เลยทีเดียว พอเปิดหนังสือดู อ้าว&#8230; เฮ้ย เจ้าตัว operator [ ] ของ array มันก็ให้ผลเหมือนกันนี่หว่า return เหมือนกันเลย หลังจากนั้นก็ลองไปเทสแยกดู ตอนแรก a[0,3] กับ  a[0..3] มันเท่ากัน ก็เลย งงว่า มันก็เท่ากันนี่หว่า แต่ลองเช็คอีกทีว่าถ้าเป็น 0,0 มันจะ return อะไร แล้วก็โป๊ะเชะ    ที่มันไม่เท่าเพราะ  a=["a","b","c","d"] แล้ว   &#62;&#62; a[0..0] =&#62; ["a"] ส่วน    [...]]]></description> <wfw:commentRss>http://www.together.in.th/ruby-array-with-range-note/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
