Template:Index/formula
From Metabolomics.JP
(Difference between revisions)
| (13 intermediate revisions by one user not shown) | |||
| Line 1: | Line 1: | ||
| − | <noinclude>名前のインデクス {{{1}}} 原子 {{{2}}} 数 {{{3}}} | + | <noinclude>名前のインデクス {{{1}}} 原子 {{{2}}} 数 {{{3}}} ページタイトル {{{4}}} タイトル候補リスト(&&区切り)</noinclude> |
| − | + | {{Warning/Persist}} | |
| + | |||
{| width=100% | {| width=100% | ||
|- | |- | ||
| − | |align=left| {{Index/persist| | + | |align=left| |
| − | |align=right| {{Index/persist| | + | {{#repeat:Index/persist|6|{{#cdr: |
| + | {{#lua: | ||
| + | local output = ""; | ||
| + | for id in stdin:gmatch("&&(%w+)") do | ||
| + | output = output.."%formula%{{{1}}}%{{#expr:{{{2}}}-1}}%Index/formula%"..id.."%{{{4}}}"; | ||
| + | end | ||
| + | print(output); |{{{4}}} }} |%}}|%}} | ||
| + | |align=center| [[Index:{{{3}}}|<big>Back to Index</big>]] | ||
| + | |align=right| | ||
| + | {{#repeat:Index/persist|6|{{#cdr: | ||
| + | {{#lua: | ||
| + | local id; | ||
| + | local output = ""; | ||
| + | for id in stdin:gmatch("&&(%w+)") do | ||
| + | output = output.."%formula%{{{1}}}%{{#expr:{{{2}}}+1}}%Index/formula%"..id.."%{{{4}}}"; | ||
| + | end | ||
| + | print(output);|{{{4}}} }} |%}}|%}} | ||
|} | |} | ||
| − | + | <hr> | |
{| class="wikitable" style="width=100%; margin: 1em auto; border-width:0px 0px 0px 0px;" | {| class="wikitable" style="width=100%; margin: 1em auto; border-width:0px 0px 0px 0px;" | ||
|- style="background:#ccf" | |- style="background:#ccf" | ||
{{#repeat:IndexTable|1| | {{#repeat:IndexTable|1| | ||
{{#lua: | {{#lua: | ||
| − | local id, | + | local id, formula; |
| + | local pat = "{{{1|C}}}{{{2|20}}}"; | ||
local hash = {}; | local hash = {}; | ||
local idx = {}; | local idx = {}; | ||
| − | |||
for id, formula in stdin:gmatch("&&(%w+)&&([%a%d]+)") do | for id, formula in stdin:gmatch("&&(%w+)&&([%a%d]+)") do | ||
| − | + | if (formula.match(formula, pat) ~= null) then | |
| − | + | if (hash[formula] == null) | |
| − | + | then hash[formula] = id; | |
| − | + | table.insert(idx, formula); | |
| − | + | else hash[formula] = hash[formula].."&&"..id; | |
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
| − | + | ||
end | end | ||
end | end | ||
| Line 37: | Line 47: | ||
end | end | ||
print(output); | print(output); | ||
| − | | | + | |{{#formula:{{{3|FL1C99}}}}} |
}} | }} | ||
}} | }} | ||
|} | |} | ||
Latest revision as of 03:01, 25 March 2009
名前のインデクス {{{1}}} 原子 {{{2}}} 数 {{{3}}} ページタイトル {{{4}}} タイトル候補リスト(&&区切り)
Do not edit! This page is automatically generated using Persist function (Last updated: 20090325030110).
| [[Index:{{{3}}}|Back to Index]] |