<?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[Stories by CodeBangkok on Medium]]></title>
        <description><![CDATA[Stories by CodeBangkok on Medium]]></description>
        <link>https://medium.com/@CodeBangkok?source=rss-fed22e8caa38------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*m9XgyJFIOWDVTncf9hH53w.jpeg</url>
            <title>Stories by CodeBangkok on Medium</title>
            <link>https://medium.com/@CodeBangkok?source=rss-fed22e8caa38------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 19:18:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@CodeBangkok/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Xamarin Forms — Maps]]></title>
            <link>https://medium.com/@CodeBangkok/xamarin-forms-maps-349e7823d299?source=rss-fed22e8caa38------2</link>
            <guid isPermaLink="false">https://medium.com/p/349e7823d299</guid>
            <category><![CDATA[xamarin]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[microsoft]]></category>
            <category><![CDATA[maps]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[CodeBangkok]]></dc:creator>
            <pubDate>Wed, 28 Sep 2016 11:23:33 GMT</pubDate>
            <atom:updated>2016-10-13T04:43:30.745Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ljEO4N9_8GRfUGLcNVCmSA.jpeg" /></figure><h3>Step 1: Install Package</h3><p>ติดตั้ง Package เพิ่ม 1 ตัว</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EMBQMRD0JNUIHIaLw85-eg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/482/1*6zleSBIO-Ckcz5KjCDR-vQ.png" /></figure><h3>Step 2: Maps Initialization</h3><h4>โปรเจ็ค iOS</h4><p>ไฟล์ AppDelegate.cs เพิ่มโค้ด Init</p><pre>Xamarin.FormsMaps.Init();</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AmgU9zLUVtqTqHUULngVRg.png" /></figure><h4>โปรเจ็ค Android</h4><p>ไฟล์ MainActivity.cs เพิ่มโค้ด Init</p><pre>Xamarin.FormsMaps.Init(this, bundle);</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qDVfaYBYCvRkX3SKt5-4zA.png" /></figure><h3>Step 3: Platform Configuration</h3><h4>โปรเจ็ค iOS</h4><p>ไฟล์ Info.plist =&gt; Source เพิ่ม Property 2 ตัวดังนี้</p><pre>Property = Location Always Usage Description<br>Type = String<br>Value = Can we use your location</pre><pre>Property = Location When In Use Usage Description<br>Type = String<br>Value = We are using your location</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DDmvqihg5jhl5XpK0_KaBA.png" /></figure><h4>Google Maps API v2</h4><p>วิธีการขอ API Key</p><p>1) ไปที่ Google Developers Console <a href="https://console.cloud.google.com/iam-admin/projects">https://console.cloud.google.com/iam-admin/projects</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a-46fuDt0CcSkCVGtiTW0Q.png" /></figure><p>2) คลิ๊ก Create Project</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/912/1*zpKvpaBDwUCKHScad9sgAw.png" /></figure><p>3) API Manager <a href="https://console.cloud.google.com/apis/library">https://console.cloud.google.com/apis/library</a> =&gt; <br>คลิ๊ก Google Maps Android API</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qqqesjedU4S4ldI5D1U4cA.png" /></figure><p>4) คลิ๊ก Enable</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OJ_p44MIq2ZkWzn_kL9-2g.png" /></figure><p>5) คลิ๊ก Go to Credentials</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0ctaIP-dngjM--f5PcfhbA.png" /></figure><p>6) คลิ๊ก What credentials do I need?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rv1LN39nuWOKT2ximgAdPw.png" /></figure><p>7) ก๊อปปี้ API Key เก็บเอาไว้ แล้วคลิ๊ก Done</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_iVqBRmGndqozImmc7txXw.png" /></figure><p>อ่านการขอ API Key เพิ่มเติมได้ที่ <a href="https://developer.xamarin.com/guides/android/platform_features/maps_and_location/maps/obtaining_a_google_maps_api_key/">https://developer.xamarin.com/guides/android/platform_features/maps_and_location/maps/obtaining_a_google_maps_api_key</a></p><h4>โปรเจ็ค Android</h4><p>เปิดไฟล์ AndroidManifest.xml =&gt; Source เพิ่ม meta-data สำหรับ API Key</p><pre>&lt;meta-data android:name=&quot;com.google.android.maps.v2.API_KEY&quot; android:value=&quot;&quot; /&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tUoQ9JLdMEIlssLqxJgjcw.png" /></figure><p>เพิ่ม Permission ดังนี้</p><ul><li>AccessCoarseLocation</li><li>AccessFineLocation</li><li>AccessLocationExtraCommands</li><li>AccessMockLocation</li><li>AccessNetworkState</li><li>AccessWifiState</li><li>Internet</li></ul><pre>&lt;uses-permission android:name=&quot;android.permission.INTERNET&quot; /&gt;<br>&lt;uses-permission android:name=&quot;com.google.android.providers.gsf.permission.READ_GSERVICES&quot; /&gt;<br>&lt;uses-permission android:name=&quot;android.permission.WRITE_EXTERNAL_STORAGE&quot; /&gt;<br>&lt;uses-permission android:name=&quot;android.permission.ACCESS_FINE_LOCATION&quot; /&gt;<br>&lt;uses-permission android:name=&quot;android.permission.ACCESS_COARSE_LOCATION&quot; /&gt;<br>&lt;uses-permission android:name=&quot;android.permission.ACCESS_LOCATION_EXTRA_COMMANDS&quot; /&gt;<br>&lt;uses-permission android:name=&quot;android.permission.ACCESS_MOCK_LOCATION&quot; /&gt;<br>&lt;uses-permission android:name=&quot;android.permission.ACCESS_NETWORK_STATE&quot; /&gt;<br>&lt;uses-permission android:name=&quot;android.permission.ACCESS_WIFI_STATE&quot; /&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*67Dal_J2HuuRjM82YDNNfA.png" /></figure><h3>Step 4: Using Maps</h3><p>เป็น *.XAML (หน้าแรก) เพิ่มโค้ดที่ &lt;ContentPage&gt;</p><pre>xmlns:maps=&quot;clr-namespace:Xamarin.Forms.Maps;assembly=Xamarin.Forms.Maps&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YPg67Amk9sr4bPsTMNkltg.png" /></figure><p>เพิ่มแท็ก &lt;Map&gt;</p><pre>&lt;maps:Map x:Name=&quot;map&quot;/&gt;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QjJoIMPqDLLwj8mwz9GTEw.png" /></figure><p>ทดสอบรันโปรแกรม</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3bZuqLb8xbpERzh_ZsiK7Q.jpeg" /></figure><p>Source: <a href="https://developer.xamarin.com/guides/xamarin-forms/user-interface/map/">https://developer.xamarin.com/guides/xamarin-forms/user-interface/map</a></p><p>สามารถติดตามผลงาน CodeBangkok ได้ที่</p><ul><li><a href="http://codebangkok.com/">http://CodeBangkok.com</a></li><li><a href="https://www.facebook.com/CodeBangkok/">https://facebook.com/CodeBangkok</a></li><li><a href="https://twitter.com/CodeBangkok">https://twitter.com/CodeBangkok</a></li><li><a href="https://www.meetup.com/CodeBangkok/">https://meetup.com/CodeBangkok</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=349e7823d299" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Xamarin Forms — Take Photo with Camera]]></title>
            <link>https://medium.com/@CodeBangkok/xamarin-forms-take-photo-with-camera-16fae5ab42b2?source=rss-fed22e8caa38------2</link>
            <guid isPermaLink="false">https://medium.com/p/16fae5ab42b2</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[microsoft]]></category>
            <category><![CDATA[xamarin]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[mobile-development]]></category>
            <dc:creator><![CDATA[CodeBangkok]]></dc:creator>
            <pubDate>Sun, 25 Sep 2016 18:05:00 GMT</pubDate>
            <atom:updated>2016-10-13T04:44:15.964Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*efWl0ujljPeS4oVimg1Y5w.jpeg" /></figure><h3>Step 1: Install Package</h3><p>ติดตั้ง Package เพิ่ม 1 ตัวคือ Xam.Plugin.Media ของ James Montemagno</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2okyXVqmlb8yPBuLcxVHxA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/476/1*_JwXurJIU8TjtcpKnwIJKw.png" /></figure><h3>Step 2: Create User Interface</h3><p>สร้าง Button กับ Image ใช้สำหรับทดสอบ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u1arFnX4KkZWEeYV4VG5iA.png" /></figure><pre>&lt;Grid Padding=&quot;10,20,10,10&quot;&gt;<br> &lt;Grid.RowDefinitions&gt;<br>  &lt;RowDefinition Height=&quot;Auto&quot;/&gt;<br>  &lt;RowDefinition/&gt;<br>  &lt;RowDefinition Height=&quot;Auto&quot;/&gt;<br> &lt;/Grid.RowDefinitions&gt;</pre><pre>&lt;Label<br>  Text=&quot;CodeBangkok Photo&quot;<br>  HorizontalTextAlignment=&quot;Center&quot;<br>  FontSize=&quot;20&quot;/&gt;</pre><pre>&lt;Image<br>  x:Name=&quot;image&quot;<br>  Grid.Row=&quot;1&quot;<br>  BackgroundColor=&quot;#F0F0F0&quot;/&gt;</pre><pre>&lt;Button<br>  Text=&quot;Take Photo&quot;<br>  BackgroundColor=&quot;Lime&quot;<br>  Grid.Row=&quot;2&quot;<br>  Clicked=&quot;TakePhoto_Clicked&quot;/&gt;  <br>&lt;/Grid&gt;</pre><h3>Step 3: Coding</h3><p>เพิ่มโค้ดสำหรับการเปิดกล้องและถ่ายรูป</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Cn7cXuuNjFDfGNQzhKDcCw.png" /></figure><pre>async void TakePhoto_Clicked(object sender, System.EventArgs e)<br>  {<br>   if (!CrossMedia.Current.IsCameraAvailable || !CrossMedia.Current.IsTakePhotoSupported)<br>   {<br>    await DisplayAlert(&quot;No Camera&quot;, &quot;:( No camera avaialble.&quot;, &quot;OK&quot;);<br>    return;<br>   }</pre><pre>var file = await CrossMedia.Current.TakePhotoAsync(new StoreCameraMediaOptions<br>   {<br>    Directory = &quot;Sample&quot;,<br>    Name = &quot;test.jpg&quot;<br>   });</pre><pre>if (file == null)<br>    return;</pre><pre>await DisplayAlert(&quot;File Location&quot;, file.Path, &quot;OK&quot;);</pre><pre>image.Source = ImageSource.FromStream(() =&gt;<br>   {<br>    var stream = file.GetStream();<br>    file.Dispose();<br>    return stream;<br>   });<br>  }</pre><h3>Step 4: Run</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CHCJfb7P85LTZoIzuKfriQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yTTP7bD3C09rnxbnFWz6HQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PR_0XUS9RukZ2aKNZHvMnA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eXYJ45ul3nrn22L_EwW75w.jpeg" /></figure><p>Source: <a href="https://components.xamarin.com/gettingstarted/mediaplugin">https://components.xamarin.com/gettingstarted/mediaplugin</a></p><p>สามารถติดตามผลงาน CodeBangkok ได้ที่</p><ul><li><a href="http://codebangkok.com/">http://CodeBangkok.com</a></li><li><a href="https://www.facebook.com/CodeBangkok/">https://facebook.com/CodeBangkok</a></li><li><a href="https://twitter.com/CodeBangkok">https://twitter.com/CodeBangkok</a></li><li><a href="https://www.meetup.com/CodeBangkok/">https://meetup.com/CodeBangkok</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=16fae5ab42b2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Xamarin Forms —Text Translation with Microsoft Translator]]></title>
            <link>https://medium.com/@CodeBangkok/xamarin-forms-text-translation-with-microsoft-translator-5fb50410f7fd?source=rss-fed22e8caa38------2</link>
            <guid isPermaLink="false">https://medium.com/p/5fb50410f7fd</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[mobile-development]]></category>
            <category><![CDATA[microsoft]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[xamarin]]></category>
            <dc:creator><![CDATA[CodeBangkok]]></dc:creator>
            <pubDate>Sat, 24 Sep 2016 10:14:40 GMT</pubDate>
            <atom:updated>2016-10-13T04:44:47.543Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IR-meWpD8ym76JD5SV5LZw.jpeg" /></figure><h3>Step 1: Register the App</h3><p>ลงทะเบียนการใช้งาน Service ได้ที่ Microsoft DataMarket</p><pre><a href="https://datamarket.azure.com/dataset/bing/microsofttranslator">https://datamarket.azure.com/dataset/bing/microsofttranslator</a></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZprAzE8tjszi3nXXDQ6gqw.png" /></figure><p>แปลได้มากกว่า 50 ภาษา ใช้งานฟรีได้ 2,000,000 ตัวอักษรต่อเดือน</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/533/1*JyOCM2Wr0lgbyY6FvTFXmQ.png" /></figure><p>เมื่อลงทะเบียนเสร็จแล้ว ให้เข้าไปที่ My Account=&gt;Developers=&gt;Register</p><pre><a href="https://datamarket.azure.com/developer/applications">https://datamarket.azure.com/developer/applications</a></pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vY9bpw6wkfcB6yDceqTkGQ.png" /></figure><p>ใส่ข้อมูล</p><ul><li>Client ID = ใส่รหัสชื่อแอปฯของเราไม่ให้ซ้ำกับคนอื่น</li><li>Name = ใส่ชื่อแอปฯของเรา</li><li>Client secret = ก๊อปปี้เก็บเอาไว้</li><li>Redirect URI = เวปไซด์ของเรา</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xm9BUA_io5DfPADei900tw.png" /></figure><p>ลงทะเบียนเรียบร้อยแล้ว</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CQeyGAx63iLd6CzpmiKkWg.png" /></figure><h3>Step 2: Create a Translation Service</h3><p>ติดตั้ง Package เพิ่ม 2 ตัว</p><ul><li>Microsoft.Net.Http</li><li>Newtonsoft.Json</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Tyc2PAqPSe2h_GcDHOvBEA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7Bsutd7DW_8Scj5BVIF8qQ.png" /></figure><p>สร้าง Model Class สำหรับเก็บข้อมูล Access Token</p><pre>public class DataMarketAccessToken<br>{<br> public string access_token { get; set; }<br> public string token_type { get; set; }<br> public string expires_in { get; set; }<br> public string scope { get; set; }<br>}</pre><p>สร้าง Helper Class สำหรับจัดการ Service</p><pre>public static class TranslatorService<br>{<br> <br>}</pre><p>เพิ่ม Method สำหรับขอ Token จาก DataMarket (นำค่า ClientID กับ ClientSecret ที่ได้จากลงทะเบียนมาใส่ค่าลงไป)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qEMuij3ojXqfEbgkGsOGFA.png" /></figure><pre>private static async Task&lt;string&gt; GetAzureDataMarketToken()<br>{<br> var clientID = &quot;&quot;;<br> var clientSecret = &quot;&quot;;<br> var client = new HttpClient();<br> var properties = new Dictionary&lt;string, string&gt;();<br> properties.Add(&quot;grant_type&quot;, &quot;client_credentials&quot;);<br> properties.Add(&quot;client_id&quot;, clientID);<br> properties.Add(&quot;client_secret&quot;, clientSecret);<br> properties.Add(&quot;scope&quot;, &quot;<a href="http://api.microsofttranslator.com/">http://api.microsofttranslator.com</a>&quot;);</pre><pre>var authentication = new FormUrlEncodedContent(properties);<br> var dataMarketUrl = &quot;<a href="https://datamarket.accesscontrol.windows.net/v2/OAuth2-13">https://datamarket.accesscontrol.windows.net/v2/OAuth2-13</a>&quot;;<br> var dataMarketResponse = await client.PostAsync(dataMarketUrl, authentication);<br> string response = &quot;&quot;;<br> if (dataMarketResponse.IsSuccessStatusCode)<br> {<br>  response = await dataMarketResponse.Content.ReadAsStringAsync();<br> }<br> var dataMarket = JObject.Parse(response).ToObject&lt;DataMarketAccessToken&gt;();<br> return dataMarket.access_token;<br>}</pre><p>เพิ่ม Method สำหรับแปลภาษา</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4vxi4EGfm87LC-9AWXDFEg.png" /></figure><pre>public static async Task&lt;string&gt; TranslateString(string text, string language)<br>{<br> string auth = await GetAzureDataMarketToken();<br> var client = new HttpClient();<br> client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(&quot;Bearer&quot;, auth);</pre><pre>var textEncode = WebUtility.UrlEncode(text);<br> var serviceUrl = &quot;<a href="http://api.microsofttranslator.com/v2/Http.svc/Translate?text={0}&amp;to={1">http://api.microsofttranslator.com/v2/Http.svc/Translate?text={0}&amp;to={1</a>}&quot;;<br> var requestUri = string.Format(serviceUrl, textEncode, language);</pre><pre>var strTranslated = await client.GetStringAsync(requestUri);<br> var xTranslation = XDocument.Parse(strTranslated);<br> var strTransText = xTranslation.Root?.FirstNode.ToString();</pre><pre>return strTransText;<br>}</pre><h3>Step 3: Create User Interface</h3><p>สร้าง Xamarin.Forms ทดสอบการเรียกใช้ Service</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Fzz7r78vVsO8u1UQRTdNow.png" /></figure><pre>&lt;StackLayout<br>         Orientation=&quot;Vertical&quot;<br>         Margin=&quot;10,20,10,10&quot;&gt;<br>     &lt;Label<br>         Text=&quot;CodeBangkok Translator&quot;<br>         FontSize=&quot;20&quot;<br>         HorizontalTextAlignment=&quot;Center&quot;/&gt;<br>     &lt;Entry<br>         x:Name=&quot;textEntry&quot;<br>         Placeholder=&quot;Input text here&quot;/&gt;<br>     &lt;Picker<br>         x:Name=&quot;languagePicker&quot;<br>         Title=&quot;Translate to Language&quot;/&gt;<br>     &lt;Entry<br>         x:Name=&quot;translateToEntry&quot;<br>         Placeholder=&quot;Translate text&quot;<br>         IsEnabled=&quot;false&quot;/&gt;<br>     &lt;Button<br>         Text=&quot;Translate&quot;<br>         BackgroundColor=&quot;Silver&quot;<br>         Clicked=&quot;Translate_Clicked&quot;/&gt;<br> &lt;/StackLayout&gt;</pre><p>แก้ไขโค้ด C# ที่ Constructor เพื่อเพิ่ม Language เข้าไปไว้ใน Picker</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*TWytdQ6H1JWJ5sJ16FxyXA.png" /></figure><pre>Dictionary&lt;string, string&gt; languages;</pre><pre>public CBTranslatorPage()<br>{<br> InitializeComponent();<br> languages = new Dictionary&lt;string, string&gt;();<br> languages.Add(&quot;English&quot;, &quot;en&quot;);<br> languages.Add(&quot;Thai&quot;, &quot;th&quot;);<br> languages.Add(&quot;Chinese&quot;, &quot;zh-CHS&quot;);<br> languages.Add(&quot;German&quot;, &quot;de&quot;);<br> languages.Add(&quot;Japanese&quot;, &quot;ja&quot;);<br> languages.Add(&quot;Korean&quot;, &quot;ko&quot;);</pre><pre>foreach (var language in languages.Keys)<br> {<br>  languagePicker.Items.Add(language);<br> }<br>}</pre><p>จัดการ Clicked Event ของปุ่มแปลภาษา ดึงรหัสภาษามาพร้อมกับเรียก TranslatorService เพื่อแปลภาษา</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2CJxId0IP9ib1JRNWv3PPQ.png" /></figure><pre>async void Translate_Clicked(object sender, System.EventArgs e)<br>{<br> if (languagePicker.SelectedIndex &gt; 0)<br> {<br>  var languageKey = languagePicker.Items[languagePicker.SelectedIndex];<br>  var languageValue = languages[languageKey];<br>  translateToEntry.Text = await TranslatorService.TranslateString(textEntry.Text, languageValue);<br> }<br>}</pre><p>ทดสอบโปรแกรมแปลเป็นภาษาไทย</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*MS6n2YWqt3J9KiLAIiFbzA.png" /></figure><p>ทดสอบโปรแกรมแปลเป็นภาษาจีน</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*ZI-_NNodBGwV39XwJTik_g.png" /></figure><p>สามารถดู Language Code ทั้งหมดได้ที่นี่</p><pre><a href="https://msdn.microsoft.com/en-us/library/hh456380.aspx">https://msdn.microsoft.com/en-us/library/hh456380.aspx</a></pre><p>ผลของการแปลคำว่า Hello จำนวน 1 ครั้ง เสียจำนวนตัวอักษรไป 5 ตัว คงเหลือ 1,999,995 ตัวอักษร</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RvPDEfNLy0cvtqunEviOSA.png" /></figure><p>Source: <a href="https://blog.xamarin.com/let-translate/">https://blog.xamarin.com/let-translate</a></p><p>สามารถติดตามผลงาน CodeBangkok ได้ที่</p><ul><li><a href="http://codebangkok.com/">http://CodeBangkok.com</a></li><li><a href="https://www.facebook.com/CodeBangkok/">https://facebook.com/CodeBangkok</a></li><li><a href="https://twitter.com/CodeBangkok">https://twitter.com/CodeBangkok</a></li><li><a href="https://www.meetup.com/CodeBangkok/">https://meetup.com/CodeBangkok</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5fb50410f7fd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Xamarin Forms — Basic Animations]]></title>
            <link>https://medium.com/@CodeBangkok/xamarin-forms-basic-animation-1e84f7af8c48?source=rss-fed22e8caa38------2</link>
            <guid isPermaLink="false">https://medium.com/p/1e84f7af8c48</guid>
            <category><![CDATA[microsoft]]></category>
            <category><![CDATA[xamarin]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[cross-platform]]></category>
            <dc:creator><![CDATA[CodeBangkok]]></dc:creator>
            <pubDate>Thu, 08 Sep 2016 06:47:00 GMT</pubDate>
            <atom:updated>2016-10-13T04:45:55.266Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gfj5JXi48FZJ8sV0l_bU7A.jpeg" /></figure><h3>Rotation (การหมุน)</h3><p>การหมุนวัตถุ 360 องศา ในระยะเวลา 2 วินาที (2,000 มิลลิวินาที)</p><pre>await image.RotateTo(360, 2000);</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/562/1*gG_iQNom0CycdItM7W9X3A.gif" /></figure><h3>Scaling (การปรับขนาด)</h3><p>การปรับขนาดวัตถุ ใหญ่ขึ้น 2 เท่า ในระยะเวลา 2 วินาที (2,000 มิลลิวินาที)</p><pre>await image.ScaleTo(2, 2000);</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/562/1*InTMzf27tOLzlbZ4cR7W3w.gif" /></figure><h3>Translation (การเคลื่อนที่)</h3><p>การเคลื่อนที่วัตถุจากตำแหน่งที่อยู่ไปทางแนวแกน X จำนวน -100 (ไปทางซ้าย) พร้อมกับไปทางแนวแกน Y จำนวน -100 (ขึ้นไปด้านบน) ในระยะเวลา 2 วินาที (2,000 มิลลิวินาที)</p><pre>await image.TranslateTo (-100, -100, 2000);</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/562/1*a1fyAMZcCvtFlI6-WB4i0A.gif" /></figure><h3>Fading (การจางหาย)</h3><p>การปรับค่า Opacity จาก 1 ถึง 0ในระยะเวลา 2 วินาที (2,000 มิลลิวินาที)</p><pre>await image.FadeTo(0, 2000);</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/562/1*fWLEsC1bjOpO3k0hUd-ifA.gif" /></figure><h3>Cancelling Animations (การยกเลิกอนิเมชั่น)</h3><pre>ViewExtensions.CancelAnimations(image);</pre><h3>Compound Animations (การทำอนิเมชั่นแบบต่อเนื่อง)</h3><ul><li>เคลื่อนที่วัตถุไปทางแนวแกน X จำนวน -100 (ไปทางซ้าย) ในระยะเวลา 1 วินาที</li><li>เคลื่อนที่วัตถุไปทางแนวแกน Y จำนวน -100 (ขึ้นไปด้านบน) ในระยะเวลา 2 วินาที</li><li>เคลื่อนที่วัตถุไปทางแนวแกน X จำนวน 100 (ไปทางขวา) พร้อมกับไปทางแนวแกน Y จำนวน 100 (ขึ้นไปด้านล่าง) ในระยะเวลา 2 วินาที</li><li>เคลื่อนที่วัตถุไปทางแนวแกน X กลับตำแหน่งเดิม (ไปทางซ้าย) ในระยะเวลา 1 วินาที</li><li>เคลื่อนที่วัตถุไปทางแนวแกน Y กลับตำแหน่งเดิม (ขึ้นไปด้านบน) ในระยะเวลา 1 วินาที</li></ul><pre>await image.TranslateTo (-100, 0, 1000); // Move image left<br>await image.TranslateTo (-100, -100, 1000); // Move image up<br>await image.TranslateTo (100, 100, 2000); // Move image down,right<br>await image.TranslateTo (0, 100, 1000); // Move image left<br>await image.TranslateTo (0, 0, 1000); // Move image up</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/562/1*XaJ19pHx0X5rZXp6VU2QPQ.gif" /></figure><h3>Composite Animations (การผสมอนิเมชั่น)</h3><p>การผสมอนิมเมชั่น ระยะเวลา 10 นาที จากการคำนวน 10 (จำนวนนาทีที่ต้องการ) 60 (ค่าคงที่ 1 นาทีมี 60 วินาที) 1000 (ค่าคงที่ 1 วินาทีมี 1,000 มิลลิวินาที)</p><pre>// 10 minute animation<br>uint duration = 10 * 60 * 1000;</pre><pre>await Task.WhenAll(<br> image.RotateTo(307 * 360, duration),<br> image.RotateXTo(251 * 360, duration),<br> image.RotateYTo(199 * 360, duration)<br> );</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/562/1*Bw06iyQvDlEZzISUNVXnhw.gif" /></figure><h3>Controlling Velocity Changes (การควบคุมการเคลื่อนที่อนิเมชั่นให้ดูเป็นธรรมชาติมากยิ่งขึ้น)</h3><ul><li>TranslateTo with Easing.BounceIn —เคลื่อนที่วัตถุไปทางแนวแกน Y จำนวน 200 (ลงไปด้านล่าง) ในระยะเวลา 2 วินาที โดยจะเริ่มจากการกระเด้งก่อน 1 ครั้ง</li><li>ScaleTo with Easing.CubicIn — ขยายวัตถุเป็น 2 เท่า ในระยะเวลา 2 วินาที โดยจะเริ่มทำแบบช้าๆ และเร่งความเร็วขึ้นไปจนกว่าจะจบ</li><li>RotateTo with Easing.SinInOut — หมุนวัตถุ 360 องศา ในระยะเวลา 2 วินาที โดยตอนเริ่มหมุนจะเริ่มจากช้าแล้วเร่งความเร็วเป็นปกติ และตอนจบจะค่อยๆทำแบบช้าๆและหยุด</li><li>ScaleTo with Easing.CubicOut — ย่อวัตถุลงมาขนาดปกติ ในระยะเวลา 2 วินาที โดยจะเริ่มทำแบบเร็วๆ และลดความเร็วลงจนกว่าจะจบ</li><li>TranslateTo with Easing.BounceOut — เคลื่อนที่วัตถุไปทางแนวแกน Y จำนวน -200 (ขึ้นไปด้านบน) ในระยะเวลา 2 วินาที โดยจะกระเด้งตอนจบ 1 ครั้ง</li></ul><pre>await image.TranslateTo(0, 200, 2000, Easing.BounceIn);<br>await image.ScaleTo(2, 2000, Easing.CubicIn);<br>await image.RotateTo(360, 2000, Easing.SinInOut);<br>await image.ScaleTo(1, 2000, Easing.CubicOut);<br>await image.TranslateTo(0, -200, 2000, Easing.BounceOut);</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/562/1*rqfYrgipxCRgPwMv6QjnIg.gif" /></figure><p>Source: <a href="https://blog.xamarin.com/creating-animations-with-xamarin-forms/">https://blog.xamarin.com/creating-animations-with-xamarin-forms</a></p><p>สามารถติดตามผลงาน CodeBangkok ได้ที่</p><ul><li><a href="http://codebangkok.com/">http://CodeBangkok.com</a></li><li><a href="https://www.facebook.com/CodeBangkok/">https://facebook.com/CodeBangkok</a></li><li><a href="https://twitter.com/CodeBangkok">https://twitter.com/CodeBangkok</a></li><li><a href="https://www.meetup.com/CodeBangkok/">https://meetup.com/CodeBangkok</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1e84f7af8c48" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Create a REST service using ASP.NET Web API and SQL Database in Azure App Service]]></title>
            <link>https://medium.com/@CodeBangkok/create-a-rest-service-using-asp-net-web-api-and-sql-database-in-azure-app-service-c63d3ef6aa4f?source=rss-fed22e8caa38------2</link>
            <guid isPermaLink="false">https://medium.com/p/c63d3ef6aa4f</guid>
            <category><![CDATA[webapi]]></category>
            <category><![CDATA[aspnet]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[json]]></category>
            <category><![CDATA[visual-studio]]></category>
            <dc:creator><![CDATA[CodeBangkok]]></dc:creator>
            <pubDate>Thu, 18 Aug 2016 14:20:19 GMT</pubDate>
            <atom:updated>2016-08-18T15:12:01.565Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T9eBpYK_CRcreywu-gQ8rA.jpeg" /></figure><p>บทความนี้จะโชว์วิธีสร้าง REST Service ด้วย ASP.NET WebAPI โดยใช้ Visual Studio 2015 และการจัดการ SQL Server โดยใช้ SQL Server Management Studio และนำไป Deploy อยู่บน Azure App Service</p><p>ก่อนจะเริ่มเรามาเตรียมความพร้อมกันก่อน</p><ol><li>Azure Account</li><li>SQL Server Management Studio 2016</li><li>Visual Studio 2015 Update 3</li></ol><h3>Azure Account</h3><p>สำหรับท่านไหนยังไม่มี Azure Credit ไว้ทดลองเล่น ผมแนะนำให้สมัคร Visual Studio Dev Essentials กันก่อนนะครับ</p><p><a href="https://www.visualstudio.com/en-us/products/visual-studio-dev-essentials-vs.aspx">https://www.visualstudio.com/en-us/products/visual-studio-dev-essentials-vs.aspx</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5jqpU4QsqQMB_H7wg4C3Mg.png" /></figure><p>กดปุ่ม Join now เพื่อเข้าร่วมโครงการ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2-ujR6eDdi4iaxuikqn9Zg.png" /></figure><p>คลิ๊ก Activate ตรง Azure เราจะได้ Subscription ใหม่ชื่อว่า Developer Program Benefit สามารถใช้ได้ $25/เดือน ก็เพียงพอต่อการพัฒนาระบบ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UYCKAUm8hYniu4M_DCEA3Q.jpeg" /></figure><h3>Azure Web App</h3><p>สร้าง Azure Web App กดปุ่ม +New =&gt; Web + Mobile =&gt; Web App</p><p>ตั้งชื่อ Server เลือก Subscription เป็น Developer Program Benefit เลือก Resource Group หรือสร้างใหม่ แล้วกดเลือก App Service plan/location</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vTD1ZKYP1MzxN9OglgOeNQ.png" /></figure><p>ตั้งชื่อ App Service plan เลือก Location เป็น Southeast Asia เลือก Pricing tier คลิ๊กที่ View all แล้วมาด้านล่างสุดเลือก F1 Free หรือ D1 Shared ก็ได้ คลิ๊ก Select =&gt; OK =&gt; Create</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fzGV_UOH5DzRFwdSnRMixw.png" /></figure><h3>Azure SQL Database</h3><p>สร้าง Azure SQL Database กดปุ่ม +New =&gt; Data + Storage =&gt; SQL Database</p><p>ตั้งชื่อ Database name เลือก Subscription เป็น Developer Program Benefit เลือก Resource group เลือก Server</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4g0L5Nwr3Lu_SGgWPC6uuQ.png" /></figure><p>ตั้งชื่อ Server name ตั้งชื่อ Server admin login กับ Password เลือก Location เป็น Southeast Asia กดปุ่ม Select เลือก Pricing tier</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K6UwpJOVNaFudnfjNL15XQ.png" /></figure><p>คลิ๊ก View all มาด้านล่างเลือก B Basic คลิ๊ก Select =&gt; Create</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8ZPXXBdhgXDurk_dBfVkzg.png" /></figure><h3>SQL Server Firewall</h3><p>คลิ๊ก More Services ค้นหา SQL servers</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lA0rtlVJTyp6GkUbuc68vg.png" /></figure><p>เลือก SQL Server ชื่อที่สร้าง คลิ๊ก Firewall คลิ๊ก Add client IP</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ac2xm21RZh7XI8BOBtkg9g.png" /></figure><p>คลิ๊กปุ่ม Save</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G6UIPsp66BL-IHknCrQH5A.png" /></figure><h3>SQL Server Management Studio</h3><p>เข้าไปดาวน์โหลดและติดตั้งโปรแกรมได้ที่ <a href="https://msdn.microsoft.com/en-us/library/mt238290.aspx">https://msdn.microsoft.com/en-us/library/mt238290.aspx</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8AbjPlsRAKf8_J1C6v9vQw.png" /></figure><p>เปิดโปรแกรม SQL Server Management Studio ใส่ Server name เป็นชื่อที่เราตั้ง เลือก Authentication เป็น SQL Server Authentication ใส่ Login กับ Password คลิ๊ก Connect</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PQW1kmSa7aCGlr_jaxlklA.png" /></figure><p>คลิ๊กขวาที่ Tables =&gt; New =&gt; Table…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Qckpd2YZyvUV71Qgs9OAoA.png" /></figure><p>เพิ่ม Column ดังนี้ (Case Sensitive — พิมพ์ชื่อตัวใหญ่เล็กให้เป็นรูปแบบ PascalCase นะ)</p><ul><li>EmployeeId = int + Primary Key +Identity + Not Null</li><li>FirstName = nvarchar(50) + Not Null</li><li>LastName = nvarchar(50) + Not Null</li></ul><p>กดปุ่ม Save ตั้งชื่อตารางว่า “Employees” (ชื่อตารางต้องเป็นพหูพจน์) และใส่ข้อมูลทดสอบลงไปในตาราง</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kjTU0qx3sMyoc3J2letHDw.png" /></figure><h3>ASP.NET WebAPI</h3><p>Visual Studio 2015 Update 3 สามารถดาวน์โหลดได้ที่ <a href="https://msdn.microsoft.com/en-us/library/mt238290.aspx">https://msdn.microsoft.com/en-us/library/mt238290.aspx</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GCHQws8kO5muDO-MoW9V2A.png" /></figure><p>เปิดโปรแกรม Visual Studio ขึ้นมา Sign In ด้วย Microsoft Account ตัวเดียวกับ Azure Account</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vOuCx1ddKck44tdnJ7GLpQ.png" /></figure><p>คลิ๊ก New Project… เลือก Visual C# =&gt; Web =&gt; ASP.NET Web Application เลือก .NET Framework เป็นเวอร์ชั่น 4.6.1 ตั้งชื่อ Name คลิ๊ก OK</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rC-Sf6CeF9OP37ZGjwPfug.png" /></figure><p>เลือก Web API</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VP6SiT3WJ4U3pCXKkEWnwA.png" /></figure><p>คลิ๊กปุ่ม Change Authentication เลือก No Authentication กด OK =&gt; OK</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PDvy_BzJnm9ZIb2MDy5O-g.png" /></figure><p>คลิ๊กขวาที่ Models เลือก Add =&gt; Class…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JsRHGj1eJ-tWA29N6dS5GA.png" /></figure><p>ตั้งชื่อ Class Name ว่า Employee (ชื่อคลาสเหมือนชื่อตารางเป็นเอกพจน์)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vxTK3-3XCPxu6ctotVmdwQ.png" /></figure><p>เพิ่ม Property 3 ตัว (ตรงกับคอลั่มในตาราง)</p><pre>namespace CodeBangkokService.Models<br>{<br>    public class Employee<br>    {<br>        public int EmployeeId { get; set; }<br>        public string FirstName { get; set; }<br>        public string LastName { get; set; }<br>    }<br>}</pre><p>Build Project (สำคัญ)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/946/1*EHFRgc1OnGoh9OOOyMXZfQ.png" /></figure><p>คลิ๊กขวาที่ Controllers =&gt; Add =&gt; Controller…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ifes2p0x_D-MREra2xo92Q.png" /></figure><p>เลือก Web API 2 Controller with actions, using Entity Framework คลิ๊ก Add</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HvTZMRXwYOCPt3zRqQB4Gw.png" /></figure><p>Model class เลือก Employee (ถ้าไม่เจอให้ไป Build Project ใหม่)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*czonLBYcDmJWtcd4V_SNiw.png" /></figure><p>Data context class คลิ๊กที่ปุ่ม + (จำชื่อที่ Highlight เอาไว้) แล้วคลิ๊กปุ่ม Add</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a18O7jIuDIZa963UM9f2LA.png" /></figure><p>คลิ๊กปุ่ม Add</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WN4DMfAilTykfqFtuhAV-Q.png" /></figure><p>จะได้ EmployeesController.cs มาซึ่งจะซัพพอร์ต HttpMethod ดังนี้</p><ul><li>GET = Select Employees &lt;web_url&gt;/api/Employees</li><li>GET = Select Employee by ID &lt;web_url&gt;/api/Employees/1</li><li>PUT = Update Employee &lt;web_url&gt;/api/Employees/1</li><li>POST = Insert Employee &lt;web_url&gt;/api/Employees</li><li>DELETE = Delete Employee &lt;web_url&gt;/api/Employees/1</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QNlpryuvsP0wO8sxjkSosA.png" /></figure><p>เปิดไฟล์ web.config แก้ตรง ConnectionString ที่พึ่งสร้างขึ้นมาใหม่</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mT4JK3ZxITXdeswewxcwQg.png" /></figure><p>เช่น CodeBangkokServiceContext</p><pre>Server=codebangkok.database.windows.net; Database=codebangkok; User ID=bond; Password=Y@urP@ssword</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WLi6WT8M3_iRWdMVonaE1Q.png" /></figure><p>คลิ๊กขวาที่โปรเจ็ค แล้วเลือก Publish…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/924/1*nuaNawJbGjQ13aSC7ZRnRA.png" /></figure><p>เลือก Microsoft Azure App Service</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n9ere_mZRPqkjFohv_KFRg.png" /></figure><p>เลือก Subscription เป็น Developer Program Benefit แล้วค้นหา Azure Web App ที่สร้างเอาไว้ แล้วกดปุ่ม OK</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TW5Wanv8aPT0e2ZY4TLEow.png" /></figure><p>คลิ๊ก Publish</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tCu-fY2IA6QlXs7DdJ0dUQ.png" /></figure><p>REST Service พร้อมให้บริการแล้ว</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3f0WATv2YzMTWSz_IfRf6g.png" /></figure><p>ทดสอบด้วยการเข้าไปที่ &lt;web_url&gt;/api/Employees โปรแกรมด้วย Advance REST Client สามารถดาวน์โหลดได้ที่ <a href="https://chrome.google.com/webstore/detail/advanced-rest-client/hgmloofddffdnphfgcellkdfbfbjeloo?hl=en-US">https://chrome.google.com/webstore/detail/advanced-rest-client/hgmloofddffdnphfgcellkdfbfbjeloo?hl=en-US</a></p><ul><li>GET = Select Employees &lt;web_url&gt;/api/Employees</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rGnZZiq2OixqyUqmiT46yw.jpeg" /></figure><ul><li>GET = Select Employee by ID &lt;web_url&gt;/api/Employees/1</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MXXCpVe6MfFM2r4GB6e0uw.png" /></figure><ul><li>PUT = Update Employee &lt;web_url&gt;/api/Employees/1</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ErYhNRfaua0lfMyV-cytSQ.png" /></figure><ul><li>POST = Insert Employee &lt;web_url&gt;/api/Employees</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ejBPtARNtdpknkow32z81g.png" /></figure><ul><li>DELETE = Delete Employee &lt;web_url&gt;/api/Employees/1</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dmiJVNgBaycmFIFcMeoSWA.png" /></figure><p>สามารถติดตามผลงาน CodeBangkok ได้ที่</p><ul><li><a href="http://codebangkok.com/">http://CodeBangkok.com</a></li><li><a href="https://www.facebook.com/CodeBangkok/">https://facebook.com/CodeBangkok</a></li><li><a href="https://twitter.com/CodeBangkok">https://twitter.com/CodeBangkok</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c63d3ef6aa4f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Windows 10 — How to install linux bash shell]]></title>
            <link>https://medium.com/@CodeBangkok/windows-10-how-to-install-linux-bash-shell-8d8425af2421?source=rss-fed22e8caa38------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d8425af2421</guid>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[windows-10]]></category>
            <category><![CDATA[bash]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[CodeBangkok]]></dc:creator>
            <pubDate>Wed, 03 Aug 2016 14:45:24 GMT</pubDate>
            <atom:updated>2016-08-04T09:58:41.290Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*Wf2-pfJ6VRLeVnHCExIBbA.jpeg" /></figure><p>Prerequisite: <a href="http://mspoweruser.com/download-windows-10-anniversary-update-iso/">Windows 10 version 1607 Anniversary Update</a></p><p>1) Settings =&gt; Update &amp; Security =&gt; For developers</p><pre>Use developer features = Developer mode</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hEDQUQKsayD3mWCU7OLnNg.png" /></figure><p>2) Programs &amp; Features =&gt; Turn Windows features on or off</p><pre>Windows Subsystem for Linux (Beta)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NAAi2fkzqIskm4jBzEZ2NA.png" /></figure><p>3) Start =&gt; bash</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/787/1*EEuPJxlKcDcG4RVBDlAMgQ.png" /></figure><p>4) พิมพ์ y แล้ว Enter</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0lYCjXgznN68k1chXREe2g.png" /></figure><p>5) รอติดตั้งซักครู่</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3LdGS51Xq4wCOkLK6P88Og.png" /></figure><p>สำเร็จแล้ว</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d8425af2421" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[.NET Standard Library]]></title>
            <link>https://medium.com/@CodeBangkok/net-standard-library-b60ece8326c7?source=rss-fed22e8caa38------2</link>
            <guid isPermaLink="false">https://medium.com/p/b60ece8326c7</guid>
            <category><![CDATA[aspnetcore]]></category>
            <category><![CDATA[microsoft]]></category>
            <category><![CDATA[xamarin]]></category>
            <category><![CDATA[dot-net-framework]]></category>
            <dc:creator><![CDATA[CodeBangkok]]></dc:creator>
            <pubDate>Wed, 03 Aug 2016 11:46:08 GMT</pubDate>
            <atom:updated>2016-08-04T08:53:26.363Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/999/1*QeszEWzb-GzpioxxUVTtAQ.png" /></figure><p>.NET Standard Library คือ Portable Library ที่พัฒนามาให้ซัพพอร์ทได้มากกว่าเดิม</p><p>ข้อดีของ .NET Standard Library คือ One Library to rule them all มีผลต่อการทำ Share Library Project ทำครั้งเดียว ใช้ได้ครบทุก Platform</p><ol><li>.NET Framework</li><li>.NET Core</li><li>Xamarin</li></ol><p>แต่ก่อนมันแยกกันอยู่แบบนี้น่ะ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*5XjidEijkUHDQSTPOSslow.png" /></figure><p>ต่อไปไมโครซอฟท์จะทำ .NET Standard Library มาให้เราใช้อีกเยอะ เช่น Windows Azure Storage Library เวอร์ชั่น 7.1.3-preview ก็ทำเป็น .NET Standard Library แล้ว</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IkvbxHldkxm-WCFt5L9WZg.png" /></figure><p>วิธีสร้างให้ค้นหา Project Template ชื่อ portable ได้เลย เลือกใช้เป็น Class Library (Portable for iOS, Android, Windows)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fxemxWAjhFavs0zXoF7WOA.png" /></figure><p>แล้วให้ไปกดที่ Target .NET Platform Standard เปลี่ยนเป็น .NET Standard Library</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wwqtMT7XFgyJ0wce58b7zw.png" /></figure><p>เลือก Version ที่ต้องการ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bkaKdRc-g898L9bsN19r2w.png" /></figure><p>โดยที่อ้างอิง Version จากตารางนี้</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4q-1E3K9tuC3fDcomcDoVg.png" /></figure><p>เราสามารถ Add Reference โปรเจ็ค .NET Standard Library เข้าไปที่โปรเจ็ค .NET Core ได้ง่ายๆ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*bD5Pf3I-ev8Q8rxFUy_jtQ.png" /></figure><p>แต่เราไม่สามารถ Add Reference โปรเจ็ค Portable Library เข้าไปใน .NET Core Project ได้</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yw6rin0X_ali9PEaI0rxyw.png" /></figure><p>ส่วนโปรเจ็คที่ Xamarin กับ Windows ก็ใช้งาน .NET Standard Library ได้สบายๆ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/551/1*xjGcBqEj0NNbHA4jt6fInA.png" /></figure><p>ทดลองนำ DLL ของ .NET Standard Library ที่ทำบน Visual Studio for Windows มาใช้ใน Xamarin Studio for Mac ก็สามารถใช้งานได้</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2bbii5KgSthTXyTupWAGOQ.png" /></figure><p>สรุป เรามาสร้าง .NET Standard Library ใช้กันเถอะ ทำครั้งเดียวคุ้มๆๆ</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b60ece8326c7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Xamarin.Forms (VDO)— Get Started]]></title>
            <link>https://medium.com/@CodeBangkok/xamarin-forms-vdo-get-started-21377dbdf6b?source=rss-fed22e8caa38------2</link>
            <guid isPermaLink="false">https://medium.com/p/21377dbdf6b</guid>
            <category><![CDATA[microsoft]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[visual-studio]]></category>
            <category><![CDATA[xamarin]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[CodeBangkok]]></dc:creator>
            <pubDate>Fri, 29 Jul 2016 16:53:48 GMT</pubDate>
            <atom:updated>2016-10-13T04:48:06.240Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X0pPbtR12GIAqq3xSwimjg.jpeg" /></figure><ul><li>Running Xamarin.Forms</li><li>Android with Visual Studio Emulator for Android</li><li>iOS with Xamarin Mac Agent</li><li>Universal Windows with Local Machine</li><li>Windows 8.1 with Local Machine</li><li>Windows Phone 8.1 with Windows Phone Emulator</li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F-5o3t7Fa-6M%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D-5o3t7Fa-6M&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F-5o3t7Fa-6M%2Fhqdefault.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/94f0684b4ca01d7258e959b581ecdf17/href">https://medium.com/media/94f0684b4ca01d7258e959b581ecdf17/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=21377dbdf6b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Xamarin (VDO) — Installation]]></title>
            <link>https://medium.com/@CodeBangkok/xamarin-vdo-installation-83e91954d12e?source=rss-fed22e8caa38------2</link>
            <guid isPermaLink="false">https://medium.com/p/83e91954d12e</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[windows-10]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[microsoft]]></category>
            <category><![CDATA[xamarin]]></category>
            <dc:creator><![CDATA[CodeBangkok]]></dc:creator>
            <pubDate>Fri, 29 Jul 2016 03:22:55 GMT</pubDate>
            <atom:updated>2016-07-29T03:32:12.084Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kwXhq1JeowL_oDYZMjT-_Q.jpeg" /></figure><ul><li>Installing on Windows</li><li>Setup Mac Agent for iOS</li><li>Installing Visual Studio Emulator for Android</li><li>Installing on Mac</li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F9B2BqQH_Txw%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D9B2BqQH_Txw&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F9B2BqQH_Txw%2Fhqdefault.jpg&amp;key=d04bfffea46d4aeda930ec88cc64b87c&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/0608a177db852b7fe6655972f1e8bd85/href">https://medium.com/media/0608a177db852b7fe6655972f1e8bd85/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=83e91954d12e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Science — Microsoft R Server]]></title>
            <link>https://medium.com/@CodeBangkok/data-science-microsoft-r-server-b4d4feff3ac1?source=rss-fed22e8caa38------2</link>
            <guid isPermaLink="false">https://medium.com/p/b4d4feff3ac1</guid>
            <category><![CDATA[hadoop]]></category>
            <category><![CDATA[microsoft-r-server]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[big-data]]></category>
            <dc:creator><![CDATA[CodeBangkok]]></dc:creator>
            <pubDate>Fri, 22 Jul 2016 20:20:49 GMT</pubDate>
            <atom:updated>2016-07-23T04:05:47.246Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tm2B3_knAgDzfcWc-OpJiQ.jpeg" /></figure><p>กลุ่ม <a href="https://www.facebook.com/DataScienceTh">Data Science Thailand</a> นำโดยคุณ <a href="https://www.facebook.com/komescha">Komes Chandavimol</a> จัดงาน Meetup ครั้งที่ 9 ในหัวข้อ <a href="http://www.meetup.com/DataScienceTH/events/232268615/">Open Source Tools for Data Science</a> เมื่อวันที่ 21 กรกฎาคม 2559 ที่ Launchpad</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nz65dCGhW63y85yoiC0m0A.jpeg" /></figure><p>หัวข้อแรกบรรยายเรื่อง “<a href="https://medium.com/@Surasuk612/data-science-open-data-community-engagement-6571392f3edf#.8z0qraxje">โครงการสร้างชุมชนผู้ใช้ข้อมูล (Open Data Community Engagement)</a>”โดยคุณ <a href="https://www.facebook.com/klaikong">Klaikong Vaidhyakarn</a></p><p>หัวข้อที่ 2 เป็น Panel Discussion เรื่อง Open Source Tools for Data Science ดำเนินรายการโดย <a href="https://web.facebook.com/kittirak">Kittirak Moungmingsuk</a> และ <a href="https://www.facebook.com/komescha">Komes Chandavimol</a></p><p>หัวข้อที่ 3 เรื่อง Microsoft R Server โดย <a href="https://web.facebook.com/krit.kamtuo">Krit Kamtuo</a> — Technical Evangelist, Microsoft Thailand</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5qDVdTAHl-1hUSpsnjRZmQ.png" /></figure><p>Cloud-First, Mobile-First และ Open Source เป็นภาระกิจที่สำคัญมากของไมโครซอฟท์ที่จะเข้าถึง Developer ทุกคน</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BlgR4gi8JSCrPMnn7mlGzg.png" /></figure><p>ในการทำ Data Science เราคาดหวังว่าทุกคนจะเข้าใจกันเป็นทีมเดียวกันทั้งหมด และทำให้ Solution ประสบความสำเร็จ จะทำได้มันต้องมีองค์ประกอบหลายๆส่วน นอกจากองค์ความรู้ในฐาน Data Science แล้ว ก็มีเรื่องของ Tools ที่จะเข้ามาทำให้ Integrated ในทุกการทำงานได้</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9qG7jR4J6fIIGTmEZs0GMA.png" /></figure><p>ภารกิจนึงที่ไมโครซอฟท์ทำในเรื่องของ Data Science ก็คือ การ Integrate ในทุกภาคส่วน ต้องสามารถ Integrate ทุกรูปแบบของ Data Source ได้ ในการทำ Data Science ก็มี Algorithm รองรับ รวมถึง Platform ที่ทั้ง Data Scientist และ Developer สามารถทำงานร่วมกันได้ จึงเป็นที่มาของ Microsoft R Server Family</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DQdLUfjA9DLnovXATnKnRA.png" /></figure><p>ใน Microsoft Data Analytic Solution จะมีอยู่ 2 แบบด้วยกันคือ</p><ol><li>Cortana Intelligence เป็น Platform as a Service บน Micosoft Azure</li><li>Microsoft R Server &amp; SQL R Services ในรูปแบบ On-Premise</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KtVXrD6c_D1TjfbjKNgQaw.png" /></figure><h4>ความท้าทายที่เกิดจากการใช้ R</h4><ul><li>Limited Data Scale — ปัญหาด้านขนาดของข้อมูล</li><li>Inadequate Modeling Performance — ปัญหาด้านประสิทธิภาพ</li><li>Lack of Commercial Support — ปัญหาด้านการซัพพอร์ทจากผู้เชี่ยวชาญ</li><li>Complex Deployment Processes — ปัญหาด้านความซับซ้อนในการ Deploy</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7MVbeZVgRnnBd9WX1MxaUg.png" /></figure><p>ไมโครซอฟท์จึงนำเสนอที่จะช่วยแก้ไขปัญหาดังกล่าวด้วย Microsoft R Server</p><ul><li>Peace of mind — ความสงบจิตสงบใจ</li><li>Efficiency — มีประสิทธิภาพ</li><li>Speed and Scalability — ความเร็วและความสามารถในการขยาย</li><li>Flexibility and Agility — ความยืดหยุ่นและความคล่องตัว</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZdchwBfnVn9hYoPACozNJA.png" /></figure><p>Microsoft R Server มีส่วนที่ใช้งานได้ฟรีคือ Open Source Components (สีส้ม)</p><ul><li>CRAN</li><li>Microsoft R Open</li><li>DeployR — เป็น REST API เชื่อมต่อกับพวก Dashboard Visualisation ต่างๆ ไม่ว่าจะเป็น Tableau หรือจะเป็น Power BI ของไมโครซอฟท์</li></ul><p>และก็จะมีส่วนที่ต้องซื้อเป็น License Components (สีฟ้า)</p><ul><li>IDE</li><li>ConnectR</li><li>ScaleR</li><li>DistributedR</li></ul><p>Microsoft R Server เป็น Scalable R สามารถทำเป็นแบบ Cluster ได้</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VjX6_m-KDKOKK2yjDrB4rA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/495/1*oFMENpremMtp8YNTseIhzQ.png" /></figure><p><a href="https://blogs.technet.microsoft.com/machinelearning/2015/04/06/microsoft-closes-acquisition-of-revolution-analytics/">ไมโครซอฟท์ได้ไปซื้อกิจการ Revolution Analytics</a> มาเมื่อต้นปี 2015 (<a href="http://blogs.microsoft.com/blog/2015/01/23/microsoft-acquire-revolution-analytics-help-customers-find-big-data-value-advanced-statistical-analysis/#sm.004ahur518i4dy9106d1el91kduot">Microsoft to acquire Revolution Analytics to help customers find big data value with advanced statistical analysis</a>) และแยกโปรดักออกเป็น 2 ฝั่งอย่างชัดเจน ก็คือ</p><ul><li>Community — เดิม Revolution R Open เปลี่ยนมาเป็น Microsoft R Open</li><li>Commercial —เดิม Revolution R Enterprise เปลี่ยนมาเป็น SQL Server R Services รันบน Windows หรือ Microsoft R Server รันบน RedHat, SUSE, Hadoop, Teradata</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FO3O-mi1e_-Mgb0QCxUkIA.png" /></figure><p>ทุกวันนี้เราตั้งธงกันที่ทำอย่างไรให้ Microsoft R Server สามารถที่จะทำให้ Enterprise Solution เกิดคุณค่าทางธุรกิจได้</p><h4>ScaleR</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7IQourxpKOsaI2qBPdCy3A.png" /></figure><p>Core หลักของระบบก็คือเราจะเอา Hadoop เป็นแกนกลางแล้วก็เอา Microsoft R Server เป็น Application ที่ติดตั้งใน Hadoop ทำงานในลักษณะ Cluster</p><h4>DistributedR</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*g2rz7L7FdznHVBIQ-9iObQ.png" /></figure><p>ทำได้ 2 รูปแบบ</p><ul><li>ติดตั้ง IDE ที่เป็น R Editor ในเครื่อง Client และเขียนโปรแกรมภาษา R เข้าไป และประมวลผลที่ฝั่ง R Server</li><li>R Studio Web Edition</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZWbKeiLJ96AfmToVqlVW_A.png" /></figure><p>เวลาเขียนโค้ดใน Hadoop บน Linux กับ Windows สามารถใช้โค้ดร่วมกันได้</p><h4>DeployR</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3AR39_9h2lRf4Gxa25_LQA.png" /></figure><p>DeployR เป็น REST API เชื่อมต่อกับพวก Dashboard Visualisation ต่างๆ ไม่ว่าจะเป็น Tableau หรือจะเป็น Power BI ของไมโครซอฟท์</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CrAWJ9rmM9WnmtIi45kaWg.png" /></figure><h4>Microsoft R Server Environment</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*05ELVYkaisVedE6hNwwK1A.png" /></figure><h4>Scalable</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MzoeXBu1c0GYBEDVcf0w0Q.png" /></figure><p>เปรียบเทียบระหว่างการรันแบบ Single Machine กับ ScaleR (แกน Y คือ Transaction, แกน X คือ เวลา) ถ้าเราจะรันซัก 500,000 Transaction ในแบบ Single Machine จะต้องใช้เวลา 80 วินาที สำหรับ ScaleR ใช้เวลาเพียงไม่กี่วินาทีเท่านั้น และสามารถ Scale ออกได้เรื่อยๆ โดยที่ไม่มีขีดจำกัด</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gOW7hnyAwrmyg_W4Rwx0fg.png" /></figure><p>ทดลองทำโดยการนำข้อมูลเรื่องของ Flight Data ที่เป็น Open Data จำนวน 120 ล้าน Transaction มารัน Analytic ด้วย R Server + Spark + SSD ใช้เวลา 39 วินาที</p><h4>Microsoft R Server ให้อะไรกับเราบ้าง</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gtl1cjCp-C07v7du91BUWA.png" /></figure><h4>R Server on Spark Demo</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*s7D9fxFcDSD6ksitieUQbQ.png" /></figure><p><a href="http://hortonworks.com/press-releases/hortonworks-names-microsoft-azure-hdinsight-premiere-connected-data-platforms-cloud-solution/">Microsoft ร่วมมือกับ Hortonworks</a> ทำ Distribution ของ Hadoop ออกมาชื่อ <a href="https://azure.microsoft.com/en-us/services/hdinsight/">HDInsight</a></p><h4>R Server on Spark (Preview) บน Microsoft Azure</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fKPHdPr-7uguAyYKqm47PQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vs4BdNOARZcbZyc59LS5Sw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IEW2zI0qnv9AVzx7bzpAbg.png" /><figcaption>Apache Spark Dashboard with Ambari Eco-System</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z_MNCROlA1s0P3AVI9mSug.png" /><figcaption>R Studio Web Edition</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OyGrTp2mWpBXWObvru-qlA.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b4d4feff3ac1" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>