## semediawiki-user

 [Semediawiki-user] Calculating max From: Ante Perkovic - 2011-04-19 20:44:52 ```Hi! Does anyone knows how to calculate max of array of numbers, like max (2,3,11.5)? Ante -- http://deepskypedia.com ```
 Re: [Semediawiki-user] Calculating max From: Jeroen De Dauw - 2011-04-19 21:08:54 ```Hey, > Does anyone knows how to calculate max of array of numbers, like max (2,3,11.5)? This function of ArrayExtension might get you there: https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Extension:ArrayExtension#arraysort I'm quite sure SMW does not have anything to get the max value of an array, so this question is probably more suitable for the general MediaWiki list: wikitech-l@... Cheers -- Jeroen De Dauw http://www.bn2vs.com Don't panic. Don't be evil. -- ```
 Re: [Semediawiki-user] Calculating max From: Patrick Nagel - 2011-04-20 00:10:35 ```Well, there is the 'max' result format, which would give the maximum value of values in a query result set: http://www.mediawiki.org/wiki/Extension:Semantic_Result_Formats#Math But since he specifically said "array", he is probably not interested in that. Patrick. Jeroen De Dauw wrote: >Hey, > >> Does anyone knows how to calculate max of array of numbers, like max >(2,3,11.5)? > >This function of ArrayExtension might get you there: >https://secure.wikimedia.org/wikipedia/mediawiki/wiki/Extension:ArrayExtension#arraysort > >I'm quite sure SMW does not have anything to get the max value of an >array, >so this question is probably more suitable for the general MediaWiki >list: >wikitech-l@... > >Cheers > >-- >Jeroen De Dauw >http://www.bn2vs.com >Don't panic. Don't be evil. >-- >------------------------------------------------------------------------------ >Benefiting from Server Virtualization: Beyond Initial Workload >Consolidation -- Increasing the use of server virtualization is a top >priority.Virtualization can reduce costs, simplify management, and >improve >application availability and disaster protection. Learn more about >boosting >the value of server virtualization. >http://p.sf.net/sfu/vmware-sfdev2dev >_______________________________________________ >Semediawiki-user mailing list >Semediawiki-user@... >https://lists.sourceforge.net/lists/listinfo/semediawiki-user -- Sent from my phone. ```
 [Semediawiki-user] How to get a list of pages with a given property From: - 2011-04-20 05:39:35 ```I've been banging my head against something that ought to be obvious, but whatever is in all the tutorials still doesn't seem to make it obvious to me: I have pages that use a specific property of type "page" but I can't seem to be able to create a list anywhere of all the pages that have that specific page property assigned to it. Whatever the template engine generates is totally useless and gives no results. {{#ask:[[Widget Type::{{SUBJECTPAGENAME}}]]|format=list}} returns absolutely nothing even though for the given page, that specific "widget type" is linked all over the place. Is there a tutorial somewhere that explains how to generate the equivalent of queries? It seems useless to have all this data in a semantics wiki without being able to generate queries. Thanks. ```
 Re: [Semediawiki-user] How to get a list of pages with a given property From: Dan Bolser - 2011-04-21 12:19:24 ```On 20 April 2011 06:39, wrote: > I've been banging my head against something that ought to be obvious, but > whatever is in all the tutorials still doesn't seem to make it obvious to me: > > I have pages that use a specific property of type "page" but I can't seem to be > able to create a list anywhere of all the pages that have that specific page > property assigned to it. Whatever the template engine generates is totally > useless and gives no results. > > {{#ask:[[Widget Type::{{SUBJECTPAGENAME}}]]|format=list}} Strange. Have you tried creating a template with an aggregation as described here [1]: "... template can also be used for aggregation, by displaying a list of all other pages that have a certain relationship to this page (see the inline queries documentation for much more information on this). The easiest way to create templates is using the 'CreateTemplate' special page (see above)." I'm assuming that {{#ask:[[Widget Type::+}} does give you what you expect? > returns absolutely nothing even though for the given page, that specific "widget > type" is linked all over the place. > > Is there a tutorial somewhere that explains how to generate the equivalent of > queries? It seems useless to have all this data in a semantics wiki without > being able to generate queries. http://semantic-mediawiki.org/index.php/Help:Inline_queries > Thanks. > ------------------------------------------------------------------------------ > Benefiting from Server Virtualization: Beyond Initial Workload > Consolidation -- Increasing the use of server virtualization is a top > priority.Virtualization can reduce costs, simplify management, and improve > application availability and disaster protection. Learn more about boosting > the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev > _______________________________________________ > Semediawiki-user mailing list > Semediawiki-user@... > https://lists.sourceforge.net/lists/listinfo/semediawiki-user > ```
 Re: [Semediawiki-user] How to get a list of pages with a given property From: Dan Bolser - 2011-04-21 12:36:54 ```On 21 April 2011 13:19, Dan Bolser wrote: > On 20 April 2011 06:39,   wrote: >> I've been banging my head against something that ought to be obvious, but >> whatever is in all the tutorials still doesn't seem to make it obvious to me: >> >> I have pages that use a specific property of type "page" but I can't seem to be >> able to create a list anywhere of all the pages that have that specific page >> property assigned to it. Whatever the template engine generates is totally >> useless and gives no results. >> >> {{#ask:[[Widget Type::{{SUBJECTPAGENAME}}]]|format=list}} Seems to work in general, for example, it's used here: http://semantic-mediawiki.org/wiki/Help:Displaying_numerical_distributions {{#ask:[[Has country::{{PAGENAME}}]]|format=count}} > Strange. Have you tried creating a template with an aggregation as > described here [1]: > >        "... template can also be used for aggregation, by displaying > a list of all other pages that have a certain relationship to this > page (see the inline queries documentation for much more information > on this). The easiest way to create templates is using the > 'CreateTemplate' special page (see above)." > > I'm assuming that {{#ask:[[Widget Type::+}} does give you what you expect? > > >> returns absolutely nothing even though for the given page, that specific "widget >> type" is linked all over the place. >> >> Is there a tutorial somewhere that explains how to generate the equivalent of >> queries? It seems useless to have all this data in a semantics wiki without >> being able to generate queries. > > http://semantic-mediawiki.org/index.php/Help:Inline_queries > > >> Thanks. >> ------------------------------------------------------------------------------ >> Benefiting from Server Virtualization: Beyond Initial Workload >> Consolidation -- Increasing the use of server virtualization is a top >> priority.Virtualization can reduce costs, simplify management, and improve >> application availability and disaster protection. Learn more about boosting >> the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev >> _______________________________________________ >> Semediawiki-user mailing list >> Semediawiki-user@... >> https://lists.sourceforge.net/lists/listinfo/semediawiki-user >> > ```