LevelUp! Studio https://blog.levelup.in.th Experience the new world. Fri, 26 May 2017 10:06:07 +0000 th hourly 1 http://wordpress.org/?v=3.8.1 สร้าง pre-paid card ของ SCB easy https://blog.levelup.in.th/2017/05/26/%e0%b8%aa%e0%b8%a3%e0%b9%89%e0%b8%b2%e0%b8%87-pre-paid-card-%e0%b8%82%e0%b8%ad%e0%b8%87-scb-easy/ https://blog.levelup.in.th/2017/05/26/%e0%b8%aa%e0%b8%a3%e0%b9%89%e0%b8%b2%e0%b8%87-pre-paid-card-%e0%b8%82%e0%b8%ad%e0%b8%87-scb-easy/#comments Fri, 26 May 2017 10:06:07 +0000 http://blog.levelup.in.th/?p=6137 1

2

3

]]>
https://blog.levelup.in.th/2017/05/26/%e0%b8%aa%e0%b8%a3%e0%b9%89%e0%b8%b2%e0%b8%87-pre-paid-card-%e0%b8%82%e0%b8%ad%e0%b8%87-scb-easy/feed/ 0
วิธีทำ https อย่างง่าย https://blog.levelup.in.th/2017/02/28/%e0%b8%a7%e0%b8%b4%e0%b8%98%e0%b8%b5%e0%b8%97%e0%b8%b3-https-%e0%b8%ad%e0%b8%a2%e0%b9%88%e0%b8%b2%e0%b8%87%e0%b8%87%e0%b9%88%e0%b8%b2%e0%b8%a2/ https://blog.levelup.in.th/2017/02/28/%e0%b8%a7%e0%b8%b4%e0%b8%98%e0%b8%b5%e0%b8%97%e0%b8%b3-https-%e0%b8%ad%e0%b8%a2%e0%b9%88%e0%b8%b2%e0%b8%87%e0%b8%87%e0%b9%88%e0%b8%b2%e0%b8%a2/#comments Tue, 28 Feb 2017 16:44:41 +0000 http://blog.levelup.in.th/?p=6129 ก่อนหน้านี้ผมได้ลองทำ https ครั้งหนึ่ง ตอนนี้ทำไม่ค่อยเป็น มีปัญหาเยอะมากเลยครับ จนมาเจอเจ้า certbot ครับ คิดว่าน่าจะช่วยให้การทำ https ง่ายขึ้นเยอะ

ก่อนอื่นเข้าไป ที่นี่ ก่อนเลยครับ

แล้วจะมีช่องให้เราเลือก software กับ os ที่เราใช้
1

พอเลือกเสร็จก็จะมีวิธีการทำ https มาให้เราทำตาม step ไปเลยครับ
2

ทีเด็ดสุดๆก็คือ สามารถ auto renew ได้ครับ
3

]]>
https://blog.levelup.in.th/2017/02/28/%e0%b8%a7%e0%b8%b4%e0%b8%98%e0%b8%b5%e0%b8%97%e0%b8%b3-https-%e0%b8%ad%e0%b8%a2%e0%b9%88%e0%b8%b2%e0%b8%87%e0%b8%87%e0%b9%88%e0%b8%b2%e0%b8%a2/feed/ 0
[UNITY][C#] Projectile https://blog.levelup.in.th/2017/01/31/unityc-projectile/ https://blog.levelup.in.th/2017/01/31/unityc-projectile/#comments Tue, 31 Jan 2017 15:11:00 +0000 http://blog.levelup.in.th/?p=6117 วันนี้จะมานำเสนอ method สำหรับทำให้ obj เคลื่อนที่แบบ projectile นะครับ โดยใช้สูตรทางฟิสิกส์แบบเป๊ะๆกันเลยครับ


IEnumerator projectile(Transform trans, Vector3 from, Vector3 to, float height, float time)
{
trans.localPosition = from;
yield return null;
float Vx = (to.x - from.x) / time;
float Vy = 2 * height / (0.33f * time);
float A1 = -2f * height / Mathf.Pow(0.33f * time, 2);
float t = 0;
while (t <= 0.33f * time)
{
float deltaTime = Time.deltaTime;
float deltaSx = Vx * deltaTime;
Vy += A1 * deltaTime;
float deltaSy = Vy * deltaTime;
trans.localPosition = new Vector3(trans.localPosition.x + deltaSx, trans.localPosition.y + deltaSy);
t += deltaTime;
yield return null;
}
Vy = 0;
float A2 = -2f * (to.y - from.y - height) / Mathf.Pow(0.67f * time, 2);
while (t <= time)
{
float deltaTime = Time.deltaTime;
float deltaSx = Vx * deltaTime;
Vy -= A2 * deltaTime;
float deltaSy = Vy * deltaTime;
trans.localPosition = new Vector3(trans.localPosition.x + deltaSx, trans.localPosition.y + deltaSy);
t += deltaTime;
yield return null;
}
}

]]>
https://blog.levelup.in.th/2017/01/31/unityc-projectile/feed/ 0
[Unity] การเล่นวีดิโอใน Mobile App https://blog.levelup.in.th/2017/01/31/unity-playing-video-in-the-mobile-app/ https://blog.levelup.in.th/2017/01/31/unity-playing-video-in-the-mobile-app/#comments Tue, 31 Jan 2017 13:17:15 +0000 http://blog.levelup.in.th/?p=6078 การเล่นวีดิโอในแอ็พของเรานั้นถ้าเล่นแบบเต็มจอแล้วทำได้ไม่ยากเลยครับ เพียงใช้ฟังก์ชั่น Handheld.PlayFullScreenMovie ซึ่งรับพารามิเตอร์ 4 ตัว คือ

  • Path หรือ Url ของไฟล์วีดิโอของเรา *บังคับมี*
  • สีของ Background
  • แผงควบคุม
    จะมีให้เลือก 4 แบบ คือ

    • FullScreenMovieControlMode.Full โชว์แผงควบคุมทั้งหมด
    • FullScreenMovieControlMode.Minimal โชว์แผงควบคุมแบบน้อยที่สุด
    • FullScreenMovieControlMode.CancelOnInput ไม่โชว์แผงควบคุม และหยุดวีดิโอเมื่อแตะ
    • FullScreenMovieControlMode.Hidden ไม่โชว์แผงควบคุม
  • การปรับขนาด
    จะมีให้เลือก 4 แบบ คือ

    • FullScreenMovieScalingMode.None ไม่ทำการปรับขนาดใดๆ
    • FullScreenMovieScalingMode.AspectFit ปรับยึดอัตราส่วนเดิมโดยให้ด้านใดด้านหนึ่งของวีดิโอที่ยาวกว่าชิดขอบ
    • FullScreenMovieScalingMode.AspectFill ปรับยึดอัตราส่วนเดิมโดยให้ด้านใดด้านหนึ่งของวีดิโอที่สั้นกว่าชิดขอบ
    • FullScreenMovieScalingMode.Fill ปรับเต็มจอโดยไม่ยึดอัตราส่วนเดิม

