วันเสาร์ที่ 23 สิงหาคม พ.ศ. 2568

Stat vs Math

Math is about discovering and proving truths that are universally valid.

Stat is about drawing conclusions from data, often with uncertainty.

AspectMathematicsStatistics
FocusAbstract concepts, patterns, structuresData collection, analysis, interpretation
NatureDeductive reasoning (from theory to result)Inductive reasoning (from data to inference)
PurposeTo develop theories and solve equationsTo make decisions or predictions based on data
Core ActivitiesProving theorems, solving equationsEstimating, testing hypotheses, modeling data
Key TopicsAlgebra, calculus, geometry, number theoryProbability, sampling, regression, inference

วันอังคารที่ 19 สิงหาคม พ.ศ. 2568

วันเสาร์ที่ 16 สิงหาคม พ.ศ. 2568

วันพุธที่ 6 สิงหาคม พ.ศ. 2568

สรรพนามบุรุษที่สองสำหรับตำรวจและทหารบก

ยศทหารบก

  • นายสิบ/ชั้นประทวน:

    • สิบตรี, สิบโท, สิบเอก: นิยมเรียกกันทั่วไปว่า "หมู่"

    • จ่าสิบตรี, จ่าสิบโท, จ่าสิบเอก: นิยมเรียกกันว่า "จ่า"

    • จ่าสิบเอก (อัตราเงินเดือนสูงขึ้น): จะเรียกว่า "จ่าพิเศษ"

  • นายทหารสัญญาบัตร:

    • ร้อยตรี, ร้อยโท: เรียกกันว่า "ผู้หมวด"

    • ร้อยเอก: เรียกกันว่า "ผู้กอง"

    • พันตรี, พันโท, พันเอก: เรียกกันว่า "ผู้พัน"

    • พันเอกพิเศษ, พลตรี, พลโท, พลเอก: เรียกกันว่า "นายพล"

    • ตำแหน่งผู้บังคับการกรมขึ้นไป: จะนิยมเรียกกันว่า "ผู้การ"

ยศตำรวจ

  • ชั้นประทวน:

    • สิบตำรวจตรี, สิบตำรวจโท, สิบตำรวจเอก: เรียกกันว่า "หมู่"

    • จ่าสิบตำรวจ: เรียกกันว่า "จ่า"

    • ดาบตำรวจ: เรียกกันว่า "ดาบ"

  • ชั้นสัญญาบัตร:

    • ร้อยตำรวจตรี, ร้อยตำรวจโท: เรียกกันว่า "ผู้หมวด"

    • ร้อยตำรวจเอก: เรียกกันว่า "ผู้กอง"

    • พันตำรวจตรี, พันตำรวจโท, พันตำรวจเอก: เรียกกันว่า "ผู้พัน"

    • พลตำรวจตรี, พลตำรวจโท, พลตำรวจเอก: ตำแหน่งนี้จะเรียกกันว่า "นายพล"

    • ตำแหน่งผู้บังคับการกองบังคับการขึ้นไป (ตั้งแต่ พล.ต.ต. ขึ้นไป): นิยมเรียกกันว่า "ผู้การ"

    • สารวัตร: เป็นชื่อตำแหน่ง ไม่ใช่ชื่อยศ โดยสารวัตรส่วนใหญ่จะเป็นยศ พันตำรวจตรี

วันอังคารที่ 5 สิงหาคม พ.ศ. 2568

Web service runs on application server

 A RESTful web service is a type of web application, and its core business logic, where the "work" of the service is performed, runs on an application server.

Here's why and how it fits into the web server and application server model:

 * RESTful Services and Dynamic Content: A RESTful web service is designed to provide dynamic data, often in formats like JSON or XML, in response to requests. This is the very definition of dynamic content, which is the application server's main purpose. A static HTML file doesn't need to be generated—it's just a file. But a request for a RESTful endpoint like /users/123 needs to trigger code that queries a database, formats the user's data, and returns it as a JSON object. This logic runs on the application server.

 * The Web Server's Supporting Role: While the RESTful service code runs on the application server, a web server is still typically used in front of it. In this scenario, the web server's job is not to serve the RESTful data directly. Instead, it acts as a smart proxy:

   * It handles the incoming HTTP requests from clients.

   * It forwards requests for the RESTful endpoints to the application server.

   * It can also perform tasks like load balancing (distributing requests across multiple application servers) and SSL termination (handling the encrypted connection so the application server doesn't have to).

 * Example:

   * A client sends a GET request to https://api.example.com/users/123.

   * This request first hits a web server (e.g., NGINX).

   * The web server is configured to recognize that requests to the /users path should be routed to a specific application server.

   * The application server (e.g., a Node.js server or a Java servlet container like Tomcat) receives the request.

   * It executes the code for the users endpoint, which likely performs a database query to find the user with ID 123.

   * The application server then formats the data into a JSON response.

   * It sends the JSON response back to the web server.

   * The web server sends the final JSON response back to the client.

In summary, the RESTful web service itself—the code that defines the API, handles requests, and provides responses—is executed on the application server. The web server serves as a crucial component of the overall infrastructure, providing an efficient and secure gateway to the application server'

s functionality.