<commit_before>INSERT INTO PUBLIC.FRAGMENT(FRAGMENT_ID, TITLE, CONTENT, CREATION_DATETIME, UPDATE_DATETIME) VALUES
(1, 'markdown - Phrase Emphasis', STRINGDECODE('    **bold** or __bold__\r\n\r\n    *italic* or _italic_\r\n\r\n    ***bold_and_italic*** or ___bold_and_italic___ \r\n\r\n###### Output:\r\n\r\n**bold** or __bold__\r\n\r\n*italic* or _italic_\r\n\r\n***bold_and_italic*** or ___bold_and_italic___ '), TIMESTAMP '2015-06-13 16:37:54.137', TIMESTAMP '2015-06-13 16:47:20.312'),
(2, 'markdown - Headers', STRINGDECODE('    Big Header\r\n    =======\r\n    \r\n    Smaller Header \r\n    --------\r\n    \r\n    # Header 1\r\n    ## Header 2\r\n    ### Header 3\r\n    #### Header 4\r\n    ##### Header 5\r\n    ###### Header 6\r\n\r\n###### Output:\r\n\r\nBig Header\r\n=======\r\n\r\nSmaller Header \r\n--------\r\n\r\n# Header 1\r\n## Header 2\r\n### Header 3\r\n#### Header 4\r\n##### Header 5\r\n###### Header 6\r\n'), TIMESTAMP '2015-06-13 16:44:38.168', TIMESTAMP '2015-06-13 16:44:38.168'),
(3, 'markdown - Lists', STRINGDECODE('    Ordered, without paragraphs: \r\n        1.  Foo\r\n        1.  Bar\r\n\r\n    Unordered, with paragraphs: (''*'' or ''+'' or ''-'' can be used)\r\n        - Foo.  \r\n          With multiple paragraphs.\r\n        - Bar\r\n\r\n    You can nest them:\r\n        -   An unordered list item\r\n          - A nested unordered list item\r\n        -   Another list item\r\n            1.  The first nested ordered list item\r\n            1.  A second nested ordered list item\r\n                * A nested unordered list\r\n            1. This is the last nested ordered list item\r\n        -   The last unordered list item\r\n###### Output:\r\n\r\nOrdered, without paragraphs: \r\n1.  Foo\r\n1.  Bar\r\n\r\nUnordered, with paragraphs: (''*'' or ''+'' or ''-'' can be used)\r\n- Foo.  \r\n  With multiple paragraphs.\r\n- Bar\r\n\r\nYou can nest them:\r\n-   An unordered list item\r\n  - A nested unordered list item\r\n-   Another list item\r\n    1.  The first nested ordered list item\r\n    1.  A second nested ordered list item\r\n        * A nested unordered list\r\n    1. This is the last nested ordered list item\r\n-   The last unordered list item'), TIMESTAMP '2015-06-13 16:51:45.537', TIMESTAMP '2015-06-13 16:51:45.537'),
(4, 'markdown - Blockquotes', STRINGDECODE('    > Email-style angle brackets  \r\n    > are used for blockquotes.\r\n    > > And, they can be nested.\r\n    >\r\n    > * You can quote a list.\r\n    > * Etc.\r\n###### Output:\r\n\r\n> Email-style angle brackets  \r\n> are used for blockquotes.\r\n> > And, they can be nested.\r\n>\r\n> * You can quote a list.\r\n> * Etc.'), TIMESTAMP '2015-06-13 16:54:05.735', TIMESTAMP '2015-06-13 16:57:01.217'),
(5, 'markdown - Literal (preformatted) text', STRINGDECODE('    Text surrounded by backticks will be rendered literally:  \r\n    `*** not bold, just shows as it is ***`  \r\n    ( You can include literal backticks like `` `this` `` )\r\n\r\n    Alternatively, you can just indent every line by at least 4 spaces like so:\r\n\r\n        ##### This text will not be rendered as headers\r\n        ##### This one neither\r\n\r\n###### Output:\r\n\r\nText surrounded by backticks will be rendered literally:  \r\n`*** not bold, just shows as it is ***`  \r\n( You can include literal backticks like `` `this` `` )\r\n\r\nAlternatively, you can just indent every line by at least 4 spaces like so:\r\n\r\n    ##### This text will not be rendered as headers\r\n    ##### This one neither'), TIMESTAMP '2015-06-13 17:09:23.397', TIMESTAMP '2015-06-13 17:17:02.674'),
(6, 'markdown - Links', STRINGDECODE('    Inline style:  [text](URL \"optional title\")  \r\n\r\n    Example:  \r\n      Go to [Google](http://www.google.com \"Google Page\")\r\n###### Output:\r\nGo to [Google](http://www.google.com \"Google Page\")\r\n* * *\r\n    Reference style: [text][label]\r\n    Then, anywhere else in the doc, define the links like so:\r\n        [label]: URL \"optional title\"\r\n\r\n    Example:  \r\n      Go to [Google][0]\r\n\r\n      [0]: http://www.google.com\r\n\r\n###### Output:\r\nGo to [Google][0]\r\n\r\n\r\n[0]: http://www.google.com'), TIMESTAMP '2015-06-13 17:27:30.349', TIMESTAMP '2015-06-13 17:35:14.56');

