owned this note changed 5 years ago
Published Linked with GitHub

Title slide

Slides main subtitle

Mons
Well Known Solutions

Theme1 title h1

Theme1 title h2

Theme1 title h3

Theme1 title h4

Common text some_function other text
Common text
Common text


Go down

We need to go deeper

  • List item
  • List item
    • Subitem
    • Subitem
  • List item

and down

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

Show code fragments

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']
...

Just 2-col code, no fragments

function sample()
	print "Lua"
end
function sample()
	print "Non-highlighted"
end

aaaa

bbb


Code Slide PTM55

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']
...

PTM55 Font


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']
...

Fragmented bullets

  • List item 1
  • List item 2
  • List item 3

Reverse fragmented bullets

  • List item 3
  • List item 2
  • List item 1

Fragmented with replacement

We could use replacing fragments
(by adding class current-only):

  • Some fragment 1
  • Some fragment 2
  • Some fragment 3

Code Highlight

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 "Lua"
	print "Lua"
	print "Lua"
end	

Code Highlight

<pre><code class="lua hljs">function sample()
	<mark>print "Lua"</mark>
end	
</code></pre>

will render into

function sample()
	print "Lua"
end	

Highlights

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)
	--[[--
		Multiline comments (only those are required)
	--]]--
    local factors = {}
	for possible_factor=1, math.sqrt(number), 1 do
        local remainder = number % possible_factor
        if remainder == 0 then
            local factor, factor_pair = possible_factor,
				number/possible_factor
            table.insert(factors, factor)
            if factor ~= factor_pair then
                table.insert(factors, factor_pair)
            end
        end
	end  -- end of for loop
    table.sort(factors)
    return factors
end

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()
	condition:wait()
	print("Fiber "..fiber.self().id().." passed")
end

Note:

  • fiber.cond()
    Создание новой условной переменной. Возвращает cond_object.
  • cond_object:wait([timeout])
    Перевод файбера в режим ожидания, пока другой файбер не выполнит cond_object:signal() или cond_object:broadcast() от той же переменной.

Условные переменные

  • fiber.cond()
    Создание новой условной переменной
condition = fiber.cond()
  • cond:wait()
    Перевод файбера в режим ожидания
racer = function()
	condition:wait()
	print("Fiber "..fiber.self().id().." passed")
end

3 code blocks

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

Select a repo