This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- a fragment or named anchor is used to link to part of a document.--> | |
| <!-- With nothing specific written on it, the link will just point to the beginning of the page.--> | |
| Click here for <a href="#">cat photos</a> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <style> | |
| .thick-border { | |
| border-width: 10px; | |
| border-style: solid; | |
| } | |
| </style> | |
| <img class='thick-border' | |
| src='https://bit.ly/fcc-kittens'/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <link href='http://fonts.googleapis.com/css?family=Lobster' rel='stylesheet' type='text/css'> | |
| <style> | |
| .red-text { | |
| color: red; | |
| } | |
| h2 { | |
| font-family: Lobster, monospace; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <style> h2 {color:blue;}</style> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| override func tableView (tableView: UITableView, | |
| commitEditingStyle editingStyle: UITableViewCellEditingStyle, forRowAtIndexPath indexPath: NSIndexPath) | |
| func tableView: | |
| A table view is the scrolling thing that's containing all the dates in the | |
| example project, and is a core component in iOS. | |
| tableView: UITableView | |
| contains two pieces of information: | |
| tableView |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. Launch XCode 4 | |
| 2. Select the ‘Connect to a repository’ option from the ‘Welcome to XCode’ dialog. | |
| 3. Paste in your GitHub SSH URL in the Location text box. This can be found from your GitHub repository’s Source page. e.g. [email protected]:<organisation>/<repository>.git | |
| 4. Click Next and then give the repository a name (e.g. RepositoryName) and click Clone. | |
| 5. Pick a directory to clone your GitHub repository into (even if your repository is currently empty). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Objects and classes | |
| # Classes let us define the blueprints for objects | |
| from calendar import weekday | |
| class Animal: | |
| # When defining a class's attributes, if they are preceded by __, it means they are private | |
| __name = '' | |
| __height = 0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # we need to import the os module to be able to delete a file | |
| import os | |
| # Creating and opening a file | |
| # to read and append to file, we use the command 'ab+' -it also opens and creates a file | |
| # to write to this file, we use the command 'wb' | |
| test_file = open('test.txt', 'wb') | |
| # Finding out which file mode is in use |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # printing a substring: | |
| long_string = 'this is a pretty long and boring string' | |
| # to print the first three characters: | |
| print(long_string[0:3]) | |
| # to print the last three characters: | |
| print(long_string[-3:]) | |
| # to print everything except the last three characters: | |
| print(long_string[:-3]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #sys is imported to get input: | |
| import sys | |
| # A function's definition starts with the keyword def | |
| # after that, parameters can be added inside the parenthesis | |
| # those parameters can be used and returned as defined in the function body | |
| def addNumber(firstNumber, lastNumber): | |
| sumNumbers = firstNumber + lastNumber | |
| return sumNumbers |