INSERT INTO PUBLIC.FRAGMENT(FRAGMENT_ID, TITLE, CONTENT, CREATION_DATETIME, UPDATE_DATETIME) VALUES
(7, 'markdown - image', STRINGDECODE('    Inline style:\r\n        ![alternative text](URL_to_image \"optional title\")\r\n\r\n    Example:\r\n        ![Linux Penguin](https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcRwUqkWOMq9PEo1qZUyjjaMcToXvwNjJyYH1w982alY0iivYo0k)\r\n###### Output:\r\n![Linux Penguin](https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcRwUqkWOMq9PEo1qZUyjjaMcToXvwNjJyYH1w982alY0iivYo0k)\r\n* * *\r\n    Reference style:\r\n        ![alternative text][label]\r\n\r\n\r\n        [label]: URL_to_image \"optional title\"\r\n\r\nExample:  \r\n`![Batman][000]`\r\n\r\n`[000]: https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTk-E0CVdOAiWPGhFwNQKUuTX-qZM2E0PQAebU0U45sl-6mt69h1w \"Batman\"`  \r\n\r\n###### Output:\r\n![Batman][000]\r\n\r\n[000]: https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTk-E0CVdOAiWPGhFwNQKUuTX-qZM2E0PQAebU0U45sl-6mt69h1w \"Batman\"'), TIMESTAMP '2015-06-13 17:43:09.831', TIMESTAMP '2015-06-13 17:54:44.339'),
(8, 'markdown - Manual Line Breaks', STRINGDECODE('    End a line with two or more spaces: ({{[clr-br] {space} }} denotes a space character )\r\n        This line has two spaces at the end,{{[clr-br] {space}{space} }}\r\n        So the next line will break like this;\r\n\r\n        Without spaces at the end,\r\n        it won''t break at all.\r\n\r\n    Sometimes you want blank lines between data (paragraph, table, image, ...) but Markdown won''t allow it.\r\n    Insert {{[clr-br] &nbsp;{space}{space} }} in that case.\r\n    \r\n        ###### This line is followed by a blank line and a line of sentence{{[clr-br] {space}{space} }}\r\n        {{[clr-br] &nbsp;{space}{space} }}\r\n        ###### Note the above blank line\r\n        \r\n###### Output:\r\nThis line has two spaces at the end,    \r\nSo the next line will break like this;\r\n\r\nWithout spaces at the end,\r\nit won''t break at all.\r\n\r\n###### This line is followed by a blank line and a line of sentence\r\n&nbsp;  \r\n###### Note the above blank line'), TIMESTAMP '2015-06-13 18:02:00.926', TIMESTAMP '2015-07-12 14:11:23.658'),
(9, 'markdown - Table (standard style)', STRINGDECODE('    First Header  | Second Header\r\n    ------------- | -------------\r\n    Content Cell  | Content Cell\r\n    Content Cell  | Content Cell\r\n###### Output:\r\nFirst Header  | Second Header\r\n------------- | -------------\r\nContent Cell  | Content Cell\r\nContent Cell  | Content Cell\r\n'), TIMESTAMP '2015-06-13 18:29:20.161', TIMESTAMP '2015-06-13 18:37:16.392'),
(10, 'markdown - Table (Github style)', STRINGDECODE('    | Left align | Right align | Center align |\r\n    |:-----------|------------:|:------------:|\r\n    |This        |This         |This     \r\n    |column      |column       |column    \r\n    |will        |will         |will     \r\n    |be          |be           |be      \r\n    |left        |right        |center    \r\n    |aligned     |aligned      |aligned\r\n\r\n###### Output:\r\n| Left align | Right align | Center align |\r\n|:-----------|------------:|:------------:|\r\n|This        |This         |This     \r\n|column      |column       |column    \r\n|will        |will         |will     \r\n|be          |be           |be      \r\n|left        |right        |center    \r\n|aligned     |aligned      |aligned'), TIMESTAMP '2015-06-13 18:31:43.561', TIMESTAMP '2015-06-13 18:37:31.893'),
(11, 'markdown - Backslash escapes', STRINGDECODE('Markdown provides backslash escapes for the following characters:\r\n\r\n    \\   backslash\r\n    `   backtick\r\n    *   asterisk\r\n    _   underscore\r\n    {}  curly braces\r\n    []  square brackets\r\n    ()  parentheses\r\n    #   hash mark\r\n    +   plus sign\r\n    -   minus sign (hyphen)\r\n    .   dot\r\n    !   exclamation mark'), TIMESTAMP '2015-06-24 17:01:38.77', TIMESTAMP '2015-07-12 14:05:41.954'),
(12, 'markdown - How to insert a literal | character inside table cells', STRINGDECODE('{{[clr-r] The | character is used to format tables in Markdown, but it is not escapable by backslash. }}\r\n\r\nFor instance, the following table won''t be rendered correctly\r\n\r\n###### Input:  \r\n\r\n    AND  | OR\r\n    -----|----\r\n    &&   | \\|\\|\r\n\r\n###### Output:\r\n\r\nAND  | OR\r\n-----|----\r\n&&   | \\|\\|\r\n&nbsp;  \r\n* * *\r\n**[Solution]** You can use a HTML entity number {{[clr-b] `&#124;` }} for the literal | in this case.\r\n\r\n###### Input:  \r\n\r\n    AND  | OR\r\n    -----|----\r\n    &&   | &#124;&#124;\r\n\r\n###### Output:\r\n\r\nAND  | OR\r\n-----|----\r\n&&   | &#124;&#124;'), TIMESTAMP '2015-07-09 07:58:13.305', TIMESTAMP '2015-07-12 14:09:42.644');

