Changes between Version 11 and Version 12 of ZooWebSite/2015/Code/ZOO-Services/Hello


Ignore:
Timestamp:
Feb 26, 2015, 11:54:31 AM (10 years ago)
Author:
nickboz
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ZooWebSite/2015/Code/ZOO-Services/Hello

    v11 v12  
    4646                            <img src="/img/zoo-camel.png" class="img-responsive circb center-block mb" width="32" height="32"/>Perl
    4747                </a>
     48                <a href="#" class="list-group-item list-group-item2 text-center">
     49                            <img src="/img/zoo-ruby.png" class="img-responsive circb center-block mb" width="32" height="32"/>Ruby
     50                </a>
    4851              </div>
    4952            </div>
     
    7780                </div>
    7881
    79 <!--C section -->
    80                 <div class="bhoechie-tab-content">
    81                     <center>
    82 <h3>C</h3>
    83 <pre class="language-c">
    84 <code>printf</code>
    85 </pre>
    86                     </center>
    87                 </div>
    8882
    89 <!--Fortran section -->
    90 <div class="bhoechie-tab-content">
    91 <center>
    92 <h3>Fortran</h3>
    93 <pre class="language-fortran">
    94 <code>Integer FUNCTION HELLOF(zoo_main_cfg,zoo_inputs,zoo_outputs)
    95      & RESULT (R)
    96        Integer R, ls, iLenStr
    97        CHARACTER*(1024) zoo_main_cfg(10,30),zoo_inputs(10,30),
    98      & zoo_outputs(10,30)
    99         CHARACTER*(1024) TMP
    100 
    101        write(0,*) 'Hello '//zoo_inputs(4,1)//' from the Fortran world !'
    102 
    103        ls = iLenStr(zoo_inputs(4,1))
    104        TMP = zoo_inputs(4,1)
    105        zoo_outputs(1,1) = 'name'//CHAR(0)
    106        zoo_outputs(2,1) = 'result'//CHAR(0)
    107        zoo_outputs(3,1) = 'value'//CHAR(0)
    108        zoo_outputs(4,1) = 'Hello '//TMP(1:ls)//
    109      & ' from the Fortran world !'//CHAR(0)
    110        zoo_outputs(5,1) = 'datatype'//CHAR(0)
    111        zoo_outputs(6,1) = 'string'//CHAR(0)
    112 
    113        R = 3
    114        Return
    115        END
    116 
    117        Integer Function iLenStr(cString)
    118        Character*(*) cString
    119        Integer       iLen,i
    120 
    121       iLen = Len(cString)
    122       Do i=iLen,1,-1
    123          If(ichar(cString(i:i)).NE.0) Goto 10
    124       EndDo
    125       i = 1
    126   10  Continue
    127       iLenStr = i
    128 
    129       Return
    130       End Function iLenStr/code>
    131 </pre>
    132 </code>
    133                     </center>
    134                 </div>
    135 
    136 
    137 <!--Java section -->
    138                 <div class="bhoechie-tab-content">
    139                     <center>
    140 <h3>Java</h3>
    141 <pre class="language-java">
    142 <code>import java.lang.*;
    143 import java.util.*;
    144         public class HelloJava {
    145             public static int HelloWorldJava(HashMap conf,HashMap inputs, HashMap outputs) {
    146                 HashMap tmp=(HashMap)(inputs.get("S"));
    147                 String v=tmp.get("value").toString();
    148                 HashMap hm1 = (HashMap)(outputs.get("Result"));
    149                 hm1.put("value",ZOO._("Hello "+v+" from JAVA World !!"));
    150                 return ZOO.SERVICE_SUCCEEDED;
    151             }
    152         }
    153 </code>
    154 </pre>
    155                     </center>
    156                 </div>
    15783
    15884<!--PHP section -->
     
    187113                </div>
    188114
    189 
     115<!--Ruby section -->
     116                <div class="bhoechie-tab-content">
     117                    <center>
     118<h3>Ruby</h3>
     119<pre class="language-ruby">
     120<code>[def helloRuby(conf,inputs,outputs)
     121  a=Zoo::Translate("Hello")
     122  b=Zoo::Translate("from the ruby world !")
     123  outputs["Result"]["value"]=Zoo::Translate("#{a} #{inputs["s"]["value"]} #{b}")
     124  return Zoo::SERVICE_SUCCEEDED
     125end
     126lruby-static
     127RUBYLDFLAGS=-L/usr/local/ruby-2.1.0/lib -lruby-static
     128</code>
     129</pre>
     130                    </center>
     131                </div>
    190132
    191133            </div>

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png