List of Sourcecodes

From OPENRESEARCH th copy Wiki
Jump to navigation Jump to search
iconTopicnamepluralNamedocumentation
File:SourceCodeLogo-64px.pngSourcecodeSourcecodeSourcecodessome sourcecode

Sourcecodes

8 Sourcecodes:

Sourcecodeidlangauthorsincetexturl
CreateHelpPageTestCreateHelpPageTestjinjaTim Holzheim5 February 2021
<pre><br />{% set pagetitle = ""%}<br />{% set pagetitle_prefix = "Help:"%}<br />[[File:Help_Icon.png|right]]<br />== Help for {{ row.name }} ==<br />{% raw %}{{{% endraw %}#ask: [[Topic name::{{ row.name }}]]<br />|mainlabel=-<br />|?Topic icon = icon<br />|? = Topic<br />|?Topic name = name<br />|?Topic pluralName = pluralName<br />|?Topic documentation = documentation<br />{% raw %}}}{% endraw %}<br />=== Documentation ===<br />{{ row.documentation }}<br />=== Example {{ row.pluralName }} ===<br />{% raw %}{{{% endraw %}#ask: [[Concept:{{ row.name }}]]{% raw %}}}{% endraw %}<br />=== Properties ===<br /><br />{% raw %} {{ {% endraw %}#ask: [[Concept:Property]][[Property topic::Concept:{{ row.name }}]]<br />|mainlabel={{ row.name }}<br />{% for page in smw.query("[[Concept:Property]][[Property topic::Concept:Property]]|?Property name = name").values() %}<br />| ?Property {{ page.name }} = {{ page.name }} <br />{%endfor%}<br />|order=ascending<br />| limit={% if row.listlimit %} {{ row.listlimit }} {% else %} 200 {% endif %}<br />{% raw %} }} {% endraw %}<br /><br />{{ row.uml }}<br />{{ row.seealso }}<br />[[Category:{{ row.Topic }}]]<br /></pre>
CreateListOfCreateListOfjinjaTim Holzheim9 February 2021
<pre><br />{% set pagetitle = ""%}<br />{% set pagetitle_prefix = "ListOf:"%}<br /><br />{% raw %} {{ {% endraw %}#ask: [[Topic name::{{ row.name }}]]<br />|mainlabel={{ row.name }}<br />{% for page in smw.query("[[Property topic::Concept:Topic]]|?Property name = name").values() %}<br />| ?Topic {{ page.name }} = {{ page.name }} <br />{%endfor%}<br />|order=ascending<br />| limit={% if row.listlimit %} {{ row.listlimit }} {% else %} 200 {% endif %}<br />{% raw %} }} {% endraw %}<br /><br />== {{ row.pluralName }} ==<br />{% raw %}{{{% endraw %}#forminput:form={{ row.name }}|button text=add {{ row.name }}{% raw %}}}{% endraw %}<br />{% raw %}{{{% endraw %}#ask: [[Concept:{{ row.name}}]]|format=count{% raw %}}}{% endraw %} {{ row.pluralName }}:<br /><br />{% raw %} {{ {% endraw %}#ask: [[Concept:{{ row.name }}]]<br />|mainlabel={{ row.name }}<br />{% for page in smw.query("[[Property topic::" + row.Topic +"]]|? Property name = name").values() %}<br />| ?{{row.name}} {{ page.name }} = {{ page.name }} <br />{%endfor%}<br />|order=ascending<br />| limit={% if row.listlimit %} {{ row.listlimit }} {% else %} 200 {% endif %}<br />{% raw %} }} {% endraw %}<br />[[Category:{{ row.name }}]]<br /></pre>
CreateTopicFormCreateTopicFormjinjaTim Holzheim14 February 2021
<pre><br />{% set pagetitle = "" %}<br />{% set pagetitle_prefix = "Template:"%}<br />{%- set properties = [] -%}<br />{% for p in smw.query("[[Concept:Property]][[Property topic::Concept:Property]]|?Property name = name").values() %}<br />{%- set dump = properties.append(p["name"]) -%}<br />{%- endfor %}<br />{%- set topic_properties = [] -%}<br />{% for p in smw.query("[[Property topic::" + row.Topic + "]]|?Property name = name").values() %}<br />{%- set dump = topic_properties.append(p["name"]) -%}<br />{%- endfor %}<br />{%- set property_printouts = namespace(query_vars="") %}<br />{% for p in properties %}<br />{%- set property_printouts.query_vars = property_printouts.query_vars + "|?Property " + p + "=" + p -%}<br />{%- endfor %}<br />{%- set topic_property_properties = [] -%}<br />{% for pp in smw.query("[[Property topic::" + row.Topic + "]]" + property_printouts.query_vars).values() %}<br />{%- set dump = topic_property_properties.append(pp) -%}<br />{%- endfor %}<br />{%- set property_properties = [] -%}<br />{% for pp in smw.query("[[Property topic::Concept:Property]]" + property_printouts.query_vars).values() %}<br />{%- set dump = property_properties.append(pp) -%}<br />{%- endfor %}<br /><noinclude><br />This is the {{'{{'}}smartMediaWiki{{'}}'}}-Form for "{{ row.name }}".<br /><br />Create a new {{ row.name }} by entering a new pagename for a {{ row.name }}<br />into the field below. <br /><br />If you enter an existing {{ row.name }} pagename - you will edit the {{ row.name }}<br />with that pagename.<br />{{'{{'}}#forminput:form={{ row.name }}|values from concept=Topic{{'}}'}}<br /></noinclude><br /><includeonly><br /><div id="wikiPreview" style="display: none; padding-bottom: 25px; margin-bottom: 25px; border-bottom: 1px solid #AAAAAA;"></div><br />{{'{{{'}}section|{{ row.name }}|level=1|hidden{{'}}}'}}<br />= {{ row.name }} =<br /><br /><!-- {{ row.name }} --><br />{{'{{{'}}for template|{{ row.name }}{{'}}}'}}<br />{| class="wikitable"<br />! colspan='2'| {{ row.name }}<br />{% for pp in topic_property_properties %}<br />|-<br />! {{ pp["name"] }}: <br /><!-- {{ pp["type"] }} {{ pp["name"] }} --><br />| {{'{{{'}}field<br />    |{{ pp["name"] }}<br />    |property={{ row.name }} {{ pp["name"] }}<br />    |size= {%- if pp["size"] -%} {{ pp["size"] }} {% else %} 80 {% endif %}<br />    {%- if pp["mandatory"] and (pp["mandatory"] == 'True' or pp["mandatory"] == 'T' or pp["mandatory"] == 't' or pp["mandatory"] == 'true') -%}|mandatory {%- endif %}<br />    {%- if pp["inputType"] -%}|input type={{ pp["inputType"] }} {% endif %}<br />    {%- if pp["allowedValues"] -%}|values={{ pp["allowedValues"] }} {% endif %}<br />    {%- if pp["values from "] -%}|values from {{ pp["values from "] }} {% endif %}<br />    {%- if pp["default"] -%}|default={{ pp["default"] }} {% endif %}<br />{{'}}}'}}<br />{%- endfor %}<br />|-<br />|}<br /><br />{{'{{{'}}field|storemode|default=property|hidden{{'}}}'}}<br />{{'{{{'}}end template{{'}}}'}}<br /><br /><!-- Topic --><br />{{'{{{'}}section|properties|level=1|hidden{{'}}}'}}<br />= properties =<br /><br /><!-- Property --><br />{{'{{{'}}for template|Property|multiple{{'}}}'}}<br />{| class="wikitable"<br />! colspan='2'| Property<br /><br />{% for pp in property_properties %}<br />|-<br />! {{ pp["name"] }}: <br /><!-- {{ pp["type"] }} {{ pp["name"] }} --><br />| {{'{{{'}}field<br />    |{{ pp["name"] }}<br />    |property=Property {{ pp["name"] }}<br />    |size= {%- if pp["size"] -%} {{ pp["size"] }} {% else %} 80 {% endif %}<br />    {%- if pp["mandatory"] and (pp["mandatory"] == 'True' or pp["mandatory"] == 'T' or pp["mandatory"] == 't' or pp["mandatory"] == 'true') -%}|mandatory {%- endif %}<br />    {%- if pp["inputType"] -%}|input type={{ pp["inputType"] }} {% endif %}<br />    {%- if pp["allowedValues"] -%}|values={{ pp["allowedValues"] }} {% endif %}<br />    {%- if pp["values from "] -%}|values from {{ pp["values from "] }} {% endif %}<br />    {%- if pp["default"] -%}|default={{ pp["default"] }} {% endif %}<br />{{'}}}'}}<br />{%- endfor %}<br />|-<br />|}<br />{{'{{{'}}field|storemode|default=property|hidden{{'}}}'}}<br />{{'{{{'}}end template{{'}}}'}}<br /><!-- Property --><br /><headertabs/><br />{{'{{{'}}section|Freitext|level=1|hidden{{'}}}'}}<br />=Freitext=<br />{{'{{{'}}standard input|free text|rows=10{{'}}}'}}<br />{{'{{{'}}standard input|summary{{'}}}'}}<br /><br />{{'{{{'}}standard input|changes{{'}}}'}}<br /><br />{{'{{{'}}standard input|save{{'}}}'}}<br />{{'{{{'}}standard input|cancel{{'}}}'}}<br /></includeonly><br /></pre>
CreateTopicTemplateCreateTopicTemplatejinjaTim Holzheim14 February 2021
<pre><br />{% set pagetitle = "" %}<br />{% set pagetitle_prefix = "Template:"%}<br />{%- set property_properties = [] -%}<br />{% for p in smw.query("[[Concept:Property]][[Property topic::Concept:Property]]|?Property name = name").values() %}<br />{%- set dump = property_properties.append(p["name"]) -%}<br />{%- endfor %}<br />{%- set topic_properties = [] -%}<br />{% for p in smw.query("[[Property topic::" + row.Topic + "]]|?Property name = name").values() %}<br />{%- set dump = topic_properties.append(p["name"]) -%}<br />{%- endfor %}<br /><noinclude><br />  <br /></noinclude><br /><includeonly><br />  {% raw %}<br />{{#switch:{{{storemode|}}}<br />  {% endraw %}<br />    |none=<br />    |subobject=<br />      {{'{{'}}#subobject:-<br />        |isA={{ row.name }}<br />        {% for p in topic_properties%}<br />        |{{ row.name }} {{ p }}={{ '{{{' }}{{p}}|{{ '}}}' }}<br />        {%- endfor %}<br />      {{'}}'}}<br /><br />    |#default=<br />      {{ '{{' }}#set:<br />        |isA={{ row.name }}<br />        {% for p in topic_properties%}<br />        |{{ row.name }} {{ p }}={{ '{{{' }}{{p}}|{{ '}}}' }}<br />        {%- endfor %}<br />      {{'}}'}}<br />  {{'}}'}}<br /><br />  {% raw %}<br />{{#switch: {{{viewmode|}}}<br />  {% endraw %}<br />    |hidden=<br />    |masterdetail=<br />= properties =<br />      {{ '{{' }}#ask:[[Concept:Property]][[Property topic::{{row.Topic}}]]<br />      {% for p in property_properties%}<br />      |?Property {{ p }} = {{ p }}<br />      {%- endfor %}<br />        |sort=Property name<br />        |order=ascending<br />      {{' }}' }}<br />    |tableheader={{ '{{{!}}' }} class='wikitable'<br />      {% for p in topic_properties%}<br />        !{{ p }}!<br />      {%- endfor %}<br />      {{ '{{!}}-' }}<br />    |tablerow=<br />      {% for p in topic_properties%}<br />        {{ '{{!}}{{{' }}{{p}}{{ '|}}}{{!}}' }}<br />      {%- endfor %}<br />      -<br />    |tablefooter={{ '{{!}}}' }}<br />    |labelfield=<br />      {% for p in topic_properties%}<br />        {{ p }}={{ '={{#if:{{{' }}{{ p }}{{ '|}}}|{{{' }}{{ p }}{{ '|}}}|}}<br>' }}<br />      {%- endfor %}<br />    |#default=<br />      {{ '{{{!}} ' }}class='wikitable'<br />        ! colspan='2' {{ '{{!}}' }}{{row.name}}<br />        {{ '{{!}}' }}-<br />        {{ '{{#switch:{{{storemode|}}}' }}<br />          |property=<br />            ! colspan='2' style='text-align:left' {{ '{{!}}' }} {{ '{{' }}Icon|name=edit|size=24{{ '}}' }}{{ '{{' }}Link|target=Special:FormEdit/{{ row.name }}/{{ '{{FULLPAGENAME}}' }}|title=edit{{ '}}' }}<br />            {{ '{{!}}' }}-<br />        {{ '}}' }}<br />        {% for p in topic_properties%}<br />          !{{ p }}<br />          {{ '{{!}}' }}<br />            {{ ' {{#if:{{{' }}{{ p }}{{ '|}}}|{{{' }}{{ p }}{{ '|}}}|}}' }}<br />            {{ '{{!}}-' }}<br />        {% endfor %}<br />      {{ '{{!}}}' }}<br />  {{ '}}' }}<br /><br /></includeonly><br /></pre>
DblpConfSeriesQueryDblpConfSeriesQuerysqlWolfgang Fahl31 January 2021
select conf,title,count(*) as count,min(year) as minYear,max(year) as maxYear
from proceedings 
where conf is not null
group by conf
order by 2 desc
EchoCodeEchoCodepythonWolfgang Fahl31 January 2021
# this is a lambda Action action
# it get's its context from a context dict
rows=context["rows"]
for row in rows:
    print(row)
context["result"]={"message":"%d rows printed" %len(rows)}
TopicQueryTopicQuerysmw9 February 2021
<pre><br />[[Concept:Topic]] |mainlabel=Topic<br />| ?Topic name = name<br />| ?Topic pluralName = pluralName<br />| ?Topic icon = icon<br />| ?Topic iconUrl = iconUrl<br />| ?Topic documentation = documentation<br />| ?Topic wikiDocumentation = wikiDocumentation<br />| ?Topic defaultstoremode = defaultstoremode<br />| ?Topic listLimit = listLimit<br />| ?Topic cargo = cargo<br />| ?Topic headerTabs = headerTabs<br />| ?Topic context = context<br /></pre>
WikiDataConferenceSeriesSparqlQueryWikiDataConferenceSeriesSparqlQuerysparqlWolfgang Fahl31 January 2021
# Conference Series wikidata query
# see https://confident.dbis.rwth-aachen.de/dblpconf/wikidata
# WF 2021-01-30
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT ?confSeries ?display_name ?confSeriesLabel ?official_website ?DBLP_pid ?WikiCFP_pid ?GND_pid
WHERE 
{
  #  scientific conference series (Q47258130) 
  ?confSeries wdt:P31 wd:Q47258130.
  OPTIONAL { ?confSeries wdt:P1813 ?short_name . }
  BIND (COALESCE(?short_name,?confSeriesLabel) AS ?display_name).
  #  official website (P856) 
  OPTIONAL {
    ?confSeries wdt:P856 ?official_website
  } 
  # any item with a DBLP venue ID 
  OPTIONAL {
    ?confSeries wdt:P8926 ?DBLP_pid.
  }
  # WikiCFP pid 
  optional {
     ?confSeries wdt:P5127 ?WikiCFP_pid.
  }
  # GND pid
  optional {
    ?confSeries wdt:P227 ?GND_pid.
  }
  # label 
  ?confSeries rdfs:label ?confSeriesLabel filter (lang(?confSeriesLabel) = "en").
}
ORDER BY (?display_name)

Category:Sourcecode