Jump to content

Wikifunkcje:Wprowadzenie

From Wikifunctions
This page is a translated version of the page Wikifunctions:Introduction and the translation is 39% complete.
Outdated translations are marked like this.

Funkcje wykonują obliczenia na podstawie wprowadzonych danych.

Wikifunkcje to projekt o otwartym kodzie źródłowym, który umożliwia każdemu tworzenie i udostępnianie funkcji innym użytkownikom w celu ich wykorzystania, modyfikacji, testowania i nauki.

Skorzystaj z poniższych poradników, aby wypróbować podstawowe możliwości Wikifunkcji. Liczymy na Twoją opinię i wkład!

Ocenianie funkcji

Możesz wypróbować funkcje dodane przez społeczność w Wikifunkcjach samodzielnie! Wybierz dowolną funkcję z naszej [Wikifunctions:Main Page#Functions to try out|biblioteki funkcji]], a następnie wprowadź wartości wejściowe, aby wyświetlić wynik.

Kroki:

  1. Znajdź funkcję na Stronie głównej.
  2. Navigate to a function page.
  3. Wprowadź wartości wejściowe.
  4. Uruchom funkcję.

Wyniki:

  1. Czy wynik był taki, jakiego oczekiwałeś?
  2. Do you have corrections or feedback to report?

Tworzenie funkcji

You can add your own functions to Wikifunctions! Create a new function for use in your own implementations and enable others to use it as well. New functions can be written in your preferred language.

Kroki:

  1. Go to the function creation page.
  2. Nazwij swoją funkcję.
  3. Define your function's inputs:
    1. Add/remove input fields.
    2. Define each input type.
    3. Name each input.
  4. Define your function output type.
  5. Optionally, provide multilingual values for any of these fields:
    • Function name, function aliases, input labels.
  6. Opublikuj swoją funkcję.

Wyniki:

  1. Czy funkcja została pomyślnie zapisana?
  2. Do you have corrections or feedback to report?

Edycja funkcji

You can contribute to Wikifunctions by editing its library of functions. Add or edit multilingual information to functions, and expand and alter the definitions of functions.

Kroki:

  1. Znajdź funkcję na Stronie głównej.
  2. Navigate to the function page.
  3. Click Edit source to see the edit options for this function.
  4. Optionally, modify the values of:
    1. Nazwa funkcji,
    2. Function aliases,
    3. Input list
      1. Add/remove input fields
      2. Edit input type
      3. Edit input labels
    4. Output type.
  5. Opcjonalnie podaj wartości wielojęzyczne dla dowolnego z tych pól:
    1. Nazwa funkcji
    2. Function aliases
    3. Input labels.
  6. Opublikuj swoje aktualizacje.

Wyniki:

  1. Czy twoje zmiany zostały pomyślnie zapisane?
  2. Do you have corrections or feedback to report?

Tworzenie testów

You can create tests for your function implementations in Wikifunctions to ensure they are working properly.

Kroki:

  1. Znajdź funkcję na Stronie głównej lub funkcję utworzoną w poprzednim procesie.
  2. Navigate to the function page.
  3. Click the “+” link in the tests table.
  4. Click on "Wybierz " under "Call".
    1. In the field under "Function", type in the name of the function you are testing and select the function when it shows up.
    2. Add values for the inputs in the respective fields.
  5. Click on "Wybierz " under "Result Validation". In the field under "Function", type in the name of the function you want to use to check the result.
    • For a function whose output is String, this will be "String equality", for a function whose output is Boolean, this will be "Boolean equality".
    • Add the expected value in the given field (either "Second String" or "Second Boolean").
  6. Opublikuj swoje aktualizacje.

Wyniki:

  1. Czy test został pomyślnie zapisany?
  2. Do you have corrections or feedback to report?

Tworzenie implementacji

Functions are brought to life in implementations created to suit your needs. Run, remix, and combine functions via implementations in Wikifunctions. See the section below to learn how to connect your implementation to functions. We recommend creating and connecting a test before creating an implementation. A more comprehensive guide to creating implementations is available at Wikifunctions:How to create implementations.

Kroki:

  1. Znajdź funkcję na Stronie głównej.
  2. Navigate to the function page.
  3. Click the “+” link in the implementations table.
  4. Nową implementację możesz utworzyć na jeden z dwóch sposobów:
    1. Kod
      • Wybierz wymagany język programowania do napisania kodu funkcji.
      • Wprowadź swój kod.
    2. Composition:
      • Create a composition using existing functions.
  5. Publish your updates (after running a test by clicking the round arrow on the right of the box titled Przypadki testowe).

Wyniki:

  1. Czy implementacja została pomyślnie zapisana?
  2. Do you have corrections or feedback to report?

Łączenie implementacji lub testu z funkcją

Note: This feature is only available to Functioneers.

Connect tests and implementations to your function to see it come to life.

Kroki:

  1. Znajdź funkcję na Stronie głównej.
  2. Navigate to the function page.
  3. Select one or more tests, or one or more implementations.
  4. Kliknij przycisk "Zatwierdź".

Wyniki:

  1. Was the Zatwierdzony/Nieaktywny state successfully changed?
  2. Do you have corrections or feedback to report?

Insert a Function in a Wikipedia article

Now it is time to insert a function in a Wikipedia article and see the magic unfold.

Steps:

  1. Open the article you want to add a function to.
  2. Go to the edit tab and open visual editor.
  3. Click on the “Insert” menu at the top of the visual editor. Scroll down and click on “Function”. A dialog box will open.
  4. Search for the function you want to insert and click on it. Or, try one of the Suggested Functions below the search bar.
  5. Enter the necessary inputs and click on the “Insert” button at the top right to insert the function into the article.
  6. You can now see the output of your function in the article. You can proceed to publish the changes.
  7. If you want to edit the function, click on it. A tooltip will appear with the function name and description. Click on the “Edit” button.
  8. Then you can make changes to the inputs and click on “Apply changes” when you are done editing.

Results:

  1. Was the output what you expected?
  2. Do you have corrections or feedback to report?