Step 1:
Visit https://gist.github.com/
You will see a web page similar to this
GitHub Gists Website |
Select the source code that shows errors in your program and copy it (CTRL+C). Now paste it in the text box (CTRL+V). It would look something like this:
Paste your source code here |
You will notice that even though we see Java syntax highlighted in eclipse IDE here it is not. It is much easier to read the source code if syntax is highlighted. So let us make it so. Click on the down arrow near to 'Language' (shown in next figure). This will give you a drop down list. Select 'Java' from the drop down list because we are coding in Java.
Select Source code language |
Notice the syntax highlighting.
Syntax highlighted source code |
Now click on the 'Create Public Gist'.
Click Create Public Gist |
Now click on the 'Create Public Gist'. It will take you to the following screen
Copy Gist Link |
Now click on the select the whole text in 'Link to this gist' text box. (You can do this by clicking on text box and doing a CTRL+A). Now copy this link (CTRL+C).
Step 7:
In your FutureLearn post (or comment) paste the link to your code.
Comment with GitHub Gist link |
No comments:
Post a Comment