入门级运动街车 2017款杜卡迪Monster 797产品解析
Funkcie sú po?íta?ové in?trukcie, ktoré robia vypo?ty na základe údajov, ktoré poskytnete, a odpovedajú na otázky, ktoré máte o nich. Napríklad, ke? sa spytate hlasového asistentov, ko?ko mí? ma kilometer, hlasovy asistent zavolá funkciu, ktorá to pre vás vypo?íta.
Wikifunkcie je projekt s otvorenym zdrojom, ktory umo?ňuje ka?dému vytvára? funkcie a zdie?a? ich pre ostatnych, aby ich mohli pou?íva?, remixova?, testova? a u?i? sa.
Pomocou nasledujúcich návodov si vyskú?ajte základné funkcie Wikifunkcií. Te?íme sa na va?u sp?tnú v?zbu a príspevky!
Vyhodnotenie funkcie
M??ete si sami vyskú?a? funkcie prispievané komunitou vo Wikifunkciách! Vyberte si jednu z na?ej kni?nice funkcií a zadajte vstupné hodnoty na zistenie vystupu.
Kroky:
- Najdite si funkciu na Hlavnej stránke.
- Prejdite na stránku funkcie.
- Zadajte vstupné hodnoty.
- Spustíte funkciu.
Vysledky:
- Bol vystup taky, aky ste o?akávali?
- Chcete nahlási? sp?tnú v?zbu alebo nejaké úpravy?
Vytvorenie funkcie
M??ete prida? svoje vlastné funkcie na Wikifunkciách! Vytvorte novú funkciu na pou?itie vo vlastnych implementáciách a umo?nite ju vyu?íva? aj inym. Nové funkcie sa m??u písa? v jazyku, ktory si ?eláte.
Kroky:
- Prejdite na stránku pre vytvorenie funkcie.
- Meno va?ej funkcie.
- Definovanie vstupu pre va?u funkciu:
- Pridanie/odstránenie vstupnych polo?iek.
- Definovanie ka?dého typu vstupu.
- Pomenovanie ka?dého vstupu.
- Definovanie vystupu pre va?u funkciu:
- Nepovinne, pre ktoréko?vek z tychto polí uve?te viacjazy?né hodnoty:
- Názov funkcie, aliasy funkcie, vstupné polo?ky.
- Zverejnite va?u funkciu
Vysledky:
- Bola funkcia úspe?ne ulo?ená?
- Chcete nahlási? sp?tnú v?zbu alebo nejaké úpravy?
Editovanie funkcie
Do Wikifunkcií m??ete prispieva? úpravou kni?nice funkcií. Pridajte alebo upravte viacjazy?né informácie funkcií a roz?írte a upravte definície funkcií.
Kroky:
- Najdite si funkciu na Hlavnej stránke.
- Prejdite na stránku funkcie.
- Kliknutím na Upravi? zdroj zobrazíte mo?nosti úprav pre túto funkciu.
- Volite?ne, úprava hodn?t:
- Meno funkcie,
- Aliasy funkcie
- Zoznam vstupov
- Pridanie/odstránenie vstupnych polo?iek.
- Editovanie typu vstupu
- Editovanie vstupnych polo?iek
- Typ vystupu.
- Nepovinne, pre ktoréko?vek z tychto polí uve?te viacjazy?né hodnoty:
- Meno funkcie
- Aliasy funkcie
- Vstupne polo?ky.
- Zverejnenie va?ich zmien.
Vysledky:
- Boli va?e zmeny úspe?ne ulo?ené?
- Chcete nahlási? sp?tnú v?zbu alebo nejaké úpravy?
Create tests
You can create tests for your function implementations in Wikifunctions to ensure they are working properly.
Steps:
- Find a function on the Main Page or the function you created in the previous workflow.
- Navigate to the function page.
- Click the “+” link in the tests table.
- Click on "Select " under "Call".
- In the field under "Function", type in the name of the function you are testing and select the function when it shows up.
- Add values for the inputs in the respective fields.
- Click on "Select " 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").
- Publish your updates.
Results:
- Was the test successfully published?
- Do you have corrections or feedback to report?
Create an implementation
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.
Steps:
- Find a function on the Main Page.
- Navigate to the function page.
- Click the “+” link in the implementations table.
- You can create a new implementation in one of two ways:
- Code
- Select the required programming language to write the function code.
- Input your code.
- Composition:
- Create a composition using existing functions.
- Code
- Publish your updates (after running a test by clicking the round arrow on the right of the box titled Testovací p?ípady).
Results:
- Was the implementation successfully published?
- Do you have corrections or feedback to report?
Connect an Implementation or Test to a Function
- Note: This feature is only available to Functioneers.
Connect tests and implementations to your function to see it come to life.
Steps:
- Find a function on the Main Page.
- Navigate to the function page.
- Select one or more tests, or one or more implementations.
- Click on the button “Schválit”.
Results:
- Was the Schváleny/Deaktivovany state successfully changed?
- 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:
- Open the article you want to add a function to.
- Go to the edit tab and open visual editor.
- Click on the “Insert” menu at the top of the visual editor. Scroll down and click on “Function”. A dialog box will open.
- Search for the function you want to insert and click on it. Or, try one of the Suggested Functions below the search bar.
- Enter the necessary inputs and click on the “Insert” button at the top right to insert the function into the article.
- You can now see the output of your function in the article. You can proceed to publish the changes.
- 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.
- Then you can make changes to the inputs and click on “Apply changes” when you are done editing.
Results:
- Was the output what you expected?
- Do you have corrections or feedback to report?