<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Digital Thai Valley - Medium]]></title>
        <description><![CDATA[IT Knowledge - Medium]]></description>
        <link>https://medium.com/digital-thai-valley?source=rss----a37d41bd589c---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Digital Thai Valley - Medium</title>
            <link>https://medium.com/digital-thai-valley?source=rss----a37d41bd589c---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 22:43:44 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/digital-thai-valley" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[[CR] Review :: รีวิว EDIFIER Comfo Run]]></title>
            <link>https://medium.com/digital-thai-valley/cr-review-%E0%B8%A3%E0%B8%B5%E0%B8%A7%E0%B8%B4%E0%B8%A7-edifier-comfo-run-853d4c9f6b2c?source=rss----a37d41bd589c---4</link>
            <guid isPermaLink="false">https://medium.com/p/853d4c9f6b2c</guid>
            <category><![CDATA[running]]></category>
            <category><![CDATA[open-ear]]></category>
            <category><![CDATA[gadgets]]></category>
            <dc:creator><![CDATA[Tossaphol Chin]]></dc:creator>
            <pubDate>Wed, 15 Oct 2025 14:00:04 GMT</pubDate>
            <atom:updated>2025-10-15T13:59:59.111Z</atom:updated>
            <content:encoded><![CDATA[<p>หูฟัง Open Ear Wireless Sports Headphones ยี่ห้อ EDIFIER รุ่น Comfo Run เป็นรุ่นที่ผมอยากจะแนะนำและบอกต่อที่สุดเลย ว่ามันใช้ดีมากๆ ด้วยราคาและคุณสมบัติของมันคือ ตอบโจทย์ผมทุกอย่าง</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wG-Rd62kwDUI-y9cJBRIeQ.jpeg" /></figure><h3>หูฟังสำหรับสายสปอร์ตและทำงานอย่างแท้จริง</h3><p>นี่คือหูฟังที่ใส่แล้ว หูไม่หนวก</p><p>หูฟังในรูปแบบอื่นๆที่ <strong>“ใส่เข้าไปในหู”</strong> หรือ <strong>“ครอบหู</strong>” มันจะทำให้เราสูญเสียประสาทการรับรู้ไปอย่างนึงครับ นั่นก็คือการได้ยินและรับรู้ถึงสภาพแวดล้อมภายนอก ทำให้เราเหมือนเป็นคนพิการหูหนวกไปช่วงขณะหนึ่งในขณะที่ใช้งานหูฟังอยู่</p><p>แต่หูฟังรุ่นนี้ ที่ผมจะแนะนำ มันไม่ทำให้เราหูหนวกครับ</p><p><strong>ในขณะที่เราวิ่ง </strong>เรายังได้ยินและรับรู้ถึง รถที่วิ่งสวนไปสวนมา จักรยานที่ขับมาด้านหลัง และเรายังได้เสียงเพลงอยู่เหมือนเดิมด้วย คือ <strong>ปลอดภัยมาก</strong></p><p><strong>ในขณะที่เราทำงาน</strong> เพื่อนร่วมงานเรียกตั้งนาน ไม่ได้ยิน ไม่ได้หันไปคุยเพราะไม่ได้ยิน ผมว่ามันเสียบุคลิกภาพครับ ไม่ว่าจะเพื่อนร่วมงานเรียก หัวหน้าเรียก หรือลูกน้องเรียกก็ตาม หูฟังอันนี้มันเลยตอบโจทย์หลายๆอย่าง</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2ZTLW_pl3yXQ3u16p-gyGg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lqWrJZbbZFiaI5PGaRvP3w.jpeg" /></figure><h3>Open Ear</h3><p>อย่างแรกเเลยคือมันได้ใส่เข้าไปในหู มันแค่่มีลำโพงอยู่ข้างๆหู ที่คนรอบข้างไม่ได้ยิน ได้ยินแต่เราเอง</p><h3>Battery อย่างอึด</h3><p>ชาร์จเต็ม 100% ใช้ได้นานถึง 17 ชั่วโมง คือผมใส่ทำงานนี่ 2–3 วันชาร์จทีสบายๆเลย</p><h3>Battery ชาร์จเร็ว</h3><p>คือ เพียงแค่เสียบชาร์จเพียง 15 นาทีคือ ใช้ได้ 5 ชั่วโมง</p><h3>กันน้ำ</h3><p>หูฟังตัวนี้กันน้ำ IP55 คือ กันน้ำ กันฝุ่น กันละอองน้ำ กันเหงื่อได้ (แต่จุ่มน้ำไม่ได้นะ)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NR8lzfdfePGDgnUu-d_PEw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gwYbkoW2QLAqlGR3Ya0y6g.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O7mX9hkVHKwqoVekYtXFDw.jpeg" /></figure><h3>ข้อเสีย</h3><p>ก็ใช้ว่าจะไม่มีข้อเสียเลย</p><h3>สายชาร์จ</h3><p>เป็นแบบเฉพาะเจาะจง คือถ้าหายมา หรือลืมหยิบไปคือ หายากมาก (ยังไม่ใช่แบบ Type-C)</p><h3>เสียงรบกวนเยอะ</h3><p>หมายถึง อาจจะไม่เหมาะกับคนที่ต้องการความสงบ เพราะเสียงรบกวนจากรอบๆข้าง เรายังได้ยินทุกอย่าง (ไม่มี noise cancelling)</p><h3>Pair กับอุปกรณ์ได้เครื่องเดียว</h3><p>ไม่สามารถ pair พร้้อมๆกันหลายๆเครื่องได้</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AOAyG1X9uHCRNgMQ1uCHIw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Xv1KTyyLORQz-etL-f31HQ.jpeg" /></figure><h3>วิธีการใช้งาน</h3><p>เจ้า EDIFIER Comfo RUN จะมีปุ่มเพียง 3 เท่านั้น คือ (+) (-) และ [เปิดปิด]</p><p>[เปิดปิด](ตรงกลาง) — กดค้างไว้ จะเป็นการเปิดปิดเครื่อง หากกดครั้งเดียวขณะเปิดเพลงคือการหยุด/เล่นเพลง หรือรับโทรศัพท์</p><p>หากกดค้างไว้จากการปิดเครื่องจนเครื่องเปิดไปแล้ว แต่ยังไม่ปล่อย จะเป็นการสั่งให้ Pair กับอุปกรณ์ชิ้นใหม่</p><p>(+) = กดแล้วปล่อยครั้งเดียวจะเป็นการเพิ่มเสียง (กดรัวๆได้) แต่หากกดค้างจะเป็นการเล่นเพลงถัดไป</p><p>(-) = กดแล้วปล่อยครั้งเดียวจะเป็นการลดเสียง (กดรัวๆได้) แต่หากกดค้างจะเป็นการเล่นเพลงก่อนหน้า หรือเล่นเพลงเดิมซ้ำอีกครัง</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_6exKYLY7g4eztXhNTJVFg.jpeg" /></figure><p>โดยส่วนตัวผมซื้อซ้ำ อันนี้เป็นอันที่ 2 แล้ว อันแรกใช้มา 2 ปีทนมาก ที่ซื้ออันนี้ไม่ได้พังนะ พอดีหายในบ้านนี่แหละ หาไม่เจอ T_T ซื้อใหม่เลยขาดไม่ได้ ใช้ดีทั้งทำงานและออกกำลังกาย</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=853d4c9f6b2c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/digital-thai-valley/cr-review-%E0%B8%A3%E0%B8%B5%E0%B8%A7%E0%B8%B4%E0%B8%A7-edifier-comfo-run-853d4c9f6b2c">[CR] Review :: รีวิว EDIFIER Comfo Run</a> was originally published in <a href="https://medium.com/digital-thai-valley">Digital Thai Valley</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[IP Camera] เลือกซื้อ IP Camera กล้องวงจรปิดรุ่นไหนดี ฉบับปี 2025]]></title>
            <link>https://medium.com/digital-thai-valley/ip-camera-%E0%B9%80%E0%B8%A5%E0%B8%B7%E0%B8%AD%E0%B8%81%E0%B8%8B%E0%B8%B7%E0%B9%89%E0%B8%AD-ip-camera-%E0%B8%81%E0%B8%A5%E0%B9%89%E0%B8%AD%E0%B8%87%E0%B8%A7%E0%B8%87%E0%B8%88%E0%B8%A3%E0%B8%9B%E0%B8%B4%E0%B8%94%E0%B8%A3%E0%B8%B8%E0%B9%88%E0%B8%99%E0%B9%84%E0%B8%AB%E0%B8%99%E0%B8%94%E0%B8%B5-%E0%B8%89%E0%B8%9A%E0%B8%B1%E0%B8%9A%E0%B8%9B%E0%B8%B5-2025-304e3fb31bf3?source=rss----a37d41bd589c---4</link>
            <guid isPermaLink="false">https://medium.com/p/304e3fb31bf3</guid>
            <category><![CDATA[ip-camera]]></category>
            <category><![CDATA[fnkvision]]></category>
            <category><![CDATA[กล้องวงจรปิด]]></category>
            <category><![CDATA[yoosee]]></category>
            <dc:creator><![CDATA[Tossaphol Chin]]></dc:creator>
            <pubDate>Thu, 10 Jul 2025 08:08:12 GMT</pubDate>
            <atom:updated>2025-07-10T08:08:12.594Z</atom:updated>
            <content:encoded><![CDATA[<p>ผมอาจจะเคยเขียนเชียร์ กล้องวงจรปิดที่ใช้ App YCC365 Plus เพราะตอนนั้นมันสามารถ Access กล้องผ่านเว็บได้สะดวกดี แต่ App YCC365 Plus เองนั้นช้ามาก และมีโฆษณาเยอะมากๆในตอนนี้ ผมจึงไม่แนะนำอีกต่อไป</p><p>ในปีนี้ผมย้ายมาเชียร์กล้องวงจรปิดที่ใช้ App Yoosee แทน โดยส่วนตัวผมว่ามันดีมากๆ ทั้งเร็วและไม่มีโฆษณาด้วย มีโปรแกรมเปิดดูใน Desktop Window ได้อีกด้วย อันนี้เป็นเว็บไซต์ Official ของ App <a href="https://yooseeapp.org/">https://yooseeapp.org/</a> นะครับ</p><h4>Yoosee with Multi View</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r0P-JYDopyxd-PuuXhBjfg.jpeg" /><figcaption>Multi View ในส่วนของ App Yoosee</figcaption></figure><p>ส่วน App Yoosee ในมือถือยังสามารถดูหลายกล้องพร้อมกันได้ในทีเดียวอีกด้วย (Multi View) ในมือถือจะเลือกได้ ภ จอ</p><p>หรือจะเปิดคอมเป็น Program.exe ใน Computer Window ก็ดีเหมือนกัน</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1Qa5IDvEzLuBiBvGMou-Zw.png" /><figcaption>Multi View ในส่วนของ Window.exe ที่เปิดใน Computer</figcaption></figure><p>ที่สุดยอดไปกว่านั้นคือกล้องแต่ละอันอยู่คนละที่กันหมดเลยด้วย กรุงเทพ, สมุทรปราการ, ลำปาง และสามารถดูได้พร้อมๆกัน</p><p><a href="https://yooseeapp.org/yoosee-for-pc/">https://yooseeapp.org/yoosee-for-pc/</a> อันนี้เป็นส่วนของ Program for PC นะครับ สามารถไป Download มาใช้งานได่เลยครับ</p><h4>การเลือกกล้องมาใช้งาน</h4><p>ส่วนใครที่กำลังมองหาหากล้องมาใช้งาน ผมขอแบ่งออกเป็นลักษณะตามการใช้งานดงนี้นะครับ</p><ol><li>Indoor — ใข้งานภายในบ้าน ภายในอาคาร</li><li>Outdoor — ใช้งานนอกบ้าน ตามสถานที่นอกอาคาร</li></ol><p>ที่ต้องแบ่งเป็น 2 แบบ แบบนี้ เพราะว่าเป็นเรื่องของความทนทาน และวัสดุในการผลิตกล้องออกมาคนละคุณภาพครับ</p><p>โดยส่วนตัวที่ผมใช้อยู่จะเลือกเป็นตัวนี้ครับ FNKVision เพราะว่าได้กล้องมา 2 จอ ในกล้องตัวเดียวด้วย เป็นอะไรที่คุ้มค่ามากครับ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/1*JNI5CElXL2lrz_GnufZnwA.png" /></figure><p>โดยผมแนะนำให้ซื้อผ่าน Shopee ที่ LINK นี้ได้เลยครับ <a href="https://s.shopee.co.th/8fHG20uOM7">https://s.shopee.co.th/8fHG20uOM7</a> สำหรับ Indoor ข้อดีของเจ้าตัวนี้คือ</p><ul><li>กล้องตัวล่างที่หมุนไม่ได้เป็น เลนส์ Wide ซึ่งมุมมองจะมองได้กว้างมากครับ ถึงแม้ห้องจะแคบก็ยังดูโล่ง ตัวนี้ไว้ดูภาพรวมของสภานที่</li><li>กล้องตัวบนจะหมุนได้ 355 องศา เกือบรอบทิศเลย ตัวนี้ไว้ดูจุดที่เราสนใจเป็นพิเศษครับ</li><li>กล้องทั้ง 2 ตัวมีอินฟาเหรดสำหรับดูในตอนกลางคืน จะเปิดเองเมื่อแสงน้อยครับ</li><li>กล้องมีไฟ Spotlight เปิด-ปิดได้</li><li>มีระบบ เสียงไซเรนขับไล่ผู้บุกรุก</li><li>มีระบบตรวจจับมนุษย์ และแจ้งเตือนเมื่อมีการเคลื่อนไหวได้</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/712/1*9J9I1RyMfhMXNc04vnFujw.jpeg" /></figure><p>สำหรับ Outdoor ผมแนะนำตัวนี้เลยครับ <a href="https://s.shopee.co.th/50NxfOwO7g">https://s.shopee.co.th/50NxfOwO7g</a></p><p>ปกติของกล้องจะหมุนได้แค่กล้องเดียวแต่ตัวนี้มีความพิเศษ ที่สามารถหมุนกล้องได้ทั้ง 2 กล้องเลยและหมุนได้รอบเลยครับ (น่าจะเป็นนตัวเดียวในท้องตลาดตอนนี้เลย)</p><p>ส่วนเรื่องการบันทึกภาพและบันทึกย้อนหลังขึ้นอยู่กับขนาดของ Memory Card เลยครับ หรือใครจะเก็บบันทึกไว้บน Cloud ก็ได้ครับทาง App Yoosee เขามีบริการ built in ตรงนี้มาให้ด้วย</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=304e3fb31bf3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/digital-thai-valley/ip-camera-%E0%B9%80%E0%B8%A5%E0%B8%B7%E0%B8%AD%E0%B8%81%E0%B8%8B%E0%B8%B7%E0%B9%89%E0%B8%AD-ip-camera-%E0%B8%81%E0%B8%A5%E0%B9%89%E0%B8%AD%E0%B8%87%E0%B8%A7%E0%B8%87%E0%B8%88%E0%B8%A3%E0%B8%9B%E0%B8%B4%E0%B8%94%E0%B8%A3%E0%B8%B8%E0%B9%88%E0%B8%99%E0%B9%84%E0%B8%AB%E0%B8%99%E0%B8%94%E0%B8%B5-%E0%B8%89%E0%B8%9A%E0%B8%B1%E0%B8%9A%E0%B8%9B%E0%B8%B5-2025-304e3fb31bf3">[IP Camera] เลือกซื้อ IP Camera กล้องวงจรปิดรุ่นไหนดี ฉบับปี 2025</a> was originally published in <a href="https://medium.com/digital-thai-valley">Digital Thai Valley</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[MongoDB][Mongoose] อัพเกรด 8.5.x เป็น 8.9.x มีเรื่องอะไรควรต้องระวังบ้าง]]></title>
            <link>https://medium.com/digital-thai-valley/mongodb-mongoose-%E0%B8%AD%E0%B8%B1%E0%B8%9E%E0%B9%80%E0%B8%81%E0%B8%A3%E0%B8%94-8-5-x-%E0%B9%80%E0%B8%9B%E0%B9%87%E0%B8%99-8-9-x-%E0%B8%A1%E0%B8%B5%E0%B9%80%E0%B8%A3%E0%B8%B7%E0%B9%88%E0%B8%AD%E0%B8%87%E0%B8%AD%E0%B8%B0%E0%B9%84%E0%B8%A3%E0%B8%84%E0%B8%A7%E0%B8%A3%E0%B8%95%E0%B9%89%E0%B8%AD%E0%B8%87%E0%B8%A3%E0%B8%B0%E0%B8%A7%E0%B8%B1%E0%B8%87%E0%B8%9A%E0%B9%89%E0%B8%B2%E0%B8%87-ba11b7e4947c?source=rss----a37d41bd589c---4</link>
            <guid isPermaLink="false">https://medium.com/p/ba11b7e4947c</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[mongoose]]></category>
            <category><![CDATA[mongodb]]></category>
            <category><![CDATA[vulnerability]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Tossaphol Chin]]></dc:creator>
            <pubDate>Thu, 08 May 2025 15:33:20 GMT</pubDate>
            <atom:updated>2025-05-08T15:33:20.706Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D_cBmlyHR52oepLiEoNUPw.png" /></figure><p>การปรับปรุงอัพเดท Library ให้เป็น version ใหม่อยู่เสมอเป็นส่วนนึงด้านตวามปลอดภัยของ Application นี่ก็เป็นเหตุการณ์สำคัญเหมือนกันเมื่อต้องอัพเกรด Library Mongoose จาก 8.5.x เป็น 8.9.x เพราะปัญหาด้านความปลอดภัย</p><h3>ช่องโหว่ที่สำคัญใน Mongoose 8.5.x</h3><ul><li><strong>CVE-2024–53900</strong>: ช่องโหว่นี้เกิดจากการที่ Mongoose อนุญาตให้ใช้ตัวดำเนินการ $where ภายใน match ของ populate() ซึ่งสามารถนำไปสู่การฉีดโค้ด JavaScript ที่เป็นอันตรายได้</li><li><strong>CVE-2025–23061</strong>: แม้ว่าจะมีการแก้ไขช่องโหว่ก่อนหน้านี้ในรุ่น 8.8.3 แต่พบว่ายังสามารถใช้ $where ภายใน $or ของ populate() ได้อยู่ ซึ่งยังคงเป็นช่องทางให้ผู้โจมตีสามารถฉีดโค้ดที่เป็นอันตรายได้</li></ul><h4>แต่จะเป็นอย่างไรถ้าการอัพเกรด Library ในครั้งนี้ทำให้ Application ทำงานผิดไป</h4><p>ก่อนจะอัพเกรด Library มาดูกันครับว่า function หลักๆที่ใช้กันประจำมีอะไรที่หายไปบ้าง</p><h3>.count() หายไป</h3><p>function .count() ถูก deprecate มานานแล้ว ควรเปลี่ยนไปใช้ .countDocuments() หรือ .estimatedDocumentCount()</p><h3>การยกเลิก rawResult และการแนะนำ includeResultMetadata</h3><p>ใน Mongoose เวอร์ชัน 8.5.3 และ 8.9.5 มีการเปลี่ยนแปลงในโครงสร้างของ response ที่ส่งกลับจากการดำเนินการต่าง ๆ</p><p>Mongoose 8.5.3</p><pre>{<br>  &quot;ok&quot;: 1,<br>  &quot;n&quot;: 1,<br>  &quot;nModified&quot;: 1,<br>  &quot;lastErrorObject&quot;: {<br>    &quot;updatedExisting&quot;: true<br>  },<br>  &quot;connectionId&quot;: 1<br>}</pre><ul><li>ok: บ่งบอกว่าการดำเนินการสำเร็จ (1 = สำเร็จ, 0 = ล้มเหลว)</li><li>n: จำนวนเอกสารที่ตรงตามเงื่อนไข</li><li>nModified: จำนวนเอกสารที่ถูกแก้ไข</li><li>lastErrorObject: ข้อมูลเกี่ยวกับข้อผิดพลาดล่าสุด (ถ้ามี) และสถานะของการอัปเดต</li><li>connectionId: ID ของการเชื่อมต่อที่ใช้ในการดำเนินการ</li></ul><p>Mongoose 8.9.5</p><pre>{<br>  &quot;acknowledged&quot;: true,<br>  &quot;modifiedCount&quot;: 1,<br>  &quot;matchedCount&quot;: 1,<br>  &quot;upsertedId&quot;: null,<br>  &quot;upsertedCount&quot;: 0<br>}</pre><ul><li>acknowledged: บ่งบอกว่าการดำเนินการได้รับการยืนยันแล้ว</li><li>modifiedCount: จำนวนเอกสารที่ถูกแก้ไข</li><li>matchedCount: จำนวนเอกสารที่ตรงตามเงื่อนไข</li><li>upsertedId: ID ของเอกสารใหม่ที่ถูกสร้างขึ้น (ถ้ามี)</li><li>upsertedCount: จำนวนเอกสารใหม่ที่ถูกสร้างขึ้น</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7vHqhieJ8n8gWfiRWI0aQg.png" /></figure><p>ผมเข้าใจว่าสมัยเป็น 8.5.x น่าจะเขียนโค๊ดเช็คแบบด้านล่างกันเยอะเลย</p><pre>if (res.ok == 1) {<br>  // Anything<br><br>} else {<br>  return res.status(500)<br>}</pre><p>ใช้ไม่ได้แล้วครับ โปรแกรมจะ return error 500 ตลอดเวลาเลย</p><p>จะต้องแก้ไข program ประมาณนี้ครับ</p><pre>if (res.acknowledged) {<br>  // Anything<br><br>} else {<br>  return res.status(500)<br>}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ba11b7e4947c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/digital-thai-valley/mongodb-mongoose-%E0%B8%AD%E0%B8%B1%E0%B8%9E%E0%B9%80%E0%B8%81%E0%B8%A3%E0%B8%94-8-5-x-%E0%B9%80%E0%B8%9B%E0%B9%87%E0%B8%99-8-9-x-%E0%B8%A1%E0%B8%B5%E0%B9%80%E0%B8%A3%E0%B8%B7%E0%B9%88%E0%B8%AD%E0%B8%87%E0%B8%AD%E0%B8%B0%E0%B9%84%E0%B8%A3%E0%B8%84%E0%B8%A7%E0%B8%A3%E0%B8%95%E0%B9%89%E0%B8%AD%E0%B8%87%E0%B8%A3%E0%B8%B0%E0%B8%A7%E0%B8%B1%E0%B8%87%E0%B8%9A%E0%B9%89%E0%B8%B2%E0%B8%87-ba11b7e4947c">[MongoDB][Mongoose] อัพเกรด 8.5.x เป็น 8.9.x มีเรื่องอะไรควรต้องระวังบ้าง</a> was originally published in <a href="https://medium.com/digital-thai-valley">Digital Thai Valley</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[MongoDB][Mongoose] deleteMany() — ฟังก์ชั่นที่รอวันระเบิด ตู้มมม!!! (หากจัดการไม่ดี)]]></title>
            <link>https://medium.com/digital-thai-valley/mongodb-mongoose-deletemany-%E0%B8%9F%E0%B8%B1%E0%B8%87%E0%B8%81%E0%B9%8C%E0%B8%8A%E0%B8%B1%E0%B9%88%E0%B8%99%E0%B8%97%E0%B8%B5%E0%B9%88%E0%B8%A3%E0%B8%AD%E0%B8%A7%E0%B8%B1%E0%B8%99%E0%B8%A3%E0%B8%B0%E0%B9%80%E0%B8%9A%E0%B8%B4%E0%B8%94-%E0%B8%95%E0%B8%B9%E0%B9%89%E0%B8%A1%E0%B8%A1%E0%B8%A1-%E0%B8%AB%E0%B8%B2%E0%B8%81%E0%B8%88%E0%B8%B1%E0%B8%94%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B9%84%E0%B8%A1%E0%B9%88%E0%B8%94%E0%B8%B5-4a50a4f0fa58?source=rss----a37d41bd589c---4</link>
            <guid isPermaLink="false">https://medium.com/p/4a50a4f0fa58</guid>
            <category><![CDATA[deletemany]]></category>
            <category><![CDATA[mongoose]]></category>
            <category><![CDATA[mongodb]]></category>
            <category><![CDATA[cpu-performance]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Tossaphol Chin]]></dc:creator>
            <pubDate>Thu, 08 May 2025 08:06:35 GMT</pubDate>
            <atom:updated>2025-05-08T08:06:35.128Z</atom:updated>
            <content:encoded><![CDATA[<h3>[MongoDB][Mongoose] deleteMany() — ฟังก์ชั่นที่รอวันระเบิด ตู้มมม!!! (หากจัดการไม่ดี)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FPMSuy9dM5s7wC7Pv8dn-A.png" /></figure><p>เพื่อนๆที่เคยใข้งาน MongoDB ไม่รู้ว่าเคยใช้งาน function นี้กันบ้างไหม deleteMany() ซึ่งเป็น function ในการลบ documents หลายๆ document ใน database ด้วยคำสั่งเดียว ซึ่งมันก็สะดวกดีเหมือนกัน</p><h3><strong>ตัวอย่าง Syntax</strong></h3><pre>db.collection.deleteMany({ field: value })</pre><p>การทำงานของ deleteMany() จะลบทุก document ที่เงื่อนไขตรงกับ filter / หากไม่มี document ใดๆตรงกับ filter ก็จะไม่เกิด error แต่จะไม่มีการลบ</p><p>ข้อดี (Pros)</p><ul><li>สามารถลบได้หลายๆรายการในคำสั่งเดียว ซึ่งหมายถึง เปิด Connection เพื่อเชื่อมต่อกับ database ด้วยเพียง session เดียว ก็จะสามารถลบ document ต่างๆ ตามที่ต้องการได้</li><li>ลดภาระการทำงานของเครื่อง client และ server เมื่อเทียบกับการลบแบบวน loop ทีละ document</li><li>ใช้งานง่าย — ใช้ syntax คล้ายกับ find() เลย</li><li>ใช้เงื่อนไขที่ซับซ้อนได้</li></ul><p>ข้อเสีย (Cons)</p><ul><li>ไม่มีการยืนยันเป็นรายการๆ ว่าลบ document ไหนไปบ้าง</li><li>เสี่ยงลบผิด ถ้าใส่เงื่อนไขที่ไม่ครอบคลุมพอ</li><li>อาจจะกระทบ Performance ถ้า collection ใหญ่ และไม่มี index</li></ul><h3>เหตการณ์ที่เกิดขึ้น</h3><p>เรื่อง ของเรื่องที่ผมเจอมาก็คือเจ้า deleteMany() มันอยู่มาก่อนตั้งนานแล้ว และสมัยนั้น document ของข้อมูลมันไม่ได้ใหญ่ขนาดนี้ (เดาๆน่าจะ 1- 5 ล้าน documents) แล้วภายใน 1 นาที มีการเรียกเจ้า deleteMany() นี้เกิน 20 ครั้งต่อนาที</p><p>แล้วเจ้าคำสั่งนี้สิ่งที่มันทำคือ วิ่งรอบ Database ทั้งหมด 1 รอบ(ทั้งที่ condition ที่ส่งมาอาจจะไม่ match กันเลยก็ได้) มันไม่เหมาะหากมันถูกเรียกใช้งานบ่อยๆ ในระยะเวลาอันสั้น จะทำให้เกิด Overhead เยอะ และ CPU เต็มได้เลยครับ</p><h3>แนวทางการแก้ไข</h3><p>ผมใช้วิธีการ find() หาก่อนถ้าไม่เจอเอกสารก็ไม่ต้องทำอะไร(ไม่ต้องลบ)<br>แต่ถ้าเจอเอกสาร กี่อันก็แล้วแต่ ก็วน loop ลบด้วย index ไปเลยเร็วกว่า</p><p>ข้อเสียคือ มีการเปิด Connection ค่อนข้างเยอะหากเจอเอกสารนั้นๆหลายอัน</p><p>แต่ CPU ที่ Peak ก็ลดลงมาได้ยังไม่พุ่งสูงขึ้นไปใหม่แล้วครับ</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4a50a4f0fa58" width="1" height="1" alt=""><hr><p><a href="https://medium.com/digital-thai-valley/mongodb-mongoose-deletemany-%E0%B8%9F%E0%B8%B1%E0%B8%87%E0%B8%81%E0%B9%8C%E0%B8%8A%E0%B8%B1%E0%B9%88%E0%B8%99%E0%B8%97%E0%B8%B5%E0%B9%88%E0%B8%A3%E0%B8%AD%E0%B8%A7%E0%B8%B1%E0%B8%99%E0%B8%A3%E0%B8%B0%E0%B9%80%E0%B8%9A%E0%B8%B4%E0%B8%94-%E0%B8%95%E0%B8%B9%E0%B9%89%E0%B8%A1%E0%B8%A1%E0%B8%A1-%E0%B8%AB%E0%B8%B2%E0%B8%81%E0%B8%88%E0%B8%B1%E0%B8%94%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B9%84%E0%B8%A1%E0%B9%88%E0%B8%94%E0%B8%B5-4a50a4f0fa58">[MongoDB][Mongoose] deleteMany() — ฟังก์ชั่นที่รอวันระเบิด ตู้มมม!!! (หากจัดการไม่ดี)</a> was originally published in <a href="https://medium.com/digital-thai-valley">Digital Thai Valley</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[Windows][Upgrade] เช็ค RAM ว่าเป็น DDR3 หรือ DDR3L โดยไม่ต้องแกะคอมดู]]></title>
            <link>https://medium.com/digital-thai-valley/windows-upgrade-%E0%B9%80%E0%B8%8A%E0%B9%87%E0%B8%84-ram-%E0%B8%A7%E0%B9%88%E0%B8%B2%E0%B9%80%E0%B8%9B%E0%B9%87%E0%B8%99-ddr3-%E0%B8%AB%E0%B8%A3%E0%B8%B7%E0%B8%AD-ddr3l-%E0%B9%82%E0%B8%94%E0%B8%A2%E0%B9%84%E0%B8%A1%E0%B9%88%E0%B8%95%E0%B9%89%E0%B8%AD%E0%B8%87%E0%B9%81%E0%B8%81%E0%B8%B0%E0%B8%84%E0%B8%AD%E0%B8%A1%E0%B8%94%E0%B8%B9-57c86a0a1e79?source=rss----a37d41bd589c---4</link>
            <guid isPermaLink="false">https://medium.com/p/57c86a0a1e79</guid>
            <category><![CDATA[ddr3-ram]]></category>
            <category><![CDATA[memory-management]]></category>
            <category><![CDATA[computer-upgrade]]></category>
            <category><![CDATA[rams]]></category>
            <dc:creator><![CDATA[Tossaphol Chin]]></dc:creator>
            <pubDate>Thu, 24 Apr 2025 02:33:56 GMT</pubDate>
            <atom:updated>2025-04-24T02:33:56.596Z</atom:updated>
            <content:encoded><![CDATA[<p>สำหรับใครที่กำลังจะอัพเกรดคอมพิวเตอร์ ไม่อยากซื้ออุปกรณ์มาผิด แต่ก็ยังไม่อยากแกะเครื่องคอมพิวเตอร์ดู สามารถเช็คได้โดยวิธีนี้เลยครับ</p><ol><li>ในช่องค้นหาพิมพ์คำว่า “PowerShell” แล้วเลือก “Windows PowerShell” เปิดมันขึ้นมาได้เลย</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/771/1*PBaHD5i1XDIoGdcpFAKGgg.png" /><figcaption>ค้นหา Powershell</figcaption></figure><p>2. พิมพ์ Command นี้ใส่ไปได้เลยครับ</p><pre>Get-WmiObject Win32_PhysicalMemory | Format-Table Manufacturer, PartNumber, ConfiguredVoltage, DeviceLocator, Speed, Capacity</pre><p>ก็จะแสดงผลดังภาพด้านล่าง</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lpfbzd9ZW8ZLAE58Nx296A.png" /></figure><p>ผลลัพธ์ที่เห็นจะแสดงดังต่อไปนี้</p><ul><li><strong>Manufacturer</strong>: ผู้ผลิต RAM เช่น Kingston, Samsung</li><li><strong>PartNumber</strong>: รหัสรุ่นของ RAM</li><li><strong>ConfiguredVoltage</strong>: ค่าแรงดัน</li></ul><blockquote>(13500 = 1.35V → DDR3L, 15000 = 1.5V → DDR3)</blockquote><ul><li><strong>DeviceLocator</strong>: ช่องที่ RAM เสียบอยู่ (เช่น DIMM0, DIMM1)</li><li><strong>Speed</strong>: ความเร็ว เช่น 1600, 1333 MHz</li><li><strong>Capacity</strong>: ขนาด RAM (แสดงเป็น Byte)</li></ul><blockquote>ในที่นี้คือ 4GB มีด้วยกัน 2 ตัว รวมเป็น 8GB</blockquote><blockquote>จากข้อมูลตัวอย่างของผม คือ ผมต้องไปซื้อ RAM DDR3L 1600 แล้วก็เลือกขนาดตามกำลังได้เลยครับ ผมจัด 8G 2 ตัว รวมเป็น 16G</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=57c86a0a1e79" width="1" height="1" alt=""><hr><p><a href="https://medium.com/digital-thai-valley/windows-upgrade-%E0%B9%80%E0%B8%8A%E0%B9%87%E0%B8%84-ram-%E0%B8%A7%E0%B9%88%E0%B8%B2%E0%B9%80%E0%B8%9B%E0%B9%87%E0%B8%99-ddr3-%E0%B8%AB%E0%B8%A3%E0%B8%B7%E0%B8%AD-ddr3l-%E0%B9%82%E0%B8%94%E0%B8%A2%E0%B9%84%E0%B8%A1%E0%B9%88%E0%B8%95%E0%B9%89%E0%B8%AD%E0%B8%87%E0%B9%81%E0%B8%81%E0%B8%B0%E0%B8%84%E0%B8%AD%E0%B8%A1%E0%B8%94%E0%B8%B9-57c86a0a1e79">[Windows][Upgrade] เช็ค RAM ว่าเป็น DDR3 หรือ DDR3L โดยไม่ต้องแกะคอมดู</a> was originally published in <a href="https://medium.com/digital-thai-valley">Digital Thai Valley</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[NodeJs][Kotlin] findOne() ใน NodeJs และ Kotlin การใช้งานและผลลัพธ์ไม่เหมือนกัน]]></title>
            <link>https://medium.com/digital-thai-valley/nodejs-kotlin-findone-%E0%B9%83%E0%B8%99-nodejs-%E0%B9%81%E0%B8%A5%E0%B8%B0-kotlin-%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B9%83%E0%B8%8A%E0%B9%89%E0%B8%87%E0%B8%B2%E0%B8%99%E0%B9%81%E0%B8%A5%E0%B8%B0%E0%B8%9C%E0%B8%A5%E0%B8%A5%E0%B8%B1%E0%B8%9E%E0%B8%98%E0%B9%8C%E0%B9%84%E0%B8%A1%E0%B9%88%E0%B9%80%E0%B8%AB%E0%B8%A1%E0%B8%B7%E0%B8%AD%E0%B8%99%E0%B8%81%E0%B8%B1%E0%B8%99-f3ea049f40ee?source=rss----a37d41bd589c---4</link>
            <guid isPermaLink="false">https://medium.com/p/f3ea049f40ee</guid>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[kotli]]></category>
            <category><![CDATA[mongo-repository]]></category>
            <category><![CDATA[mongoose]]></category>
            <category><![CDATA[mongodb]]></category>
            <dc:creator><![CDATA[Tossaphol Chin]]></dc:creator>
            <pubDate>Wed, 22 Jan 2025 04:48:12 GMT</pubDate>
            <atom:updated>2025-01-22T04:48:12.322Z</atom:updated>
            <content:encoded><![CDATA[<p>findOne ใน MongoDB ของ Node.js และ findOne ใน MongoRepository ของ Spring Data MongoDB มีหลักการทำงานที่คล้ายกัน แต่มีความแตกต่างในวิธีการใช้งานและการตั้งค่า เนื่องจากอยู่ในสองแพลตฟอร์มที่แตกต่างกัน (Java กับ JavaScript) ด้านล่างนี้คือรายละเอียดที่เปรียบเทียบระหว่างทั้งสอง:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/784/1*oXyfdXI0utKU7n3_Cm3Z5Q.png" /></figure><h3>1. findOne ใน Node.js</h3><p>ใน Node.js เราจะใช้ MongoDB Driver หรือ ODM อย่างเช่น Mongoose เพื่อทำการค้นหาในฐานข้อมูล ตัวอย่างการใช้งาน findOne ใน Mongoose มีลักษณะดังนี้:</p><pre>const mongoose = require(&#39;mongoose&#39;);<br><br>const transactionSchema = new mongoose.Schema({<br>  accountNo: String,<br>  createdAt: Date,<br>  // ฟิลด์อื่น ๆ<br>});<br><br>const Transaction = mongoose.model(&#39;Transaction&#39;, transactionSchema);<br><br>// ดึงข้อมูล transaction ล่าสุดโดยใช้ accountNo<br>Transaction.findOne({ accountNo: &#39;12345&#39; }, (err, transaction) =&gt; {<br>  if (err) {<br>    console.error(err);<br>  } else {<br>    console.log(transaction);<br>  }<br>});</pre><h3>2. findOne ใน MongoRepository (Spring Data)</h3><p>ใน Spring Data MongoDB การใช้ findOne จะถูกสร้างขึ้นจากการตั้งชื่อฟังก์ชันใน repository interface ตัวอย่างการใช้งาน findOne (หรือ findOneBy...) ใน Spring Data MongoDB มีลักษณะดังนี้:</p><pre>public interface TransactionRepository extends MongoRepository&lt;Transaction, String&gt; {<br>    Transaction findOneByPolicyNo(String policyNo);<br>}<br><br>// เรียกใช้ใน service<br>Transaction transaction = transactionRepository.findOneByAccountNo(&quot;12345&quot;);</pre><h3>ความแตกต่างหลัก ๆ</h3><p><strong>1. ภาษาการเขียน:</strong></p><ul><li>Node.js ใช้ JavaScript/TypeScript</li><li>Spring Data ใช้ Java</li></ul><p><strong>2. การใช้งานและการตั้งชื่อ:</strong></p><ul><li>ใน Node.js เราจะต้องจัดการกับ callback หรือ Promise เพื่อจัดการผลลัพธ์</li><li>ใน Spring Data เราสามารถใช้การตั้งชื่อฟังก์ชันเพื่อสร้างคำสั่งค้นหาโดยอัตโนมัติ</li></ul><p><strong>3. การจัดการข้อผิดพลาด:</strong></p><ul><li>ใน Node.js เราต้องจัดการข้อผิดพลาดใน callback หรือ Promise</li><li>ใน Spring Data Java จะโยนข้อผิดพลาดในกรณีที่มีปัญหาในการค้นหา</li></ul><p><strong>4. การส่งคืนผลลัพธ์:</strong></p><ul><li>ใน Node.js, ถ้ามีเอกสารหลายรายการที่ตรงตามเงื่อนไข <strong>จะส่งคืนเอกสารแรกที่พบ</strong></li><li>ใน Spring Data, findOneBy จะต้องการให้มีเอกสารที่ตรงตามเงื่อนไขเพียงหนึ่งเดียว <strong>หากมีมากกว่านั้นจะทำให้เกิดข้อผิดพลาด</strong></li></ul><h3>สรุป</h3><p>ทั้งสองมีหลักการทำงานที่คล้ายกันในการค้นหาเอกสารใน MongoDB แต่มีความแตกต่างในวิธีการใช้งานและการจัดการข้อผิดพลาด ถ้าเราทำงานใน Node.js หรือ Java เราจะต้องคุ้นเคยกับวิธีการที่แต่ละแพลตฟอร์มจัดการกับการค้นหาใน MongoDB</p><blockquote>ที่จะเน้นย้ำ ก็คือถ้ามี Data ที่ accountNo ซ้ำๆกันหลาย Records เจ้า Mongoose จะดึง record ล่าสุดมาให้ แต่ ใน MongoRepository จะไม่สามารถดึงได้และคืนค่า Error “returned non unique result” มาแทน</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f3ea049f40ee" width="1" height="1" alt=""><hr><p><a href="https://medium.com/digital-thai-valley/nodejs-kotlin-findone-%E0%B9%83%E0%B8%99-nodejs-%E0%B9%81%E0%B8%A5%E0%B8%B0-kotlin-%E0%B8%81%E0%B8%B2%E0%B8%A3%E0%B9%83%E0%B8%8A%E0%B9%89%E0%B8%87%E0%B8%B2%E0%B8%99%E0%B9%81%E0%B8%A5%E0%B8%B0%E0%B8%9C%E0%B8%A5%E0%B8%A5%E0%B8%B1%E0%B8%9E%E0%B8%98%E0%B9%8C%E0%B9%84%E0%B8%A1%E0%B9%88%E0%B9%80%E0%B8%AB%E0%B8%A1%E0%B8%B7%E0%B8%AD%E0%B8%99%E0%B8%81%E0%B8%B1%E0%B8%99-f3ea049f40ee">[NodeJs][Kotlin] findOne() ใน NodeJs และ Kotlin การใช้งานและผลลัพธ์ไม่เหมือนกัน</a> was originally published in <a href="https://medium.com/digital-thai-valley">Digital Thai Valley</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[Jenkins] error converting YAML to JSON: yaml: line xx: did not find expected key]]></title>
            <link>https://medium.com/digital-thai-valley/jenkins-error-converting-yaml-to-json-yaml-line-xx-did-not-find-expected-key-af305cf8826e?source=rss----a37d41bd589c---4</link>
            <guid isPermaLink="false">https://medium.com/p/af305cf8826e</guid>
            <category><![CDATA[jenkins]]></category>
            <category><![CDATA[yaml]]></category>
            <category><![CDATA[pipeline]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[json]]></category>
            <dc:creator><![CDATA[Tossaphol Chin]]></dc:creator>
            <pubDate>Tue, 28 May 2024 01:51:54 GMT</pubDate>
            <atom:updated>2024-05-28T02:01:06.086Z</atom:updated>
            <content:encoded><![CDATA[<p>If you found that error on your Jenkins task. After your search on Google someone suggest to check indentation first. However, if you are sure of your code with indentation. Next step second point please check the back of Code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*zmHckOeKfJoxQFBNgYbPtg.png" /></figure><p>In my case I found “,” (comma) in YAML file</p><p>When you use JSON format you will get used to this pattern</p><pre>{<br>  &quot;brand&quot;: &quot;Honda&quot;,<br>  &quot;segmentType&quot;: &quot;C&quot;,<br>  &quot;model&quot;: &quot;HRV&quot;<br>}</pre><p>And I move JSON to YAML</p><pre>incorrectFormat:<br>  brand: &quot;Honda&quot;<br>  segmentType: &quot;C&quot;,<br>  model: &quot;HRV&quot;</pre><p>I forgot to remove that comma(,) in a line.</p><p>When you run tasks on Jenkins you will found the same error with indentation [error converting YAML to JSON: yaml: line xx: did not find expected key]</p><pre>correctformat:<br>  brand: &quot;Honda&quot;<br>  segmentType: &quot;C&quot;<br>  model: &quot;HRV&quot;</pre><p>Thank you for reading my comment.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=af305cf8826e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/digital-thai-valley/jenkins-error-converting-yaml-to-json-yaml-line-xx-did-not-find-expected-key-af305cf8826e">[Jenkins] error converting YAML to JSON: yaml: line xx: did not find expected key</a> was originally published in <a href="https://medium.com/digital-thai-valley">Digital Thai Valley</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[react-native][interim] Could not create task ‘:react-native-ssl-pinning:compileDebugJavaWithJavac’.]]></title>
            <link>https://medium.com/digital-thai-valley/react-native-interim-could-not-create-task-react-native-ssl-pinning-compiledebugjavawithjavac-48600571a6c5?source=rss----a37d41bd589c---4</link>
            <guid isPermaLink="false">https://medium.com/p/48600571a6c5</guid>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[compatibility]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Tossaphol Chin]]></dc:creator>
            <pubDate>Tue, 31 Oct 2023 01:57:37 GMT</pubDate>
            <atom:updated>2023-10-31T01:58:43.844Z</atom:updated>
            <content:encoded><![CDATA[<p>When you run command build android and got error like this</p><h3>Error like this</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g7knCReEwFzOkz7iyg-x5g.png" /></figure><pre>FAILURE: Build failed with an exception.<br><br>* What went wrong:<br>Execution failed for task &#39;:tasks&#39;.<br>&gt; Could not create task &#39;:react-native-ssl-pinning:compileDebugJavaWithJavac&#39;.<br>   &gt; In order to compile Java 9+ source, please set compileSdkVersion to 30 or above</pre><p>I had a interim solution to fixed it. Because this dependency was out of date and no maintenance (<a href="https://github.com/MaxToyberman/react-native-ssl-pinning">https://github.com/MaxToyberman/react-native-ssl-pinning</a>)</p><p>I upgraded react-native to version 0.72 and found this error.</p><h3>How to fixed it by interim</h3><p>Go to /node_modules/react-native-ssl-pinning/android/build.gradle</p><pre><br>buildscript {<br>    repositories {<br>        jcenter()<br>    }<br><br>    dependencies {<br>        classpath &#39;com.android.tools.build:gradle:2.2.0&#39;<br>    }<br>}<br><br>apply plugin: &#39;com.android.library&#39;<br><br>android {<br>    compileSdkVersion 28<br>    buildToolsVersion &quot;28.0.3&quot;<br><br>    defaultConfig {<br>        minSdkVersion 16<br>        targetSdkVersion 28<br>        versionCode 1<br>        versionName &quot;1.0&quot;<br>    }<br>    lintOptions {<br>        abortOnError false<br>    }<br>}</pre><h4>Update 2 things</h4><pre>classpath &#39;com.android.tools.build:gradle:2.2.0&#39;<br><br>to<br><br>classpath &#39;com.android.tools.build:gradle:2.3.0&#39;</pre><p>and</p><pre>compileSdkVersion 28<br>buildToolsVersion &quot;28.0.3&quot;<br><br>to<br><br>compileSdkVersion 33<br>buildToolsVersion &quot;33.0.2&quot;</pre><h4>Latest updated files</h4><pre><br>buildscript {<br>    repositories {<br>        jcenter()<br>    }<br><br>    dependencies {<br>        classpath &#39;com.android.tools.build:gradle:2.3.0&#39;<br>    }<br>}<br><br>apply plugin: &#39;com.android.library&#39;<br><br>android {<br>    compileSdkVersion 33<br>    buildToolsVersion &quot;33.0.2&quot;<br><br>    defaultConfig {<br>        minSdkVersion 16<br>        targetSdkVersion 28<br>        versionCode 1<br>        versionName &quot;1.0&quot;<br>    }<br>    lintOptions {<br>        abortOnError false<br>    }<br>}</pre><p>It solved this issue for me. Please run build it again.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=48600571a6c5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/digital-thai-valley/react-native-interim-could-not-create-task-react-native-ssl-pinning-compiledebugjavawithjavac-48600571a6c5">[react-native][interim] Could not create task ‘:react-native-ssl-pinning:compileDebugJavaWithJavac’.</a> was originally published in <a href="https://medium.com/digital-thai-valley">Digital Thai Valley</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[AWS] Connect API Gateway setting with POSTMAN (AWS Signature version 4)]]></title>
            <link>https://medium.com/digital-thai-valley/aws-connect-api-gateway-setting-with-postman-aws-signature-version-4-44e184e60299?source=rss----a37d41bd589c---4</link>
            <guid isPermaLink="false">https://medium.com/p/44e184e60299</guid>
            <category><![CDATA[postman]]></category>
            <category><![CDATA[authentication]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[api-gateway]]></category>
            <dc:creator><![CDATA[Tossaphol Chin]]></dc:creator>
            <pubDate>Thu, 29 Dec 2022 01:55:42 GMT</pubDate>
            <atom:updated>2022-12-29T01:55:42.727Z</atom:updated>
            <content:encoded><![CDATA[<p>การเขียนโปรแกรมเชื่อมต่อไปที่ API Gateway ของ AWS มีวิธีการ Authen ที่พิเศษกว่าปกตินิดนึงครับ วันนี้ผมจะมาเขียนตัวอย่าง การเชื่อมต่อ โดยใช้ POSTMAN นะครับ</p><p>ค่า Config และ Secret ต่างๆที่จะต้องมี</p><pre><strong>ในส่วนของ Config<br><br>AWS Region</strong> (เราจะต้องรู้ว่า API ที่เราไปเรียกใช้ Deploy อยู่ที่ไหน เช่น &quot;ap-southeast-1&quot;)<br><strong>Service Name</strong> (Service Name ทืีไปเรียกใช้ เช่น &quot;execute-api&quot; )<br><br><strong>ในส่วน ของ Secret</strong><br><br><strong>AccessKey</strong> (จะเป็น String ประมาณ 20 Character ครับ)<br><strong>SecretKey</strong> (จะเป็น String ประมาณ 40 Character ครับ)<br><strong>Session Token</strong> (จะเป็น String ที่ยาวมากครับ อันนี้มีความไม่แน่นอนว่า String จะยาวเท่าไหร่)</pre><p>ซึ่งในส่วนของ Secret มีการใช้ annotation บางอย่างที่เรียกว่า “Key Rotation” ครับ เจ้า “Key Rotation” ตัวนี้จะทำการ Terminate ชุดของ Secret เดิม และสร้างชุดของ Secret ใหม่ขึ้นมา ทุกๆ 1 ชั่วโมง</p><p>หมายความว่าผมจะต้องเปลี่ยนชุดของ Secret ตรงนี้ทุกๆ 1 ชั่วโมงครับ ไม่งั้นจะเชื่อมต่อ API ไม่ได้</p><h3>Setting</h3><p>วิธีการ Setting Postman ให้เชื่อมต่อเข้าไปได้ เริ่มจากไปที่ Tab “Authorization”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kiL2wyRTtQYIb9kFPD4gUA.png" /><figcaption>Authorization Tab</figcaption></figure><p>ตรง Type ให้ค้นลงมาหาอันที่เขียนว่า “AWS Signature” (ปกติที่ผมใช้อยู่บ่อยๆจะเป็น JWT Token ก็จะเลือก เป็น Bearer Token ครับ)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1002/1*WUONqIij4n9-rawjTeQ_VQ.png" /><figcaption>AWS Signature</figcaption></figure><p>ในส่วนของ “Add authorization data to” เลือกเป็น “Request Headers”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*C9nSAptOfIqmjwe-5d_4bA.png" /><figcaption>Request Header</figcaption></figure><p>ใส่ค่า AccessKey และ SecretKey ที่เราเตรียมไว้</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NfWM0VxrK5Tkdn_ZIhKDwQ.png" /><figcaption>AccessKey and SecretKey</figcaption></figure><p>ในส่วนของ Advanced ให้กด explain ออกมา</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*he_bS-RUWphwgzpBYm8q5g.png" /><figcaption>Explain Advanced</figcaption></figure><p>ให้ใส่ค่า AWS Region, Service Name และ Session token ได้เลยครับ</p><p>เท่านี้ก็สามารถยิง Authen กับ API Gateway บน AWS ได้แล้วครับ</p><pre>ปล. ถ้ายังยิงไม่ได้ ให้ไปเช็ค Firewall Rule บน AWS เพิ่มเติมครับ</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=44e184e60299" width="1" height="1" alt=""><hr><p><a href="https://medium.com/digital-thai-valley/aws-connect-api-gateway-setting-with-postman-aws-signature-version-4-44e184e60299">[AWS] Connect API Gateway setting with POSTMAN (AWS Signature version 4)</a> was originally published in <a href="https://medium.com/digital-thai-valley">Digital Thai Valley</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Resubmitted Google Play Console again when reject via Google Tester]]></title>
            <link>https://medium.com/digital-thai-valley/resubmitted-google-play-console-again-when-reject-via-google-tester-da2108dd53f5?source=rss----a37d41bd589c---4</link>
            <guid isPermaLink="false">https://medium.com/p/da2108dd53f5</guid>
            <category><![CDATA[submit-app-to-play-store]]></category>
            <category><![CDATA[play-store]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Tossaphol Chin]]></dc:creator>
            <pubDate>Fri, 16 Dec 2022 11:12:31 GMT</pubDate>
            <atom:updated>2022-12-16T11:12:31.686Z</atom:updated>
            <content:encoded><![CDATA[<p>สำหรับนักพัฒนาซอฟแวร์อย่างพวกผม มีหลายครั้งครับที่ Submitted Application ขึ้นไปให้ทั้ง Apple และ Google รีวิว และก็ Sumitted bug ต่างๆนาๆขึ้นไปด้วย และไปเจอ bug ใน step ของการรีวิว Application นั่นเอง</p><p>ซึ่งบางครั้งก็เป็น bug ที่ Application ที่ Submitted ขึ้นไปจริงๆครับ ก็แก้ bug กันไป และก็ Bump version ขึ้นไปใหม่ เช่น จากเวอร์ชั่น 1.1.1 ก็จะ bump เป็น 1.1.2, 1.1.3 ไปเรื่อยๆ ขึ้นอยู่ว่าไปแก้ bug แล้ว stable ที่เวอร์ชั่นไหน</p><p>แต่รอบนี้ของผมมันไม่ได้เป็น bug ที่ application ครับ แต่เป็น Bug ที่ฝั่ง Backend ของผมเอง ซึ่ง version ที่ submitted ขึ้นไปมันถูกต้องอยู่แล้ว แค่ไปแก้ฝั่ง Backend ให้ถูกต้อง</p><p>แต่ทว่า Google Play Console นี่มันไม่มีปุ่ม Resubmitted ให้เรานี่สิครับ เขาให้เรา Bump version และก็ Build และ Upload ขึ้นไปใหม่ ถึงแม้ source code จะเหมือนเดิมทุกอย่างก็ตาม ซึ่งมันค่อนข้างเสียเวลามากครับ</p><p>ผมจึงหาวิธีที่จะ Resubmitted release version เดิมไปให้ Google รีวิวอีกครั้งนึงครับ</p><p>เริ่มจาก (ทำตามทีละ Step เลยนะครับ)</p><p>(1) จากหน้า Google Play Console ซึ่งเป็นหน้ารวมทุก Application ของเรา ให้เลือกที่ Application ของเราที่ถูก Reject มาครับ</p><p>(2) ในแถบทางด้านซ้าย Left-menu ให้ลองค้นหา เมนู Grow &gt; Store presence &gt; Main store listing (ตามภาพด้านล่างได้เลยครับ)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/544/1*_7hgh2_qNjehS0I5AnEJQQ.png" /><figcaption>เมนู Main store listing</figcaption></figure><p>(3) ในหน้านี้จะเป็นการแก้ไข Application Detail ของเราที่แสดงอยู่บน Store ครับ ซึ่งประกอบไปด้วย App name, Short description และ Full description</p><p>(4) ตรงนี้เป็นทริคนิดนึงครับ ให้แก้ข้อความตรงไหนก็ได้ส่วนนึง เช่น เคาะ Space</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3JAOKN2lxFcTyvQ6va9yuw.png" /></figure><p>ส่วนตัวผมเลือก เคาะ space ใน Full description แล้วก็ลบ space ออกครับ</p><p>(5) ปุ่มสีเทาด้านล่างจะ enable ขึ้นมาให้กด Save ได้เลยครับ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/548/1*2Y1HftHguKebkERaAlJzrw.png" /></figure><p>(6) หลังจากนั้น ไปที่แถบทางด้านซ้าย เลือกหาเมนู Release &gt; Production ครับ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/546/1*wP6adyBthF2yAuANJeDweQ.png" /><figcaption>เมนู Release &gt; Production</figcaption></figure><p>(7) เลือก Tab ด้านบน เป็น Release (ใน release ล่าสุดจะมี Button เพิ่มขึ้นมาครับ ก่อนหน้า Button View release details พอดีผมทำครั้งเดียว เลยไม่มีรูปให้ดู มันจะเขียนประมาณว่า “Edit release change” หรือ “View release change” ประมาณนี้ครับ ผมจำไม่ได้เป๊ะเหมือนกัน)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/1*lMPflFJ39Ptg6NSUPoN4Xw.png" /></figure><p>(8) เข้าไปที่ปุ่มที่เพิ่มขึ้นมาด้านบน จะมีให้ Resubmitted change อีกครั้งนึงครับ</p><p>ซึ่งรอบที่ Resubmitted รอบนี้ Google อนุมัติไวมากครับ(อาจจะเป็นเพราะใกล้ช่วงปีใหม่พอดี ดันงานออกไว อิอิ)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=da2108dd53f5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/digital-thai-valley/resubmitted-google-play-console-again-when-reject-via-google-tester-da2108dd53f5">Resubmitted Google Play Console again when reject via Google Tester</a> was originally published in <a href="https://medium.com/digital-thai-valley">Digital Thai Valley</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>