Jump to content

ਵਿਕੀਕਾਰਜ਼: ਜਾਣ-ਪਛਾਣ

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

Functions make calculations on the data you provide.

ਵਿਕੀਕਾਰਜ ਇੱਕ ਖੁਲ੍ਹਾ ਸਰੋਤ ਪ੍ਰੋਜੈਕਟ ਹੈ ਜੋ ਕਿਸੇ ਨੂੰ ਵੀ ਕਾਰਜ਼ ਬਣਾਉਣ ਅਤੇ ਉਹਨਾਂ ਨੂੰ ਦੂਜਿਆਂ ਲਈ ਵਰਤਣ, ਮਿਲਾਉਣ, ਪ੍ਰੀਖਿਆ ਕਰਨ ਅਤੇ ਸਿੱਖਣ ਲਈ ਸਾਂਝਾ ਕਰਨ ਦੇ ਯੋਗ ਬਣਾਉਂਦਾ ਏ।

ਵਿਕੀਕਾਰਜ ਦੀਆਂ ਮੁੱਢਲੀਆਂ ਵਿਸ਼ੇਸ਼ਤਾਵਾਂ ਨੂੰ ਅਜ਼ਮਾਉਣ ਲਈ ਹੇਠਾਂ ਦਿੱਤੀਆਂ ਦਸਤਿਆਂ ਦੀ ਵਰਤੋਂ ਕਰੋ। ਸਾਨੂੰ ਤੁਹਾਡੇ ਸੁਝਾਅ ਅਤੇ ਯੋਗਦਾਨਾਂ ਦੀ ਉਡੀਕ ਕਰਦੇ ਹਾਂ!

ਇੱਕ ਕਾਰਜ਼ ਦੀ ਨਿਰਖਣਾ ਕਰੋ

ਤੁਸੀਂ ਆਪਣੇ ਲਈ ਵਿਕੀਕਾਰਜ਼ 'ਤੇ ਭਾਈਚਾਰਾ-ਯੋਗਦਾਨ ਵਾਲੇ ਕਾਰਜ਼ਾਂ ਨੂੰ ਆਪਣੇ ਲਈ ਅਜ਼ਮਾ ਸਕਦੇ ਹੋ! ਸਾਡੇ ਕਾਰਜ਼ਾਂ ਦੀ ਕਿਤਾਬਘਰ ਵਿੱਚੋਂ ਇੱਕ ਚੁਣੋ, ਅਤੇ ਨਤੀਜੇ ਖੋਜਣ ਲਈ input ਮੁੱਲ ਦਿਓ।

ਪਲਾਂਘਾਂ:

  1. ਮੁੱਢਲੇ ਵਰਕੇ 'ਤੇ ਇੱਕ ਕਾਰਜ਼ ਲੱਭੋ।
  2. ਇੱਕ ਕਾਰਜ਼ ਵਰਕੇ ਉੱਤੇ ਜਾਓ।
  3. input ਦਾ ਮੁੱਲ ਦਾਖਲ ਕਰੋ.
  4. ਇੱਕ ਕਾਰਜ਼ ਚਲਾਓ

ਨਤੀਜੇ:

  1. ਕੀ ਨਤੀਜੇ ਤੁਹਾਡੀਆਂ ਉਮੀਦਾਂ 'ਤੇ ਖਰੇ ਉਤਰੇ?
  2. ਕੀ ਤੁਹਾਡੇ ਕੋਲ ਇਤਲਾਹ ਲਈ ਸੁਧਾਰ ਜਾਂ ਸੁਝਾਅ ਹਨ?

Share a Function call

After you run a function, use the 'Copy result link' button beneath the result panel to copy a shareable URL. When someone opens that link, Wikifunctions preloads the same function call and runs it automatically, so they see the inputs and result exactly as you did. This is a quick way to demonstrate reproducible examples or ask others for help with a specific function input/output.

Steps (continue from "Evaluate a Function"):

  1. After the result loads, click 'Copy result link' under the result panel.
    Share a function call feature in Wikifunctions screenshot
  2. Share the URL with others!

