Files
CodeShare/Source/assets/html/doc.twig
José Luis Garrido Labrador 54b7c70adc Migrating to Silex
2018-09-21 13:18:46 +02:00

45 lines
4.2 KiB
Twig

{% extends app.fronthtml~"/base.twig" %}
{% block content %}
<div class="container justified" style="font-size: 12pt;">
<h4 style="text-align: center">Documentation</h4>
<h4 class="docheader top10" id="what">What is CodeShare?</h4>
<p><strong>CodeShare</strong> is a platform where everybody can share implementations of common problems of computer programming. Developed by <strong>JKA Network</strong>, a Spanish's association that promotes the free culture.</p>
<h4 class="docheader top10" id="who">Who can use CodeShare?</h4>
<p><strong>Everybody can copy and distribute any code posted in this platform</strong>, and sign up and share their own solutions or post new implementations of solutions already hosted. As a warning, if someone engage vandalism (see <a href="#vandalism">vandalism in CodeShare</a>) they will be banned from publishing or editing any code, and in serious cases, ban their account permanentely. However, they will not be restricted form services of unregistered users.</p>
<h4 class="docheader top10" id="how">How can I submit my own solution?</h4>
<ol>
<li><p>First, you need to <strong>sign up</strong> in CodeShare <a href="?page=register">(link)</a>, and then go to <a href="?page=add">submit page</a> to start.</p>
<img src="{{ app.frontimg }}/doc/submit.png" alt="submit"/></li>
<li><p>Write the <strong>solution's name and description.</strong> Notice that in this input boxes you shouldn't type any reference of language they can be uploaded in multiple languages in the future, and there are a box for language.</p>
<img src="{{ app.frontimg }}/doc/name_des.png"/></li>
<li><p>Now select <strong>language</strong> to help other users to find it easily.</p></li>
<li><p>If your solution use a <strong>external library</strong> you can add its name and its version in their own input boxes.</p></li>
<li><p>After that, introduce the <strong>Input</strong> and <strong>Output</strong> examples with the following criteria:</p></li>
<ul>
<li>If you have a method with parameters and a returned value like
<pre><code class="python codeto">def sum(varA,varB):
return varA+varB</code></pre>
<strong><strong>Input</strong></strong> might be: "1 2" and <strong><strong>Output</strong></strong>: "3"</li>
<li>Else if you have a global variable or constant is preferable that you specify the name.
<pre><code class="java codeto">public static double circleArea(double radius){
return radius*radius*PI;
}</code></pre><strong>Input</strong> have to be: "radius: 4.0, PI: 3.1416"</li>
<li>Else if the method modify an object (and not return anything) you might to <strong>input</strong> the different states, for example in sort algorithm it would be like this<br>
<strong>Input</strong>: "(5 4 8 3 1 4 7 2 3)", <strong>Output</strong>: "(1 2 3 3 4 4 5 7 8)"</li>
<li>Else if the <strong>input</strong> is by a <strong>peripheral</strong> use the same notation that 2nd case</li>
<li>Else if the <strong>output</strong> is in a <strong>peripheral</strong> use the next notation<br><strong>Output</strong>: "&lt;peripheral&gt;: what the periphery will do"</li>
<li>Else <strong>input</strong> or <strong>output</strong> are void type "None, void or null" in <strong>input</strong> or <strong>output</strong> boxes</li>
</ul>
<li><p>Now paste your <strong>code</strong></p></li>
<li><p>Finally push the submit button and automatically you will be redirect to your new code page.</p></li>
</ol>
<h4 class="docheader top10" id="vandalism">What behaviors are considered vandalism in CodeShare?</h4>
<ul>
<li>Create other implementation wrongly intentionally, and/or to make hurt.</li>
<li>Submit a useless solution (For ex: "How to sum two variables").</li>
<li>Include personal or other people data in solution's name, description, input, output or in comments.</li>
<li>Make spam.</li>
<li>Replace the identity of another.</li>
</ul>
</div>
{% endblock %}