INSERT INTO PUBLIC.FRAGMENT(FRAGMENT_ID, TITLE, CONTENT, CREATION_DATETIME, UPDATE_DATETIME) VALUES
(13, 'markdown - Horizontal Lines', STRINGDECODE('Horizontal Lines:\r\n    * * *\r\n    - - -\r\n\r\n###### Output:\r\n* * *\r\n- - -\r\n'), TIMESTAMP '2015-07-12 14:03:36.466', TIMESTAMP '2015-07-12 14:05:02.605'),
(14, 'Fragment', STRINGDECODE('{{[clr-b] Fragment }} is a unit of data Civilizer manages for you.  \r\n\r\n>[Notice] The concept and idea have been borrowed from [Piggydb](http://piggydb.jp/en/d/1#r23 \"\").   \r\n>Some details are different, but I think the overall idea is almost identical with that of Piggydb.\r\n\r\nFor instance, following things can be Fragments:\r\n- knowledge/expertise for your job\r\n- temporary memo/notes\r\n- schedule/plan\r\n- detailed procedures you often forget for infrequent tasks\r\n  - e.g. installing printer drivers on your computers, submitting a tax return\r\n- expressions/vocabularies (e.g. when you learn a foreign language)\r\n- ideas/inspirations\r\n- todo list for your job or life\r\n- insightful maxims/proverbs\r\n- humors and etc.\r\n\r\nWhat you are reading right now is a Fragment too.\r\n\r\nFragments contain text mostly, but it can contain any format of data current Web technology (and your particular web browser) can deal with such as hyper links, images, videos, audio, etc.\r\n\r\nYou can edit a Fragment in {{[clr-y] Markdown }} markup language.  \r\nCivilizer comes with a sample exemplar database where explanations of basic Markdown rules are included as Fragment forms.( click this --> {{[tag] 1 }} )  \r\nAlso Civilizer has extra custom markup rules to reach some area Markdown doesn''t support and accomplish some of application-specific needs.\r\n\r\nFragments can be structured form of data (most of time, structured data is a lot more efficient than non-structured data) with:\r\n- Tagging\r\n  - e.g. This Fragment is tagged with two terms (civilizer, concepts)\r\n- Relating one with another\r\n  - If you find two or more of Fragments that have similarities/contrasts or share some properties, you can relate them\r\n\r\n> [Notice] Each Fragment has to be tagged.    \r\n> As a rule, Civilizer does not allowed non-tagged Fragments.    \r\n> If you omit tagging when you save a Fragment, Civilizer will tag it as {{[clr-v] ''#untagged'' }}.  \r\n\r\n{{[clr-g] Recommendations in editing and managing a Fragment: }}\r\n- Keep it as concise as possible.\r\n  - If Fragments get too big, divide it into several small ones and relate them.\r\n- Attach meaningful tags.\r\n- Relate them if you find any relationship (even though it looks insignificant...) with another Fragment.\r\n- Bookmark Fragments you can think you access frequently.\r\n\r\n'), TIMESTAMP '2015-07-12 14:55:07.81', TIMESTAMP '2015-07-12 15:22:44.822');

INSERT INTO PUBLIC.TAG(TAG_ID, TAG_NAME) VALUES
(1, 'markdown'),
(2, 'tips'),
(3, 'civilizer'),
(4, 'concepts');

INSERT INTO PUBLIC.TAG2FRAGMENT(TAG2FRAGMENT_ID, TAG_ID, FRAGMENT_ID) VALUES
(3, 1, 2),
(4, 1, 1),
(5, 1, 3),
(8, 1, 4),
(14, 1, 5),
(20, 1, 6),
(24, 1, 7),
(31, 1, 9),
(32, 1, 10),
(66, 1, 13),
(69, 1, 11),
(70, 2, 11),
(76, 1, 12),
(77, 2, 12),
(78, 1, 8),
(109, 3, 14),
(110, 4, 14);