ตัวอย่างเช่น
Handheld.PlayFullScreenMovie(ConfigGame.ImageUrl + “idol.mp4″, Color.black, FullScreenMovieControlMode.Full, FullScreenMovieScalingMode.AspectFit);

ผลลัพธ์ที่ได้



style="display:block"
data-ad-client="ca-pub-5841101416947980"
data-ad-slot="5395238750"
data-ad-format="auto">



style="display:block"
data-ad-client="ca-pub-5841101416947980"
data-ad-slot="8429430352"
data-ad-format="auto">



style="display:block"
data-ad-client="ca-pub-5841101416947980"
data-ad-slot="9906163557"
data-ad-format="auto">



style="display:inline-block;width:728px;height:90px"
data-ad-client="ca-pub-5841101416947980"
data-ad-slot="8289829557">



style="display:inline-block;width:468px;height:60px"
data-ad-client="ca-pub-5841101416947980"
data-ad-slot="9766562755">

]]>
https://blog.levelup.in.th/2017/01/31/unity-playing-video-in-the-mobile-app/feed/ 0
วิธีแก้ไขเพื่อใช้งาน rockmongo https://blog.levelup.in.th/2017/01/31/%e0%b8%a7%e0%b8%b4%e0%b8%98%e0%b8%b5%e0%b9%81%e0%b8%81%e0%b9%89%e0%b9%84%e0%b8%82%e0%b9%80%e0%b8%9e%e0%b8%b7%e0%b9%88%e0%b8%ad%e0%b9%83%e0%b8%8a%e0%b9%89%e0%b8%87%e0%b8%b2%e0%b8%99-rockmongo/ https://blog.levelup.in.th/2017/01/31/%e0%b8%a7%e0%b8%b4%e0%b8%98%e0%b8%b5%e0%b9%81%e0%b8%81%e0%b9%89%e0%b9%84%e0%b8%82%e0%b9%80%e0%b8%9e%e0%b8%b7%e0%b9%88%e0%b8%ad%e0%b9%83%e0%b8%8a%e0%b9%89%e0%b8%87%e0%b8%b2%e0%b8%99-rockmongo/#comments Tue, 31 Jan 2017 05:56:44 +0000 http://blog.levelup.in.th/?p=6109 ส่วนใหญ่ปัญหาจะพาไปจบที่ deprecated เนื่องจากอาจจะมีตัว client ใหม่ๆ เข้ามาทดแทน แต่ถ้ายังจำเป็นต้องใช้ก็ขอแนะนำวิธีแก้ไขไว้ดังนี้ครับ

  • หา source ไม่ได้ แนะนำให้ใช้ git clone มาจาก https://github.com/iwind/rockmongo
  • MongoDB deprecated แนะนำให้ใช้ apt-get install php5-mongo แทน
  • ไม่มีรหัสเข้าใช้งาน ให้ไปดูที่ config.php บรรทัด $MONGO["servers"][$i]["control_users"]["admin"] = "admin"; โดย ["admin"] หมายถึง username สามารถเปลี่ยนแปลงได้ = “admin” หมายถึงรหัส สามารถเปลี่ยนได้เช่นเดียวกัน
]]>
https://blog.levelup.in.th/2017/01/31/%e0%b8%a7%e0%b8%b4%e0%b8%98%e0%b8%b5%e0%b9%81%e0%b8%81%e0%b9%89%e0%b9%84%e0%b8%82%e0%b9%80%e0%b8%9e%e0%b8%b7%e0%b9%88%e0%b8%ad%e0%b9%83%e0%b8%8a%e0%b9%89%e0%b8%87%e0%b8%b2%e0%b8%99-rockmongo/feed/ 0