Note: the shared link preloads your exact inputs and runs them again, so recipients see the same result unless the underlying implementation has changed since you generated the link.

ਇੱਕ ਕਾਰਜ਼ ਬਣਾਓ

ਤੁਸੀਂ ਵਿਕੀਕਾਰਜ਼ ਵਿੱਚ ਆਪਣੇ ਖੁਦ ਦੇ ਕਾਰਜ਼ ਜੋੜ ਸਕਦੇ ਹੋ! ਆਪਣੇ ਖੁਦ ਦੇ ਅਮਲ-ਕਰਨ ਵਿੱਚ ਵਰਤੋਂ ਲਈ ਇੱਕ ਨਵਾਂ ਕਾਰਜ਼ ਬਣਾਓ ਅਤੇ ਦੂਜਿਆਂ ਨੂੰ ਵੀ ਇਸਦੀ ਵਰਤੋਂ ਕਰਨ ਦੇ ਯੋਗ ਬਣਾਓ। ਨਵੇਂ ਕਾਰਜ਼ ਤੁਹਾਡੀ ਪਸੰਦ ਦੀ ਕਿਸੇ ਵੀ ਭਾਸ਼ਾ ਵਿੱਚ ਲਿਖੇ ਜਾ ਸਕਦੇ ਹਨ।

ਪਲਾਂਘਾਂ:

  1. ਕਾਰਜ਼ ਬਣਾਉਣ ਵਾਲੇ ਵਰਕੇ 'ਤੇ ਜਾਓ।
  2. ਆਪਣੇ ਕਾਰਜ਼ ਦਾ ਨਾਂ ਦਿਓ।
  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. ਆਪਣੇ ਕਾਰਜ਼ ਨੁੰ ਛਾਪੋ।

ਨਤੀਜੇ:

  1. ਕੀ ਕਾਰਜ਼ ਛਾਪਣ ਵਿੱਚ ਕਾਮਯਾਬ ਹੋਇਆ?
  2. ਕੀ ਤੁਹਾਡੇ ਕੋਲ ਇਤਲਾਹ ਲਈ ਸੁਧਾਰ ਜਾਂ ਸੁਝਾਅ ਹਨ?

ਇੱਕ ਕਾਰਜ਼ ਨੂੰ ਸੋਧੋ

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.

ਪਲਾਂਘਾਂ:

  1. ਮੁੱਢਲੇ ਵਰਕੇ 'ਤੇ ਇੱਕ ਕਾਰਜ਼ ਲੱਭੋ।
  2. ਇੱਕ ਕਾਰਜ਼ ਵਰਕੇ ਉੱਤੇ ਜਾਓ।
  3. ਇਸ ਕਾਰਜ਼ ਲਈ ਸੋਧ ਚੋਣਾਂ ਨੂੰ ਵੇਖਣ ਲਈ ਸਰੋਤ ਨੂੰ ਸੋਧੋ 'ਤੇ ਨੱਪੋ।
  4. ਚੋਣ ਦੇ ਤੌਰ ਉੱਤੇ, ਇਹਨਾਂ ਦੇ ਮੁੱਲ ਨੂੰ ਸੋਧੋ:
    1. ਕਾਰਜ਼ ਨਾਂ
    2. Function aliases,
    3. Input list
      1. Add/remove input fields
      2. Edit input type
      3. Edit input labels
    4. ਨਤੀਜੇ ਦੀ ਕਿਸਮ।
  5. ਚੋਣ ਦੇ ਤੌਰ 'ਤੇ, ਇਹਨਾਂ ਵਿੱਚੋਂ ਕਿਸੇ ਵੀ ਖੇਤਰ ਲਈ ਬਹੁ-ਭਾਸ਼ਾਈ ਮੁੱਲ ਦਿਓ:
    1. ਕਾਰਜ਼ ਨਾਂ
    2. Function aliases
    3. Input labels.
  6. Publish your updates.

ਨਤੀਜੇ:

  1. ਕੀ ਤੁਹਾਡੇ ਸੋਧ ਛਾਪਣ ਵਿੱਚ ਕਾਮਯਾਬ ਹੋਏ ਸਨ?
  2. ਕੀ ਤੁਹਾਡੇ ਕੋਲ ਇਤਲਾਹ ਲਈ ਸੁਧਾਰ ਜਾਂ ਸੁਝਾਅ ਹਨ?