INSERT INTO PUBLIC.FRAGMENT2FRAGMENT(FRAGMENT2FRAGMENT_ID, FROM_ID, TO_ID) VALUES
(1, 7, 6),
(2, 6, 7),
(5, 2, 5),
(6, 5, 2),
(7, 1, 5),
(8, 5, 1),
(9, 9, 10),
(10, 10, 9),
(11, 11, 12),
(12, 12, 11),
(15, 9, 12),
(16, 12, 9);
<commit_msg>[update] startup database; added explanations about a few basic operations;<commit_after>INSERT INTO PUBLIC.FRAGMENT(FRAGMENT_ID, TITLE, CONTENT, CREATION_DATETIME, UPDATE_DATETIME) VALUES
(1, 'markdown - Phrase Emphasis', STRINGDECODE('    **bold** or __bold__\r\n\r\n    *italic* or _italic_\r\n\r\n    ***bold_and_italic*** or ___bold_and_italic___ \r\n\r\n###### Output:\r\n\r\n**bold** or __bold__\r\n\r\n*italic* or _italic_\r\n\r\n***bold_and_italic*** or ___bold_and_italic___ '), TIMESTAMP '2015-06-13 16:37:54.137', TIMESTAMP '2015-06-13 16:47:20.312'),
(2, 'markdown - Headers', STRINGDECODE('    Big Header\r\n    =======\r\n    \r\n    Smaller Header \r\n    --------\r\n    \r\n    # Header 1\r\n    ## Header 2\r\n    ### Header 3\r\n    #### Header 4\r\n    ##### Header 5\r\n    ###### Header 6\r\n\r\n###### Output:\r\n\r\nBig Header\r\n=======\r\n\r\nSmaller Header \r\n--------\r\n\r\n# Header 1\r\n## Header 2\r\n### Header 3\r\n#### Header 4\r\n##### Header 5\r\n###### Header 6\r\n'), TIMESTAMP '2015-06-13 16:44:38.168', TIMESTAMP '2015-06-13 16:44:38.168'),
(3, 'markdown - Lists', STRINGDECODE('    Ordered, without paragraphs: \r\n        1.  Foo\r\n        1.  Bar\r\n\r\n    Unordered, with paragraphs: (''*'' or ''+'' or ''-'' can be used)\r\n        - Foo.  \r\n          With multiple paragraphs.\r\n        - Bar\r\n\r\n    You can nest them:\r\n        -   An unordered list item\r\n          - A nested unordered list item\r\n        -   Another list item\r\n            1.  The first nested ordered list item\r\n            1.  A second nested ordered list item\r\n                * A nested unordered list\r\n            1. This is the last nested ordered list item\r\n        -   The last unordered list item\r\n###### Output:\r\n\r\nOrdered, without paragraphs: \r\n1.  Foo\r\n1.  Bar\r\n\r\nUnordered, with paragraphs: (''*'' or ''+'' or ''-'' can be used)\r\n- Foo.  \r\n  With multiple paragraphs.\r\n- Bar\r\n\r\nYou can nest them:\r\n-   An unordered list item\r\n  - A nested unordered list item\r\n-   Another list item\r\n    1.  The first nested ordered list item\r\n    1.  A second nested ordered list item\r\n        * A nested unordered list\r\n    1. This is the last nested ordered list item\r\n-   The last unordered list item'), TIMESTAMP '2015-06-13 16:51:45.537', TIMESTAMP '2015-06-13 16:51:45.537'),
(4, 'markdown - Blockquotes', STRINGDECODE('    > Email-style angle brackets  \r\n    > are used for blockquotes.\r\n    > > And, they can be nested.\r\n    >\r\n    > * You can quote a list.\r\n    > * Etc.\r\n###### Output:\r\n\r\n> Email-style angle brackets  \r\n> are used for blockquotes.\r\n> > And, they can be nested.\r\n>\r\n> * You can quote a list.\r\n> * Etc.'), TIMESTAMP '2015-06-13 16:54:05.735', TIMESTAMP '2015-06-13 16:57:01.217'),
(5, 'markdown - Literal (preformatted) text', STRINGDECODE('    Text surrounded by backticks will be rendered literally:  \r\n    `*** not bold, just shows as it is ***`  \r\n    ( You can include literal backticks like `` `this` `` )\r\n\r\n    Alternatively, you can just indent every line by at least 4 spaces like so:\r\n\r\n        ##### This text will not be rendered as headers\r\n        ##### This one neither\r\n\r\n###### Output:\r\n\r\nText surrounded by backticks will be rendered literally:  \r\n`*** not bold, just shows as it is ***`  \r\n( You can include literal backticks like `` `this` `` )\r\n\r\nAlternatively, you can just indent every line by at least 4 spaces like so:\r\n\r\n    ##### This text will not be rendered as headers\r\n    ##### This one neither'), TIMESTAMP '2015-06-13 17:09:23.397', TIMESTAMP '2015-06-13 17:17:02.674'),
(6, 'markdown - Links', STRINGDECODE('    Inline style:  [text](URL \"optional title\")  \r\n\r\n    Example:  \r\n      Go to [Google](http://www.google.com \"Google Page\")\r\n###### Output:\r\nGo to [Google](http://www.google.com \"Google Page\")\r\n* * *\r\n    Reference style: [text][label]\r\n    Then, anywhere else in the doc, define the links like so:\r\n        [label]: URL \"optional title\"\r\n\r\n    Example:  \r\n      Go to [Google][0]\r\n\r\n      [0]: http://www.google.com\r\n\r\n###### Output:\r\nGo to [Google][0]\r\n\r\n\r\n[0]: http://www.google.com'), TIMESTAMP '2015-06-13 17:27:30.349', TIMESTAMP '2015-06-13 17:35:14.56');

