Testing page
Synchronized tabs
Sections
Collapsed section
Some text here and a codeblock:
Codeblocks
Just a codeblock:
Expandable codeblock
Runnable codeblock
Tables
Markdown table
Primitive-type array | Equivalent in Java |
---|---|
| |
| |
| |
| |
| |
| |
| |
|
XML table
Last modified on | December 2023 |
---|---|
Next update | June 2024 |
XML table with codeblocks inside
Simple table:
Before | Now |
---|---|
kotlin {
targets {
configure(['windows',
'linux']) {
}
}
}
|
kotlin {
targets {
configure([findByName('windows'),
findByName('linux')]) {
}
}
}
|
More complex table:
Before | Now | |
---|---|---|
Dependencies of the |
jvm<Scope>
|
jvmCompilation<Scope>
|
dependencies {
add("jvmImplementation",
"foo.bar.baz:1.2.3")
}
|
dependencies {
add("jvmCompilationImplementation",
"foo.bar.baz:1.2.3")
}
| |
Dependencies of the |
jvmMain<Scope>
| |
Dependencies of the |
jvmTest<Scope>
|
jvmTestCompilation<Scope>
|
Dependencies of the |
jvmTest<Scope>
|
Lists
Ordered list
One
Two
Three
Three point 1
Three point 2
Three point 3
Three point 1 and 1
With a codeblock inside:
jvmTest<Scope>
Non-ordered list
First bullet
Second bullet
Third bullet
One more
Another one
Wow, one more
With a codeblock inside:
jvmTest<Scope>
Definition list
- Collapsible item #1
The return type of the
findById()
function in theCrudRepository
interface is an instance of theOptional
class. However, it would be convenient to return aList
with a single message for consistency. For that, you need to unwrap theOptional
value if it’s present, and return a list with the value. This can be implemented as an extension function to theOptional
type.In the code,
Optional<out T>.toList()
,.toList()
is the extension function forOptional
. Extension functions allow you to write additional functions to any classes, which is especially useful when you want to extend functionality of some library class.- Collapsible item #2
This function works with an assumption that the new object doesn’t have an id in the database. Hence, the id should be null for insertion.
If the id isn’t null,
CrudRepository
assumes that the object already exists in the database and this is an update operation as opposed to an insert operation. After the insert operation, theid
will be generated by the data store and assigned back to theMessage
instance. This is why theid
property should be declared using thevar
keyword.
Text elements
Bold text
italic text
inline code
emojis ❌✅🆕
Variables
variable using: latest Kotlin version is 2.0.21
Embedded elements
Video from YouTube
Pictures
Regular (Markdown):
Regular (XML):
Inline:
Zoomable:
Button-style:
Notes
Warning:
Note:
Tip: