Home Page
(current)
Lessons
Articles
Online Programs
Online Programs
->
Programming
->
Programming
Freemarker Template Quiz
10 Questions
15 Questions
20 Questions
30 Questions
Question 1 (1 Points)
เมื่อต้องการใช้ template ซ้อนกัน (nested templates) คำสั่งใดที่ใช้?
(1)
<#include>
(2)
<#insert>
(3)
<#embed>
(4)
<#nest>
Question 2 (1 Points)
การกำหนด macro ทำได้โดยใช้คำสั่งใด?
(1)
<@define ...>
(2)
<#macro ...>
(3)
<@macro ...>
(4)
<#define ...>
Question 3 (1 Points)
วิธีไหนที่ใช้เพื่อกำหนดค่า default หากตัวแปรไม่มีค่า?
(1)
${variable ?? `default`}
(2)
${variable | `default`}
(3)
${variable ?: `default`}
(4)
${variable! `default`}
Question 4 (1 Points)
ไฟล์ template สามารถประกอบไปด้วยอะไรบ้าง?
(1)
เฉพาะ HTML
(2)
เฉพาะ Java code
(3)
เฉพาะ directives และ expressions
(4)
Text, expressions, directives, comments และเนื้อหาอื่น ๆ
Question 5 (1 Points)
ถ้าต้องการใช้คำสั่ง built-in สำหรับแปลง string เป็นตัวพิมพ์ใหญ่, ควรใช้คำสั่งใด?
(1)
upper()
(2)
toUpperCase()
(3)
caps()
(4)
?upper_case
Question 6 (1 Points)
เมื่อต้องการใส่ค่าเริ่มต้นให้กับตัวแปรที่อาจไม่มีใน model ควรใช้...
(1)
?default
(2)
?exists
(3)
?isset
(4)
?value
Question 7 (1 Points)
Macro ใน Freemarker ทำหน้าที่คล้ายกับอะไรในภาษาโปรแกรมอื่นๆ?
(1)
Variables
(2)
Directives
(3)
Functions
(4)
Conditions
Question 8 (1 Points)
อะไรคือ directive ที่ใช้สำหรับการทำ include ของ template อื่น?
(1)
`<@include>`
(2)
`<#include>`
(3)
`<@import>`
(4)
`<#nest>`
Question 9 (1 Points)
เมื่อต้องการสร้าง macro, ควรใช้ directive ใด?**
(1)
<#func>
(2)
<#macro>
(3)
<#define>
(4)
<#method>
Question 10 (1 Points)
สำหรับการจัดการข้อผิดพลาด, ถ้าต้องการที่จะเรียกใช้ block อื่นเมื่อเกิดข้อผิดพลาด ควรใช้ ...
(1)
<#else>
(2)
<#catch>
(3)
<#recover>
(4)
<#fallback>
You got
/ 10
Viewers : 5,588
Other Programs
Freemarker Template Quiz
Lessons
Articles
Online Programs