INSERT INTO PUBLIC.FRAGMENT(FRAGMENT_ID, TITLE, CONTENT, CREATION_DATETIME, UPDATE_DATETIME) VALUES
(7, 'markdown - image', STRINGDECODE('    Inline style:\r\n        ![alternative text](URL_to_image \"optional title\")\r\n\r\n    Example:\r\n        ![Linux Penguin](https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcRwUqkWOMq9PEo1qZUyjjaMcToXvwNjJyYH1w982alY0iivYo0k)\r\n###### Output:\r\n![Linux Penguin](https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcRwUqkWOMq9PEo1qZUyjjaMcToXvwNjJyYH1w982alY0iivYo0k)\r\n* * *\r\n    Reference style:\r\n        ![alternative text][label]\r\n\r\n\r\n        [label]: URL_to_image \"optional title\"\r\n\r\nExample:  \r\n`![Batman][000]`\r\n\r\n`[000]: https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTk-E0CVdOAiWPGhFwNQKUuTX-qZM2E0PQAebU0U45sl-6mt69h1w \"Batman\"`  \r\n\r\n###### Output:\r\n![Batman][000]\r\n\r\n[000]: https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTk-E0CVdOAiWPGhFwNQKUuTX-qZM2E0PQAebU0U45sl-6mt69h1w \"Batman\"'), TIMESTAMP '2015-06-13 17:43:09.831', TIMESTAMP '2015-06-13 17:54:44.339'),
(8, 'markdown - Manual Line Breaks', STRINGDECODE('    End a line with two or more spaces: ({{[clr-br] {space} }} denotes a space character )\r\n        This line has two spaces at the end,{{[clr-br] {space}{space} }}\r\n        So the next line will break like this;\r\n\r\n        Without spaces at the end,\r\n        it won''t break at all.\r\n\r\n    Sometimes you want blank lines between data (paragraph, table, image, ...) but Markdown won''t allow it.\r\n    Insert {{[clr-br] &nbsp;{space}{space} }} in that case.\r\n    \r\n        ###### This line is followed by a blank line and a line of sentence{{[clr-br] {space}{space} }}\r\n        {{[clr-br] &nbsp;{space}{space} }}\r\n        ###### Note the above blank line\r\n        \r\n###### Output:\r\nThis line has two spaces at the end,    \r\nSo the next line will break like this;\r\n\r\nWithout spaces at the end,\r\nit won''t break at all.\r\n\r\n###### This line is followed by a blank line and a line of sentence\r\n&nbsp;  \r\n###### Note the above blank line'), TIMESTAMP '2015-06-13 18:02:00.926', TIMESTAMP '2015-07-14 10:12:25.255'),
(9, 'markdown - Table (standard style)', STRINGDECODE('    First Header  | Second Header\r\n    ------------- | -------------\r\n    Content Cell  | Content Cell\r\n    Content Cell  | Content Cell\r\n###### Output:\r\nFirst Header  | Second Header\r\n------------- | -------------\r\nContent Cell  | Content Cell\r\nContent Cell  | Content Cell\r\n'), TIMESTAMP '2015-06-13 18:29:20.161', TIMESTAMP '2015-06-13 18:37:16.392'),
(10, 'markdown - Table (Github style)', STRINGDECODE('    | Left align | Right align | Center align |\r\n    |:-----------|------------:|:------------:|\r\n    |This        |This         |This     \r\n    |column      |column       |column    \r\n    |will        |will         |will     \r\n    |be          |be           |be      \r\n    |left        |right        |center    \r\n    |aligned     |aligned      |aligned\r\n\r\n###### Output:\r\n| Left align | Right align | Center align |\r\n|:-----------|------------:|:------------:|\r\n|This        |This         |This     \r\n|column      |column       |column    \r\n|will        |will         |will     \r\n|be          |be           |be      \r\n|left        |right        |center    \r\n|aligned     |aligned      |aligned'), TIMESTAMP '2015-06-13 18:31:43.561', TIMESTAMP '2015-06-13 18:37:31.893'),
(11, 'markdown - Backslash escapes', STRINGDECODE('Markdown provides backslash escapes for the following characters:\r\n\r\n    \\   backslash\r\n    `   backtick\r\n    *   asterisk\r\n    _   underscore\r\n    {}  curly braces\r\n    []  square brackets\r\n    ()  parentheses\r\n    #   hash mark\r\n    +   plus sign\r\n    -   minus sign (hyphen)\r\n    .   dot\r\n    !   exclamation mark'), TIMESTAMP '2015-06-24 17:01:38.77', TIMESTAMP '2015-07-12 14:05:41.954'),
(12, 'markdown - How to insert a literal | character inside table cells', STRINGDECODE('{{[clr-r] The | character is used to format tables in Markdown, but it is not escapable by backslash. }}\r\n\r\nFor instance, the following table won''t be rendered correctly\r\n\r\n###### Input:  \r\n\r\n    AND  | OR\r\n    -----|----\r\n    &&   | \\|\\|\r\n\r\n###### Output:\r\n\r\nAND  | OR\r\n-----|----\r\n&&   | \\|\\|\r\n&nbsp;  \r\n* * *\r\n**[Solution]** You can use a HTML entity number {{[clr-b] `&#124;` }} for the literal | in this case.\r\n\r\n###### Input:  \r\n\r\n    AND  | OR\r\n    -----|----\r\n    &&   | &#124;&#124;\r\n\r\n###### Output:\r\n\r\nAND  | OR\r\n-----|----\r\n&&   | &#124;&#124;'), TIMESTAMP '2015-07-09 07:58:13.305', TIMESTAMP '2015-07-14 10:12:42.235');

