fix: Restore missing emojis and fix broken links (#35703)
* fix: Restore missing emojis and fix broken links * fix: Remove emojis to conform with style guide * fix: Remove the last emoticons
This commit is contained in:
committed by
Randell Dawson
parent
7a37788ea1
commit
73277d8ba8
@ -4,7 +4,7 @@ title: File Handling
|
|||||||
## File Handling
|
## File Handling
|
||||||
|
|
||||||
### Introduction
|
### Introduction
|
||||||
If you've written the C `helloworld` program before, you've already done file INPUT/OUTPUT(Genrally reffered as IO) in C! Congratulations! :tada:
|
If you've written the C `helloworld` program before, you've already done file INPUT/OUTPUT(Genrally reffered as IO) in C! Congratulations!
|
||||||
|
|
||||||
```c
|
```c
|
||||||
/* A simple hello world in C. */
|
/* A simple hello world in C. */
|
||||||
@ -56,32 +56,32 @@ C provides a number of build-in function to perform basic file operation
|
|||||||
### Opening a file
|
### Opening a file
|
||||||
|
|
||||||
The **fopen()** creates a file or opens an existing file
|
The **fopen()** creates a file or opens an existing file
|
||||||
|
|
||||||
```c
|
```c
|
||||||
fp = fopen(const char filename,const char mode);
|
fp = fopen(const char filename,const char mode);
|
||||||
```
|
```
|
||||||
|
|
||||||
In C there are many mode for opening a file
|
In C there are many mode for opening a file
|
||||||
|
|
||||||
**r** **-** **open a file in reading mode**
|
**r** **-** **open a file in reading mode**
|
||||||
..//Provide access only to read a file but not to write it.
|
..//Provide access only to read a file but not to write it.
|
||||||
|
|
||||||
**w** **-** **opens or create a text file in writing mode**
|
**w** **-** **opens or create a text file in writing mode**
|
||||||
..//Provides access only to write on file not to read it.
|
..//Provides access only to write on file not to read it.
|
||||||
|
|
||||||
**a** **-** **opens a file in append mode**
|
**a** **-** **opens a file in append mode**
|
||||||
..//Provides acces to append more words in file.
|
..//Provides acces to append more words in file.
|
||||||
|
|
||||||
**r+** **-** **opens a file in both reading and writing mode**
|
**r+** **-** **opens a file in both reading and writing mode**
|
||||||
|
|
||||||
**a+** **-** **opens a file in both reading and writing mode**
|
**a+** **-** **opens a file in both reading and writing mode**
|
||||||
|
|
||||||
**w+** **-** **opens a file in both reading and writing mode**
|
**w+** **-** **opens a file in both reading and writing mode**
|
||||||
|
|
||||||
**b** **-** **opens a file in binary mode**
|
**b** **-** **opens a file in binary mode**
|
||||||
|
|
||||||
Here's an example of reading and writing data to a file
|
Here's an example of reading and writing data to a file
|
||||||
|
|
||||||
```c
|
```c
|
||||||
#include<stdio.h>
|
#include<stdio.h>
|
||||||
#include<conio.h>
|
#include<conio.h>
|
||||||
@ -96,10 +96,10 @@ main()
|
|||||||
}
|
}
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
fp = fopen("hello.txt", "r");
|
fp = fopen("hello.txt", "r");
|
||||||
|
|
||||||
while( (ch = getc(fp)! = EOF)
|
while( (ch = getc(fp)! = EOF)
|
||||||
printf("%c",ch);
|
printf("%c",ch);
|
||||||
|
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
@ -252,7 +252,7 @@ Hello, Logan!
|
|||||||
Hello, Carol!
|
Hello, Carol!
|
||||||
```
|
```
|
||||||
|
|
||||||
Super awesome, right! :smile:
|
Super awesome, right!
|
||||||
|
|
||||||
### More Information:
|
### More Information:
|
||||||
- <a href='https://en.wikibooks.org/wiki/C_Programming/File_IO' target='_blank' rel='nofollow'>Wikibooks page on file IO</a>
|
- <a href='https://en.wikibooks.org/wiki/C_Programming/File_IO' target='_blank' rel='nofollow'>Wikibooks page on file IO</a>
|
||||||
|
@ -3,11 +3,11 @@ title: Nesting For Loops
|
|||||||
---
|
---
|
||||||
## Nesting For Loops
|
## Nesting For Loops
|
||||||
|
|
||||||
<strong>Remember to use Read-Search-Ask if you get stuck. Try to pair program :busts_in_silhouette: and write your own code :pencil:</strong>
|
<strong>Remember to use Read-Search-Ask if you get stuck. Try to pair program and write your own code/</strong>
|
||||||
|
|
||||||
:checkered_flag: <strong>Problem Explanation:</strong>
|
<strong>Problem Explanation:</strong>
|
||||||
|
|
||||||
If you have a multi-dimensional array, you can use the same logic as the prior waypoint to loop through both the array and any sub-arrays.
|
If you have a multi-dimensional array, you can use the same logic as the prior waypoint to loop through both the array and any sub-arrays.
|
||||||
|
|
||||||
Here is an example:
|
Here is an example:
|
||||||
|
|
||||||
@ -35,20 +35,20 @@ This outputs each sub-element in <code>arr</code> one at a time. Note that for t
|
|||||||
<li><a href="https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/iterate-through-an-array-with-a-for-loop">Iterate Through An Array With A For Loop</a></li>
|
<li><a href="https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/iterate-through-an-array-with-a-for-loop">Iterate Through An Array With A For Loop</a></li>
|
||||||
<li><a href="https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/accessing-nested-arrays">Accessing Nested Arrays</a></li>
|
<li><a href="https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/accessing-nested-arrays">Accessing Nested Arrays</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
:speech_balloon: Hint: 1
|
### Hint: 1
|
||||||
|
|
||||||
Make sure to check with <code>length</code> and not the overall array.
|
Make sure to check with <code>length</code> and not the overall array.
|
||||||
|
|
||||||
<em>try to solve the problem now</em>
|
<em>try to solve the problem now</em>
|
||||||
|
|
||||||
:speech_balloon: Hint 2<br>
|
### Hint 2
|
||||||
|
|
||||||
Use both <code>i</code> and <code>j</code> when multiplying the product.
|
Use both <code>i</code> and <code>j</code> when multiplying the product.
|
||||||
|
|
||||||
<em>try to solve the problem now</em>
|
<em>try to solve the problem now</em>
|
||||||
|
|
||||||
:speech_balloon: Hint 3<br>
|
### Hint 3
|
||||||
|
|
||||||
Remember to use <code>arr[i]</code> when you multiply the sub-arrays with the <code>product</code> variable.
|
Remember to use <code>arr[i]</code> when you multiply the sub-arrays with the <code>product</code> variable.
|
||||||
|
|
||||||
@ -60,7 +60,7 @@ Remember to use <code>arr[i]</code> when you multiply the sub-arrays with the <c
|
|||||||
<br>
|
<br>
|
||||||
<strong>Solution Ahead!</strong>
|
<strong>Solution Ahead!</strong>
|
||||||
|
|
||||||
:beginner: <strong>Basic Code Solution:</strong>
|
<strong>Basic Code Solution:</strong>
|
||||||
```
|
```
|
||||||
function multiplyAll(arr) {
|
function multiplyAll(arr) {
|
||||||
var product = 1;
|
var product = 1;
|
||||||
@ -78,7 +78,7 @@ function multiplyAll(arr) {
|
|||||||
multiplyAll([[1,2],[3,4],[5,6,7]]);
|
multiplyAll([[1,2],[3,4],[5,6,7]]);
|
||||||
|
|
||||||
```
|
```
|
||||||
:rocket: <strong><a href="https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/nesting-for-loops/">Run Code</a></strong>
|
<strong><a href="https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/nesting-for-loops/">Run Code</a></strong>
|
||||||
|
|
||||||
<strong>Code Explanation:</strong>
|
<strong>Code Explanation:</strong>
|
||||||
|
|
||||||
@ -88,9 +88,8 @@ multiplyAll([[1,2],[3,4],[5,6,7]]);
|
|||||||
<li>The two sub-arrays to multiply are <code>arr[i]</code> and <code>j</code>.</li>
|
<li>The two sub-arrays to multiply are <code>arr[i]</code> and <code>j</code>.</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
:clipboard: <strong>NOTES FOR CONTRIBUTIONS:</strong>
|
## <strong>NOTES FOR CONTRIBUTIONS:</strong>
|
||||||
<ul>
|
|
||||||
<li>:warning: <strong>DO NOT</strong> add solutions that are similar to any existing solutions. If you think it is similar but better, then try to merge (or replace) the existing similar solution.</li>
|
* <strong>DO NOT</strong> add solutions that are similar to any existing solutions. If you think it is similar but better, then try to merge (or replace) the existing similar solution.
|
||||||
<li>Add an explanation of your solution.</li>
|
* Add an explanation of your solution.
|
||||||
<li>Categorize the solution in one of the following categories — Basic, Intermediate and Advanced. :traffic_light:</li>
|
* Categorize the solution in one of the following categories — Basic, Intermediate and Advanced.
|
||||||
</ul>
|
|
||||||
|
@ -49,7 +49,7 @@ Make `i` start at 0. Also the loop **should not** be executed for i == 5. In oth
|
|||||||
```javascript
|
```javascript
|
||||||
for (let i = 0; i < len; i++) {
|
for (let i = 0; i < len; i++) {
|
||||||
```
|
```
|
||||||
**Happy Coding!** :computer:
|
**Happy Coding!**
|
||||||
### Resources
|
### Resources
|
||||||
- [For statements challenge at FreeCodeCamp](https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/iterate-with-javascript-for-loops)
|
- [For statements challenge at FreeCodeCamp](https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/iterate-with-javascript-for-loops)
|
||||||
- [For statements at MDN web docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Loops_and_iteration#for_statement)
|
- [For statements at MDN web docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Loops_and_iteration#for_statement)
|
||||||
|
@ -4,10 +4,10 @@ title: Set Default Parameters for Your Functions
|
|||||||
## Set Default Parameters for Your Functions
|
## Set Default Parameters for Your Functions
|
||||||
|
|
||||||
|
|
||||||
:triangular_flag_on_post: Remember to use Read-Search-Ask if you get stuck. Try to pair program :busts_in_silhouette: and write your own code :pencil:
|
Remember to use Read-Search-Ask if you get stuck. Try to pair program and write your own code.
|
||||||
|
|
||||||
|
|
||||||
### :checkered_flag: Problem Explanation:
|
### Problem Explanation:
|
||||||
```javascript
|
```javascript
|
||||||
const increment = (function() {
|
const increment = (function() {
|
||||||
"use strict";
|
"use strict";
|
||||||
@ -21,24 +21,23 @@ console.log(increment(5)); // returns NaN
|
|||||||
|
|
||||||
We'll be modifying the increment function so that the **number** parameter is incremented by 1 by default, by setting **value** to 1 if a value for **value** is not passed to the increment function.
|
We'll be modifying the increment function so that the **number** parameter is incremented by 1 by default, by setting **value** to 1 if a value for **value** is not passed to the increment function.
|
||||||
|
|
||||||
### :speech_balloon: Hint: 1
|
### Hint: 1
|
||||||
|
|
||||||
Let's identify where the parameter **value** is in JS function
|
Let's identify where the parameter **value** is in JS function
|
||||||
|
|
||||||
try to solve the problem now
|
try to solve the problem now
|
||||||
|
|
||||||
### :speech_balloon: Hint: 2
|
### Hint: 2
|
||||||
|
|
||||||
Set **value** equal to something so that it is that value by default
|
Set **value** equal to something so that it is that value by default
|
||||||
|
|
||||||
try to solve the problem now
|
try to solve the problem now
|
||||||
|
|
||||||
### Spoiler Alert!
|
### Spoiler Alert!
|
||||||

|
|
||||||
|
|
||||||
Solution ahead!
|
Solution ahead!
|
||||||
|
|
||||||
## :beginner: Basic Code Solution:
|
## Basic Code Solution:
|
||||||
```javascript
|
```javascript
|
||||||
const increment = (function() {
|
const increment = (function() {
|
||||||
"use strict";
|
"use strict";
|
||||||
@ -49,18 +48,18 @@ const increment = (function() {
|
|||||||
console.log(increment(5, 2)); // returns 7
|
console.log(increment(5, 2)); // returns 7
|
||||||
console.log(increment(5)); // returns NaN
|
console.log(increment(5)); // returns NaN
|
||||||
```
|
```
|
||||||
:rocket: [Run Code](https://repl.it/@RyanPisuena/PleasingFumblingThings)
|
[Run Code](https://repl.it/@RyanPisuena/PleasingFumblingThings)
|
||||||
|
|
||||||
## Code Explanation
|
### Code Explanation
|
||||||
|
|
||||||
* This section is pretty straightforward. Pass this section by setting the **value** parameter equal to 1. When the function comes across test cases where **value** has not been passed anything, then **value** will be assigned one by default.
|
* This section is pretty straightforward. Pass this section by setting the **value** parameter equal to 1. When the function comes across test cases where **value** has not been passed anything, then **value** will be assigned one by default.
|
||||||
|
|
||||||
Relevant Links:
|
Relevant Links:
|
||||||
|
|
||||||
[JavaScript default parameters](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Default_parameters)
|
[JavaScript default parameters](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Default_parameters)
|
||||||
|
|
||||||
# :clipboard: NOTES FOR CONTRIBUTIONS:
|
## NOTES FOR CONTRIBUTIONS:
|
||||||
|
|
||||||
* :warning: DO NOT add solutions that are similar to any existing solutions. If you think it is similar but better, then try to merge (or replace) the existing similar solution.
|
* DO NOT add solutions that are similar to any existing solutions. If you think it is similar but better, then try to merge (or replace) the existing similar solution.
|
||||||
* Add an explanation of your solution.
|
* Add an explanation of your solution.
|
||||||
* Categorize the solution in one of the following categories — Basic, Intermediate and Advanced. :traffic_light:
|
* Categorize the solution in one of the following categories — Basic, Intermediate and Advanced.
|
||||||
|
@ -11,7 +11,7 @@ title: HTML Entities
|
|||||||
HTML entities are characters that are used to replace reserved characters in HTML or for characters that do not appear on your keyboard. Some characters are reserved in HTML. If you use the less than(<) or greater than(>) signs in your text, the browser might mix them up with tags.
|
HTML entities are characters that are used to replace reserved characters in HTML or for characters that do not appear on your keyboard. Some characters are reserved in HTML. If you use the less than(<) or greater than(>) signs in your text, the browser might mix them up with tags.
|
||||||
|
|
||||||
### What are they used for?
|
### What are they used for?
|
||||||
|
|
||||||
As mentioned about HTML entities are used in order to replace reserved characters that are reserved by HTML.
|
As mentioned about HTML entities are used in order to replace reserved characters that are reserved by HTML.
|
||||||
|
|
||||||
### How do you use them?
|
### How do you use them?
|
||||||
@ -28,10 +28,10 @@ Or
|
|||||||
<!-- example for a less-than sign (<) -->
|
<!-- example for a less-than sign (<) -->
|
||||||
<
|
<
|
||||||
```
|
```
|
||||||
|
|
||||||
## Reference Guide
|
## Reference Guide
|
||||||
|
|
||||||
This is by no means an exhaustive list but the links below will be able to give you more entities if the ones below do not work for your needs. Happy Coding :bowtie:
|
This is by no means an exhaustive list but the links below will be able to give you more entities if the ones below do not work for your needs. Happy Coding.
|
||||||
|
|
||||||
|
|
||||||
| Character | Entity Name | Entity Number | Description |
|
| Character | Entity Name | Entity Number | Description |
|
||||||
@ -42,7 +42,7 @@ This is by no means an exhaustive list but the links below will be able to give
|
|||||||
| # | `#` | `#` | Number sign |
|
| # | `#` | `#` | Number sign |
|
||||||
| $ | `$`| `$` | Dollar sign |
|
| $ | `$`| `$` | Dollar sign |
|
||||||
| ¢ | `¢` | `¢` | Cent sign |
|
| ¢ | `¢` | `¢` | Cent sign |
|
||||||
| € | `€` | `€` | Euro sign |
|
| € | `€` | `€` | Euro sign |
|
||||||
| £ | `£` | `£` | GBP sign |
|
| £ | `£` | `£` | GBP sign |
|
||||||
| ¥ | `¥` | `¥` | Yen sign |
|
| ¥ | `¥` | `¥` | Yen sign |
|
||||||
| % | `%`| `%` | Percent sign |
|
| % | `%`| `%` | Percent sign |
|
||||||
|
@ -17,7 +17,7 @@ Before we install Django we will get you to install an extremely useful tool to
|
|||||||
|
|
||||||
So, let's create a virtual environment (also called a virtualenv). Virtualenv will isolate your Python/Django setup on a per-project basis. This means that any changes you make to one website won't affect any others you're also developing. Neat, right?
|
So, let's create a virtual environment (also called a virtualenv). Virtualenv will isolate your Python/Django setup on a per-project basis. This means that any changes you make to one website won't affect any others you're also developing. Neat, right?
|
||||||
|
|
||||||
For more information on virtual environments see the relevent section <a href='https://guide.freecodecamp.org/python/virtual-environments/' target='_blank' rel='nofollow'>here<a>.
|
For more information on virtual environments see the relevent section <a href='https://guide.freecodecamp.org/python/virtual-environments/' target='_blank' rel='nofollow'>here</a>.
|
||||||
|
|
||||||
## Wrapping Up
|
## Wrapping Up
|
||||||
|
|
||||||
@ -31,7 +31,7 @@ $ django-admin startproject myproject
|
|||||||
$ cd myproject
|
$ cd myproject
|
||||||
$ python manage.py runserver
|
$ python manage.py runserver
|
||||||
```
|
```
|
||||||
Go to `http://localhost:8000`! :rocket:
|
Go to `http://localhost:8000`!
|
||||||
|
|
||||||
We have successfully installed the web-framework of our need. However, it's not yet complete. Most web applications are content and data driven - so we need a data storage. Or, a Database, if you will.
|
We have successfully installed the web-framework of our need. However, it's not yet complete. Most web applications are content and data driven - so we need a data storage. Or, a Database, if you will.
|
||||||
|
|
||||||
@ -39,4 +39,4 @@ In next article, we would be discussing how to install PostgreSQL and use it wit
|
|||||||
|
|
||||||
A point to ponder - we have been using `pip` heavily, but we have barely said anything about it. Well, for now, it's just a package manager like `npm`. It has some differences with `npm`; but, you don't need to worry about that now. If you are interested, do check out the <a href='http://pip-python3.readthedocs.org/en/latest/index.html' target='_blank' rel='nofollow'>official `pip` documentation</a>.
|
A point to ponder - we have been using `pip` heavily, but we have barely said anything about it. Well, for now, it's just a package manager like `npm`. It has some differences with `npm`; but, you don't need to worry about that now. If you are interested, do check out the <a href='http://pip-python3.readthedocs.org/en/latest/index.html' target='_blank' rel='nofollow'>official `pip` documentation</a>.
|
||||||
|
|
||||||
_If you have suggestions or questions, come join us on <a href='https://gitter.im/FreeCodeCamp/FreeCodeCamp' target='_blank' rel='nofollow'>gitter</a>_.
|
<em>If you have suggestions or questions, come join us on <a href='https://gitter.im/FreeCodeCamp/home' target='_blank' rel='nofollow'>gitter</a></em>.
|
||||||
|
Reference in New Issue
Block a user