ਪ੍ਰੀਖਿਆ ਬਣਾਓ

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

ਪਲਾਂਘਾਂ:

  1. Find a function on the Main Page or the function you created in the previous workflow.
  2. ਇੱਕ ਕਾਰਜ਼ ਵਰਕੇ ਉੱਤੇ ਜਾਓ।
  3. Click the “+” link in the tests table.
  4. The "Call" section should automatically be expanded.
    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. The "Result Validation" section should automatically be expanded.
    1. In the field under "Function", type in the name of the function you want to use to check the result.
    2. For a function whose output is String, this will be "String equality", for a function whose output is Boolean, this will be "Boolean equality".
    3. Add the expected value in the given field (either "Second String" or "Second Boolean").
  6. Publish your updates.

ਨਤੀਜੇ:

  1. ਕੀ ਕਾਰਜ਼ ਛਾਪਣ ਵਿੱਚ ਕਾਮਯਾਬ ਹੋਇਆ?
  2. ਕੀ ਤੁਹਾਡੇ ਕੋਲ ਇਤਲਾਹ ਲਈ ਸੁਧਾਰ ਜਾਂ ਸੁਝਾਅ ਹਨ?

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.

ਪਲਾਂਘਾਂ:

  1. ਮੁੱਢਲੇ ਵਰਕੇ 'ਤੇ ਇੱਕ ਕਾਰਜ਼ ਲੱਭੋ।
  2. ਇੱਕ ਕਾਰਜ਼ ਵਰਕੇ ਉੱਤੇ ਜਾਓ।
  3. Click the “+” link in the implementations table.
  4. You can create a new implementation in one of two ways:
    1. ਕੋਡ
      • Select the required programming language to write the function code.
      • Input your code.
    2. ਰਚਨਾ:
      • ਮੌਜੂਦਾ ਕਾਰਜ਼ ਦੀ ਵਰਤੋਂ ਕਰਕੇ ਇੱਕ ਰਚਨਾ ਬਣਾਓ।
  5. Publish your updates (after running a test by clicking the round arrow on the right of the box titled ਪ੍ਰੀਖਿਆ).

ਨਤੀਜੇ:

  1. ਕੀ ਕਾਰਜ਼ ਛਾਪਣ ਵਿੱਚ ਕਾਮਯਾਬ ਹੋਇਆ?
  2. ਕੀ ਤੁਹਾਡੇ ਕੋਲ ਇਤਲਾਹ ਲਈ ਸੁਧਾਰ ਜਾਂ ਸੁਝਾਅ ਹਨ?

Connect an Implementation or Test to a Function

ਨੋਟ: ਇਹ ਵਿਸ਼ੇਸ਼ਤਾ ਸਿਰਫ਼ ਕਾਰਜ਼-ਕਰਨ ਵਾਲੇਆਂ ਲਈ ਹੀ ਹਾਜ਼ਰ ਏ।

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

ਪਲਾਂਘਾਂ:

  1. ਮੁੱਢਲੇ ਵਰਕੇ 'ਤੇ ਇੱਕ ਕਾਰਜ਼ ਲੱਭੋ।
  2. ਇੱਕ ਕਾਰਜ਼ ਵਰਕੇ ਉੱਤੇ ਜਾਓ।
  3. Select one or more tests, or one or more implementations.
  4. "ਜੁੜੋ" ਬਟਨ 'ਤੇ ਨੱਪੋ।

ਨਤੀਜੇ:

  1. ਕੀ Connected/Disconnected ਅਵਸਥਾ ਨੂੰ ਬਦਲਣ ਵਿੱਚ ਕਾਮਯਾਬੀ ਮਿਲੀ ਸੀ?
  2. ਕੀ ਤੁਹਾਡੇ ਕੋਲ ਇਤਲਾਹ ਲਈ ਸੁਧਾਰ ਜਾਂ ਸੁਝਾਅ ਹਨ?

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?