INSERT INTO PUBLIC.FRAGMENT(FRAGMENT_ID, TITLE, CONTENT, CREATION_DATETIME, UPDATE_DATETIME) VALUES
(13, 'markdown - Horizontal Lines', STRINGDECODE('Horizontal Lines:\r\n    * * *\r\n    - - -\r\n\r\n###### Output:\r\n* * *\r\n- - -\r\n'), TIMESTAMP '2015-07-12 14:03:36.466', TIMESTAMP '2015-07-12 14:05:02.605'),
(14, 'Fragment', STRINGDECODE('{{[clr-b] Fragment }} is a unit of data Civilizer manages for you.  \r\n\r\n>[Notice] The concept and idea have been borrowed from [Piggydb](http://piggydb.jp/en/d/1#r23 \"\").   \r\n>Some details are different, but I think the overall idea is almost identical with that of Piggydb.\r\n\r\nFor instance, following things can be Fragments:\r\n- knowledge/expertise for your job\r\n- temporary memo/notes\r\n- schedule/plan\r\n- detailed procedures you often forget for infrequent tasks\r\n  - e.g. installing printer drivers on your computers, submitting a tax return\r\n- expressions/vocabularies (e.g. when you learn a foreign language)\r\n- ideas/inspirations\r\n- todo list for your job or life\r\n- insightful maxims/proverbs\r\n- humors and etc.\r\n\r\nWhat you are reading right now is a Fragment too.\r\n\r\nFragments contain text mostly, but it can contain any format of data current Web technology (and your particular web browser) can deal with such as hyper links, images, videos, audio, etc.\r\n\r\nYou can edit a Fragment in {{[clr-y] Markdown }} markup language.  \r\nCivilizer comes with a sample exemplar database where explanations of basic Markdown rules are included as Fragment forms.( click this --> {{[tag] 1 }} )  \r\nAlso Civilizer has extra custom markup rules to reach some area Markdown doesn''t support and accomplish some of application-specific needs.\r\n\r\nFragments can be structured form of data (most of time, structured data is a lot more efficient than non-structured data) with:\r\n- {{[frgm]16 Tagging }}\r\n  - e.g. This Fragment is tagged with two terms (civilizer, concepts)\r\n- Relating one with another\r\n  - If you find two or more of Fragments that have similarities/contrasts or share some properties, you can relate them\r\n\r\n> [Notice] Each Fragment has to be tagged.    \r\n> As a rule, Civilizer does not allowed non-tagged Fragments.    \r\n> If you omit tagging when you save a Fragment, Civilizer will tag it as {{[clr-v] ''#untagged'' }}.  \r\n\r\n{{[clr-g] Recommendations in editing and managing a Fragment: }}\r\n- Keep it as concise as possible.\r\n  - If Fragments get too big, divide it into several small ones and relate them.\r\n- Attach meaningful tags.\r\n- Relate them if you find any relationship (even though it looks insignificant...) with another Fragment.\r\n- Bookmark Fragments you can think you access frequently.\r\n\r\n'), TIMESTAMP '2015-07-12 14:55:07.81', TIMESTAMP '2015-07-14 11:44:54.607'),
(15, 'Fragment Editor', STRINGDECODE('Fragments can be edited with the Fragment Editor which is basically a Markdown editor.\r\n\r\n##### Trigger the Fragment Editor for a new Fragment\r\n>Click a button {{[html] <span class=\"new-fragment-editor-trigger-on-toolbar\"><span class=\"fa fa-plus-square fa-1x\"></span></span> }} at the upper-left corner or bottom-left corner of the page.  \r\nThe buttons are visible all the time.\r\n\r\n##### Trigger the Fragment Editor for an existing Fragment\r\n> 1. {{[clr-y] Right click }} on the header of each Fragment.  \r\n>   - The header has a message such as {{[html] <span class=\"fa fa-wrench\"> Right Click for Menu</span> }} on it.  \r\n> 1. It will show you a context menu  \r\n> 1. Then click _**Edit**_  \r\n\r\n##### The editor consists of the following components (in a top to bottom order)\r\n1. Input for a Fragment Title\r\n1. Input for a Tag names\r\n1. Toolbar to assist you in inserting Markdown commands\r\n1. Text Area for your main content\r\n1. Buttons\r\n  1. Preview button\r\n    - To allow you to preview the HTML output from what you have written to the Main Content Text Area without saving anything\r\n  1. Save button\r\n    - To save the Fragment into the database\r\n\r\n##### Extra capabilities\r\n- You can drag around the editor:\r\n  - Grab the title bar (where the close button {{[html]<span class=\"fa fa-close warning-color\" ></span> is located }}) with your mouse holding down the left button\r\n    - Or the bottom area where Preview and Save buttons are located \r\n- You can resize the editor:\r\n- You can minimize/restore the editor by double clicking on the title bar\r\n'), TIMESTAMP '2015-07-13 11:03:27.823', TIMESTAMP '2015-07-14 10:12:34.429');

