Common text some_function
other text
Common text
Common text
We need to go deeper
deeper… deeper… deeper… deeper… deeper… deeper… deeper… deeper… deeper… deeper… deeper… deeper… deeper…
We need to go deeper
We need to go deeper
function sample()
print "Lua"
end
function sample()
print "Lua"
end
function sample()
print "Lua"
end
function sample()
print "Lua"
end
tarantool> box.space.tester:auto_increment{'Fld#1', 'Fld#2'}
---
- [1, 'Fld#1', 'Fld#2']
...
function sample()
print "Lua"
end
function sample()
print "Non-highlighted"
end
tarantool> box.space.tester:auto_increment{'Fld#1', 'Fld#2'}
---
- [1, 'Fld#1', 'Fld#2']
...
tarantool> box.space.tester:auto_increment{'Fld#3'}
---
- [2, 'Fld#3']
...
tarantool> box.space.tester:auto_increment{'Fld#3'}
---
- [2, 'Fld#3']
...
tarantool> box.space.tester:auto_increment{'Fld#1', 'Fld#2'}
---
- [1, 'Fld#1', 'Fld#2']
...
tarantool> box.space.tester:auto_increment{'Fld#3'}
---
- [2, 'Fld#3']
...
tarantool> box.space.tester:auto_increment{'Fld#1', 'Fld#2'}
---
- [1, 'Fld#1', 'Fld#2']
...
tarantool> box.space.tester:auto_increment{'Fld#3'}
---
- [2, 'Fld#3']
...
We could use replacing fragments
(by adding classcurrent-only
):
To highlight code part, use HTML markup
<pre><code class="hljs">
and<mark>
for highlighting
function sample()
<mark>print "Lua"</mark> # no highlight
end
function sample()
print <mark>"Lua"</mark>
<mark>print "Lua"</mark>
<mark class="line"> print "Lua"</mark>
end
function sample()
<mark>print "Lua"</mark>
end
will render into
function sample()
<mark>print "Lua"</mark>
end
Text could be fragmentarely highlighted with highlight-red, highlight-green and highlight-blue
Also highlight may be temporary with highlight-current-red, highlight-current-green and highlight-current-blue
<span class="fragment highlight-red">highlight-red</span>
<span class="fragment highlight-current-red">
highlight-current-red</span>
function get_all_factors(number)
<span class="fragment highlight-current-red" data-fragment-index="1"> <span class="fragment highlight-current-green" data-fragment-index="2">--[[</span>--
Multiline comments <span class="fragment current-only" data-fragment-index="2">(only those are required)</span>
--<span class="fragment highlight-current-green" data-fragment-index="2">]]</span>--
</span> local factors = {}<span class="fragment highlight-current-red" data-fragment-index="1"></span>
<span class="fragment highlight-current-green" data-fragment-index="3">for</span> possible_factor=1, math.sqrt(number), 1 do
local remainder = number % possible_factor
if remainder == 0 then
<span class="fragment visible-blurred" data-fragment-index="4"> local factor, factor_pair = possible_factor,
number/possible_factor
table.insert(factors, factor)
if factor ~= factor_pair then
table.insert(factors, factor_pair)
end
</span> end
<span class="fragment highlight-current-green" data-fragment-index="3">end</span> <span class="fragment current-only" data-fragment-index="3"><i> -- end of for loop</i></span>
table.sort(factors)
return factors
end<span class="fragment highlight-current-green" data-fragment-index="4"></span>
All those things was done by hands
function test()
print "Lua"
end
function test()
print "Lua"
end
Ограничение | Значение |
---|---|
Соединений | определяется OC |
Размер спейса | memtx_memory |
Обновлений тапла | 4000 (BOX_UPDATE_OP_CNT_MAX ) |
Пользователей | 32 (BOX_USERS_MAX ) |
Длина имен | 65000 (NAME_MAX ) |
Реплик | 32 (VCLOCK_MAX ) |
fiber.cond()
condition = fiber.cond()
cond:wait()
racer = function()
<span class="fragment highlight-current-red" data-fragment-index="1">condition:wait()</span>
print("Fiber "..fiber.self().id().." passed")
end
fiber.cond()
condition = fiber.cond()
cond:wait()
racer = function()
<span class="fragment highlight-current-red" data-fragment-index="1">condition:wait()</span>
print("Fiber "..fiber.self().id().." passed")
end
racer = function() condition:wait() print("Fiber "..fiber.self().id().." passed") end
racer = function() condition:wait() print("Fiber "..fiber.self().id().." passed") end
racer = function() condition:wait() print("Fiber "..fiber.self().id().." passed") end
To do numerated code block, set
=
after language