INSERT INTO PUBLIC.FRAGMENT(FRAGMENT_ID, TITLE, CONTENT, CREATION_DATETIME, UPDATE_DATETIME) VALUES
(16, 'Tags on Civilizer', STRINGDECODE('https://en.wikipedia.org/wiki/Tag_(metadata)\r\n\r\nIn Civilizer, a Tag is a metadata assigned to each Fragment and it lets you know what property that Fragment has or what category it belongs to.\r\n\r\nAccording to the above Wikipedia''s definition, a tag is a non-hierarchical keyword or term, but in Civilizer tags can have hierarchy which means that they can have parent or children tags.\r\n\r\nTagging doesn''t have any special rule so assigning which terms or words as your tags can be entirely up to you.'), TIMESTAMP '2015-07-14 11:40:19.495', TIMESTAMP '2015-07-14 11:44:22.072'),
(17, 'Basic Operations for Fragments', STRINGDECODE('###### Creating a new Fragment\r\nSee {{[frgm]15 Fragment Header }}.\r\n###### Editing an existing Fragment\r\nSee {{[frgm]15 Fragment Header }}.\r\n* * *\r\n###### Peeking a Fragment\r\nSome Fragments show only its ID and title such as those in {{[html] <span style=\"color:orange\" class=\"fa fa-bookmark\" >Bookmarks</span> }} and {{[html] <span style=\"color:coral\" class=\"fa fa-list-alt\" >&nbsp;Selection Box</span> }}.  \r\nYou can view content of a Fragment by clicking on the ID of the Fragment.  \r\n\r\n        An ID of a Fragment consists of a leading hash mark (#) and a ID number as in ''#20'')\r\n \r\nBy clicking on the ID, a pop-up window will appear at the lower-right corner of the page.  \r\nThe pop-up window is sticky so it will appear even when you scroll the page up and down.\r\n> [TIP] Double clicking on the title bar of the pop-up window will make the window minimized.    \r\n> Double clicking on the title once again will restore the window to the normal size.\r\n\r\n* * *\r\n###### Trashing a Fragment\r\nWhen you trash a Fragment, the Fragment will be sent to the Trashcan.  \r\nYou can simply restore it later if you want to.  \r\n\r\n1. Right Click on the header of the Fragment you''d like to trash.\r\n1. Click _**Trash**_.\r\n\r\n###### Deleting a Fragment\r\nYou can delete a Fragment already trashed into the Trashcan.  \r\nYou need to go to the Trashcan first prior to performing this operation.  \r\n\r\n1. Go to the Trashcan.\r\n  - Click the icon {{[html]<span style=\"color:gray\" class=\"fa fa-trash\"></span> }}on {{[html] <span style=\"color:green\" class=\"fa fa-tags\">&nbsp;&nbsp;Tag Palette</span> }} on your right side.\r\n1. Right Click on the header of Fragment you''d like to delete.\r\n1. Click _**Delete**_.\r\n\r\n###### Restoring Fragments from the Trashcan\r\n1. Go to the Trashcan\r\n  - Click the icon {{[html]<span style=\"color:gray\" class=\"fa fa-trash\"></span> }}on {{[html] <span style=\"color:green\" class=\"fa fa-list-alt\">&nbsp;&nbsp;Tag Palette</span> }} on your right side.\r\n1. Right Click on the header of Fragment you''d like to restore.\r\n1. Click _**Restore**_\r\n* * *\r\n###### Relating Fragments\r\n1. By Drag & Drop:\r\n  1. Drag a _**title**_ of a Fragment you''d like to relate.\r\n  1. Drop that title on the header of the other Fragment.\r\n1. By Selecting Fragments\r\n  1. First, select Fragments you''d like to relate with each other.\r\n    - Refer to the section of **''Selecting a Fragment''** below.\r\n  1. The selected Fragments will appear on the {{[html] <span style=\"color:coral\" class=\"fa fa-list-alt\" >&nbsp;Selection Box</span> }} on your right side\r\n  1. Right click anywhere on the empty area in the Selection Box.\r\n  1. Click _**Relate All**_ from the context menu.\r\n\r\n###### Bookmarking a Fragment\r\nYou can bookmark a Fragment that you think you access relatively more frequently.  \r\n\r\n1. Right Click on the header of Fragment you''d like to bookmark.\r\n1. Click _**Bookmark**_\r\n1. Then the title of your bookmarked Fragment will appear on the {{[html] <span style=\"color:orange\" class=\"fa fa-bookmark\" >Bookmarks</span> }} panel on your right side.\r\n\r\n###### Selecting a Fragment\r\nYou can select Fragments by checking the checkbox which is the leftmost component inside each Fragment''s header.  \r\n\r\nBy selecting a Fragment, it will appear on the {{[html] <span style=\"color:coral\" class=\"fa fa-list-alt\" >&nbsp;Selection Box</span> }} on your right side.\r\n\r\nYou can perform a few operations for multiple selected Fragments by right clicking anywhere on the empty area in the Selection Box:\r\n- Trashing selected Fragments at once.\r\n- Relating selected Fragments simultaneously.\r\n- Accessing selected Fragments like you can do with Bookmarks.\r\n\r\n> [NOTE] Selected Fragments will be stored in your browser''s storage NOT in the server storage.    \r\n> For instance, if your session expires, they will be gone.    \r\n> To capture Fragments in a persistent manner (storing them into the server), use Bookmaring.'), TIMESTAMP '2015-07-14 11:49:21.584', TIMESTAMP '2015-07-14 14:32:57.223');

INSERT INTO PUBLIC.FRAGMENT(FRAGMENT_ID, TITLE, CONTENT, CREATION_DATETIME, UPDATE_DATETIME) VALUES
(18, 'Panels on Civilizer', STRINGDECODE('In Civilizer, a _**Panel**_ is a rectangular layout containing Fragments.  \r\n\r\nThe main purposes of Panels are :\r\n- To show two or more Fragments simultaneously on the same page.\r\n- Thus, to greatly reduce going back and forth across the pages.\r\n- And to greatly help you when you need to review many Fragments at once.\r\n\r\nCivilizer has a maximum of 3 Panels but it shows only one by default.\r\n\r\nSo you can manage a maximum of 3 categories of Fragments simultaneously. For instance,\r\n1. On Panel 0, you can view or edit Fragments of a specific topic.\r\n1. On Panel 1, you can view other related Fragments for a reference purpose.\r\n1. On Panel 2, you can view results from a specific search phrase.\r\n\r\nClicking each icon {{[html] <span class=\"fa fa-desktop\"></span>}} on the header will toggle each Panel.\r\n\r\nAlso each Panel has its own scroll bar so scrolling one Panel doesn''t affect the other Panels.'), TIMESTAMP '2015-07-14 15:03:23.841', TIMESTAMP '2015-07-14 15:05:08.167'),
(19, 'Basic Operations for Tags', STRINGDECODE('###### Creating a Tag\r\n- You can insert new tags whenever you edit Fragments.\r\n- Or click the icon {{[html] <span class=\"fa fa-tag ui-panel ui-widget-content ui-corner-all\">+</span> }} on {{[html] <span style=\"color:green\" class=\"fa fa-tags\">&nbsp;&nbsp;Tag Palette</span> }} on your right side.\r\n\r\n###### Editing a Tag\r\n1. Right click on the tag you''d like to edit.\r\n1. Click _**Edit**_.\r\n1. A _**Tag Editor**_ will appear.\r\n  - You can rename the tag by clicking the tag name at the top.\r\n  - You can change the hierarchy of the tag.\r\n    - There are two panels in the middle denoting parent tags on the left and child tags on the right.\r\n    - By clicking ''**+**'', a listbox of selectable tags will appear.\r\n    - You can insert a new parent or child by:\r\n      - Selecting a tag from the listbox.\r\n      - Then, click the {{[html]<span class=\"fa fa-check\"></span> }} button.\r\n      - When you have too many tags to select from, just type some text in the input box to filter out what you want.\r\n\r\n###### Trashing a Tag\r\n1. Right click on the tag you''d like to edit.\r\n1. Click _**Trash**_.\r\n1. Click OK button on the confirm dialog\r\n  - If the tag contains one or more Fragments, the Fragments will be trashed.\r\n    - But the tag itself will remain.\r\n  - If the tag contains no Fragment, the tag will disappear from the storage.\r\n\r\n> [NOTICE] You can also perform the above operations for tag icons located on other areas such as Fragment headers.'), TIMESTAMP '2015-07-14 15:22:02.941', TIMESTAMP '2015-07-14 15:52:35.384');

INSERT INTO PUBLIC.TAG(TAG_ID, TAG_NAME) VALUES
(1, 'markdown'),
(2, 'tips'),
(3, 'civilizer'),
(4, 'concepts'),
(5, 'manual');

INSERT INTO PUBLIC.TAG2FRAGMENT(TAG2FRAGMENT_ID, TAG_ID, FRAGMENT_ID) VALUES
(3, 1, 2),
(4, 1, 1),
(5, 1, 3),
(8, 1, 4),
(14, 1, 5),
(20, 1, 6),
(24, 1, 7),
(31, 1, 9),
(32, 1, 10),
(66, 1, 13),
(69, 1, 11),
(70, 2, 11),
(76, 1, 12),
(77, 2, 12),
(78, 1, 8),
(137, 3, 15),
(138, 5, 15),
(141, 3, 16),
(142, 4, 16),
(143, 3, 14),
(144, 4, 14),
(181, 3, 17),
(182, 5, 17),
(187, 3, 18),
(188, 4, 18),
(221, 3, 19),
(222, 5, 19);

INSERT INTO PUBLIC.FRAGMENT2FRAGMENT(FRAGMENT2FRAGMENT_ID, FROM_ID, TO_ID) VALUES
(1, 7, 6),
(2, 6, 7),
(5, 2, 5),
(6, 5, 2),
(7, 1, 5),
(8, 5, 1),
(9, 9, 10),
(10, 10, 9),
(11, 11, 12),
(12, 12, 11),
(15, 9, 12),
(16, 12, 9),
(17, 14, 15),
(18, 15, 14),
(19, 14, 17),
(20, 17, 14),
(21, 16, 19),
(22, 19, 16);

{'fraction_non_alphanumeric': 0.17444880526376544, 'fraction_numerical': 0.05139674477663627, 'mean_word_length': 3.013086276780544, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 88, 'https://': 9, 'lorem ipsum': 0, 'www.': 8, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1352841', 'n_tokens_mistral': 13912, 'n_tokens_neox': 12339, 'n_words': 4001}