jiebi/CodeConvo huggingface dataset:
Change:
```js const sum = (...args) => { <del> return args.reduce((a, b) => a + b, 0); </del> <ins> let total = 0; for (let i = 0; i < args.length; i++) { total += args[i]; } return total; </ins> } ```

Discussion:
The challenge is using the method which hasn't been introduced yet. I believe it is an artifact of the current section order (ES6 now comes before functional programming). You don't really need to understand how works to solve the challenge but just to avoid any confusion it might be better to change it to use a simple for loop. The guide post will need to be updated as well if this change is made. Should not contain code that is unfamiliar to the student. No response Device: [e.g. iPhone 6, Laptop] OS: [e.g. iOS 14, Windows 10, Ubuntu 20.04] Browser: [e.g. Chrome, Safari] Version: [e.g. 22] Forum post: Guide post:
hey i have fix this issue let you check PR
Change:
if (link.search(/^https?:///g) === -1) { link = 'http://' + link; } <del> Story.count( { storyLink: new RegExp('^' + storyLink + '(?: [0-9]+)?$', 'i') }, function (err, storyCount) { if (err) { return res.status(500); } </del> <ins> Story.count({ storyLink: new RegExp('^' + storyLink + '(?: [0-9]+)?$', 'i')}, function (err, storyCount) { if (err) { return res.status(500); } </ins> <del> // if duplicate storyLink add unique number storyLink = (storyCount === 0) ? storyLink : storyLink + ' ' + storyCount; </del> <ins> // if duplicate storyLink add unique number storyLink = (storyCount === 0) ? storyLink : storyLink + ' ' + storyCount; </ins> <del> var link = data.link; if (link.search(/^https?:///g) === -1) { link = 'http://' + link; </del> <ins> var link = data.link; if (link.search(/^https?:///g) === -1) { link = 'http://' + link; } var story = new Story({ headline: sanitizeHtml(data.headline, { allowedTags: [], allowedAttributes: [] }).replace(/&quot;/g, '"'), timePosted: Date.now(), link: link, description: sanitizeHtml(data.description, { allowedTags: [], allowedAttributes: [] }).replace(/&quot;/g, '"'), rank: 1, upVotes: [({ upVotedBy: req.user._id, upVotedByUsername: req.user.profile.username })], author: { picture: req.user.profile.picture, userId: req.user._id, username: req.user.profile.username, email: req.user.email }, comments: [], image: data.image, storyLink: storyLink, metaDescription: data.storyMetaDescription, originalStoryAuthorEmail: req.user.email }); story.save(function (err) { if (err) { return res.status(500); </ins> } <del> var story = new Story({ headline: sanitizeHtml(data.headline, { allowedTags: [], allowedAttributes: [] }).replace(/&quot;/g, '"'), timePosted: Date.now(), link: link, description: sanitizeHtml(data.description, { allowedTags: [], allowedAttributes: [] }).replace(/&quot;/g, '"'), rank: 1, upVotes: [({ upVotedBy: req.user._id, upVotedByUsername: req.user.profile.username })], author: { picture: req.user.profile.picture, userId: req.user._id, username: req.user.profile.username, email: req.user.email }, comments: [], image: data.image, storyLink: storyLink, metaDescription: data.storyMetaDescription, originalStoryAuthorEmail: req.user.email }); story.save(function (err) { </del> <ins> req.user.progressTimestamps.push(Date.now() || 0); req.user.save(function (err, user) { </ins> if (err) { <del> return res.status(500); </del> <ins> return next(err); </ins> } <del> req.user.progressTimestamps.push(Date.now() || 0); req.user.save(function (err) { if (err) { return next(err); } }); res.send(JSON.stringify({ storyLink: story.storyLink.replace(/s/g, '-').toLowerCase() })); </del> }); <del> } ); </del> <ins> res.send(JSON.stringify({ storyLink: story.storyLink.replace(/s/g, '-').toLowerCase() })); }); }); </ins> }; exports.commentSubmit = function(req, res, next) {

Discussion:
Seeing this in production here: solution: Use and/or check for user existence and end early. cc:
Change:
margin-left: 1rem; } <del> .badge { </del> <ins> .camper-badge { </ins> margin-right: 1em; } @media (max-width: 768px) {

Discussion:
A2 English blocks have challenges whose title is displayed next to a completion indicator. The indicator is having a right margin, which creates a gap between the indicator and the text. <img width="746" alt="Screenshot 2024-05-31 at 22 49 13" src=""This issue is because the indicator has a class: This class was harmless as it didn't have any CSS rules associated, until we badges to the user profile page, which caused a class name collision: Remove the class from: Rename the class in to to avoid future collision
I can take this one, but I don't seem to have the permissions to assign myself to this issue.
We typically do not assign issues. Instead, we accept the first pull request that comprehensively solves the issue. Issues labelled with or are open for contributions. Please make sure you read . We prioritize contributors following the instructions in our guide. Join us in or if you need help contributing - our community will be happy to assist you.
Awesome, thanks for clarifying!
Change:
| npm (comes bundled with Node)                                                                 | `6.x`   | Does not have LTS releases, we use the version bundled with Node LTS | | [MongoDB Community Server](https://docs.mongodb.com/manual/administration/install-community/) | `4.0.x` | [Release Notes](https://docs.mongodb.com/v4.0/release-notes/)        | <del> > [!DANGER] </del> <ins> > [!ATTENTION] </ins> > If you have a different version, please install the recommended version. We can only support installation issues for recommended versions. See [troubleshooting](#troubleshooting) for details. If Node.js is already installed on your machine, run the following commands to validate the versions:

Discussion:
We are currently using the for our Docsify-powered contributing documentation. One of the alert types, , also accepts the keyword to render. We currently render one of these boxes with and four of them with . For consistency sake, we should use the same keyword to render these. IMHO, with the displayed text being "Attention" we should use the keyword, but I wanted to get some feedback before opening this up to first timers. As an alternative, if we prefer the text, we can modify the plugin config to render on the end-user view instead of .
At this time, there are 4 instances of usage of and 1 instance for , I think it would make sense to make it consistent. And seeing that with the displayed being "Attention" I agree on that being the one used.
+1 on making it
I am happy either way. The only reason I came into this is because I am used to the Bootstrap way of naming, and naturally put DANGER.
Alright, I am going to open this up to first timers. A pull request that closes this issue will: Replace all instances of with in the directory Will not modify any of the files in the directory (these will be updated through our translation worfklow) If you are interested in resolving this issue, we recommend starting with our . If you have further questions feel free to join us in our .
Hi, can I try this out?
Sure thing! Let us know if you have any questions :)
Hey Nick, I would like to work on this!
I also thought of that, but as this issue has been already received by someone, let's give them some time! If it is more than a week without no response, you can grab this!
Yup I got that. That's why I commented so if they are unable then I can pick that up
Change:
You can `GET` `/api/convert` with a single parameter containing an accepted number and unit and have it converted. (Hint: Split the input by looking for the index of the first character which will mark the start of the unit) ```js ``` You can convert `'gal'` to `'L'` and vice versa. (1 gal to 3.78541 L)

Discussion:
An empty solution seed with the following format does not parse correctly in Crowdin: ! Adding an empty new-line between the backtick lines will parse correctly in Crowdin: ! The following files have empty seeds with the first format and need a blank line : JavaScript / Basic JavaScript comment your javascript code declare javascript variables declare string variables initializing variables with the assignment operator passing values to functions with arguments return a value from a function with return write reusable javascript with functions JavaScript / ES6 create a javascript promise JavaScript / Object Oriented Programming define a constructor function Front End Libraries / Bootstrap Create a bootstrap headline Front End Libraries / React Create a complex jsx element Quality Assurance Projects metric imperial converter Coding Interview Prep / Data Structures Create an ES6 Javascript Map
Hi, I'll add those blank lines. It'll be my first time contributing to an open-source project, though.
Please visit to find all the info you will need to get started with contributing a fix for this issue.
Alright. I'll go through the documentation.
Hi. First time contributor here. I have forked the free code camp files to my github page. I have cloned them locally, opened the appropriate folders into my VSCode editor and made the changes (though I was not able to find a # --seed-- in Quality Assurance Projects: metric imperial conversion) but now I have no idea of how to get the code back here. Is there some documentation with instructions on how to do that? Thanks in advance.
Change:
"</style>", "", "<h2 class="red-text">CatPhotoApp</h2>", <ins> "<!--Do not alter code above this line-->", </ins> "", "<a href="http://www.freecatphotoapp.com">cat photos</a>", "", <ins> "<!--Do not alter code below this line-->", </ins> "<img class="smaller-image thick-green-border" src="https://bit.ly/fcc-relaxing-cat">", "", "<p class="red-text">Kitty ipsum dolor sit amet, shed everywhere shed everywhere stretching attack your ankles chase the red dot, hairball run catnip eat the grass sniff.</p>",

Discussion:
! Challenge has an issue. User Agent is: <codeMozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36</code. Please describe how to reproduce this issue, and include links to screenshots if possible. My code:
This challenge is asking to you wrap the existing tag that is right below the , not create a new one at the bottom. The test expects to find your up there with the original , so adding it down at the bottom causes the test to fail. However, this is the third time in a week or so that I've seen this same issue reported, so I propose adding some clarifying language to the waypoint that lets the user know they should not be moving existing tag, only wrapping it.
It worked. Indeed the language should be more clarifying.
Great, just reading your your response. Unsure if you have clarifying language yet but I have run into the same of two days ago, 10/21...
The change has been pulled into the staging branch but hasn't been pushed into the production code yet. It shouldn't be too long before it is.
Change:
```js function isHeap(arr, i, n) { <del> if (i >= (n - 1) / 2) { return true; } if ( arr[i] >= arr[2 * i + 1] && arr[i] >= arr[2 * i + 2] && isHeap(arr, 2 * i + 1, n) && isHeap(arr, 2 * i + 2, n) ) { return true; } return false; </del> <ins> if( arr[i] < arr[2 * i + 1] || arr[i] < arr[2 * i + 2] ){ return false; } if (i > (n - 1) / 2) { return true; } if (isHeap(arr, 2 * i + 1, n) && isHeap(arr, 2 * i + 2, n)) { return true; } return false; </ins> } assert( (function () { let test = false; if (typeof MaxHeap !== 'undefined') { test = new MaxHeap(); } else { return false; } <del> let max = Infinity; const [result, vals] = [[], [2, 15, 3, 7, 12, 7, 10, 90]]; vals.forEach((val) => test.insert(val)); for (let i = 0; i < vals.length; i++) { const curHeap = test.print(); const arr = curHeap[0] === null ? curHeap.slice(1) : curHeap; if (!isHeap(arr, 0, arr.length - 1)) { return false; </del> <ins> let max = Infinity; const [result, vals] = [[], [9, 3, 5, 2, 15, 3, 7, 12, 7, 10, 90]]; vals.forEach((val) => test.insert(val)); for (let i = 0; i < vals.length; i++) { const curHeap = test.print(); const arr = curHeap[0] === null ? curHeap.slice(1) : curHeap; if (!isHeap(arr, 0, arr.length - 1)) { return false; } const removed = test.remove(); if (!vals.includes(removed)) return false; if (removed > max) return false max = removed; result.push(removed); </ins> } <del> const removed = test.remove(); if (!vals.includes(removed)) return false; if (removed > max) return false max = removed; result.push(removed); } for (let i = 0; i < vals.length; i++) { if (!result.includes(vals[i])) { return false; } } return true </del> <ins> for (let i = 0; i < vals.length; i++) { if (!result.includes(vals[i])) { return false; } } return true; </ins> })() ); ```

Discussion:
A wrong solution is accepted at coding-interview-prep/data-structures/remove-an-element-from-a-max-heap challenge The test case for The remove method should remove the greatest element from the max heap while maintaining the max heap property should not pass. The next example shows that, the function does not maintain the max heap properly: Device: [Laptop] OS: [ Windows 10] Browser: [Chrome] Version: [121.0.6167.86]
OK, I have make it.
Change:
You should import the `Lobster` font. ```js <del> assert(new RegExp('googleapis', 'gi').test(code)); </del> <ins> assert($('link[href*="googleapis" i]').length); </ins> ``` Your `h2` element should use the font `Lobster`.

Discussion:
<!-- NOTE: If you're reporting a security issue, don't create a GitHub issue. Instead, email We will look into it immediately. --Affected page Your code Expected behavior Importing must be outside the tag not inside it. This code above will pass the test cases even tho the font isn't applied and imported inside the tag. Screenshots As you can see the lobster font is not applied to the tag but it still passes all the tests. ! This is the right implementation of importing a tag ! System (please complete the following information): Device: Laptop OS: Windows 10 Browser: Chrome Version: 90.0.4430.212 (Official Build) (64-bit) Additional context Add any other context about the problem here.
Thanks for the report the regex for this one is a bit too permissive. It should check that the link is not inside the style tags (without using lookbehinds, because we've broken safari often enough recently)
Change:
constructor(props) { super(props); this.state = { <del> name: 'freeCodeCamp!' </del> <ins> firstName: 'freeCodeCamp!' </ins> } } render() { return ( <div> <del> <h1>{this.state.name}</h1> </del> <ins> <h1>{this.state.firstName}</h1> </ins> </div> ); }

Discussion:
A user wondering why his solution passed. I then realized the 2nd test test is not working as intended. The user is supposed to assign a string to a property of . The user's solution assigns an uninitialized variable as a property. The purpose of the test is to make sure the user assigns a string value to a prop named , but the test still allows the user to pass as the prop's value and the test passes. Not sure why, but assigning an uninitialized property to ends up assigned an empty string to it. This of course passes the test requirement but defeats the purpose of the learning here. I suggest changed the required property name to something like , so if a user does something like this, all of the tests will fail. Test in question: The second test should fail because the property of should be undefinedbecause it was not initialized by the user's code. No response Device: [e.g. iPhone 6, Laptop] OS: [e.g. iOS 14, Windows 10, Ubuntu 20.04] Browser: [e.g. Chrome, Safari] Version: [e.g. 22] No response
After a bit of research, it appears that assigning as a property that is uninitialized is the same as writing: = { } Since the window has no name, it is just an empty string.
Change:
## Bash command: ssh <del> **Used to securly connect to a remote server** using Diffie-Hellman algorythm for key exchange, ssh replaces the archaic telnet program for remote shell sessions. </del> <ins> **Used to connect to a remote computer** It's full form is 'Secure Shell'. It's purpose is to connect to another remote computer using tcp. The address of the remote computer can be provided using an IP address or, if provided, an identifier. </ins> <del> for example `ssh 192.0.2.1` will try to establish a connection with that host. The address of the remote computer can be provided using an IP address resolvable hostname or FQDN. </del> <ins> If the remote computer requires user login, the form `ssh username@remote_address` can be used, which will then prompt for the user password on successful connection. Example command: `ssh pi@192.168.0.101` This will connect to the computer in the local ip address of 192.168.0.101 and log in with the username pi. Another way to use this command is to pipe a command directly to it. For example: To execute the command `ls /tmp/doc` on the computer with ip address 192.168.0.101, type the following command at a shell prompt: `ssh 192.168.0.101  ls /tmp/doc` After authenticating to the remote server, the contents of the remote directory will be displayed, and you will return to your local shell prompt. </ins> If you wish to use a different username then the one initiating the session (i.e. you're using ssh from root but wish to log in as different user to a remote system), the form `ssh username@remote_address` can be used, which will then prompt for the user password on successful connection.

Discussion:
<!-- NOTE: If you're reporting a security issue, don't create a GitHub issue. Instead, email We will look into it immediately. --Describe your problem and how to reproduce it: this needs more work, but to begin a process - adding the proper acronym explanation (which is almost 50% of understanding the topic) and reducing misinformation about identifiers. also some explanation on the benefit of using this tool compared to its predecessor also adding basic usage and giving some more basic understanding of this tool Add a Link to the page with the problem:
I created a pull request for adding some basic information. Still need to correct the misinformation about identifiers.
Change:
--- <del> `What do he does as our team lead?` </del> <ins> `What do he does as the team lead?` </ins> ### --feedback--

Discussion:
The fill-in-the-blank sentence doesn't match what the character says. The written sentence is: The character says: Note the "the", instead of "our". No response Device: all OS: all Browser: all Version: all No response
Thank you for reporting the issue. Note for maintainers: Step 54 () uses "our" instead of "the" in the quiz. I think it's fine as-is since there isn't associated audio/caption text, but I'd vote updating it, too, for consistency. This issue is open to first-time code contributors to this repository. Requirements: In Change the text in the tag from to In Change the text in the tag from to Change the fill-in-the-blank text from to Change the backtick placement in the description text from ` In Change the text of the answers from to Please make sure you read our , we prioritize contributors following the instructions in our guides. Join us in our or our if you need help contributing; our moderators will guide you through this. Sometimes we may get more than one pull request. We typically accept the most quality contribution followed by the one that is made first. Happy contributing.
Hi I've created a PR addressing these changes.
Change:
assert.match(__helpers.removeJSComments(code), /rows.push(padRows*(s*rows.lengths*+s*1/); ``` <del> Your `while` loop should run while `rows.length` is less than `count`. ```js assert.match(__helpers.removeJSComments(code), /whiles*(s*rows.lengths*<s*count)/); ``` </del> # --seed-- ## --seed-contents--

Discussion:
On step 89 and 90 of the Pyramid generator there is this misterious error that appear, it can be confusing for campers. !
Error is coming from the function, specifically one of the string repeats. Depending on the and , when or will be , calling method of string will show that error. Edit: When condition is there's no such issue.
Yep. I think reworking the lessons so we never leave the learner with broken code (or at least never unexplained broken code) is the way to go.
I'm not sure if it was even intended to have broken code, description is suggesting everything should work fine. Step 91 asks for two changes, one of which specifically makes this error appear (second change fixes the issue).
Yeah, it's a bit confusing. Probably not intentional, though. On 91 there's this: the only time I don't see the error is when I've followed all the instructions on step 91.
Is this not enough to clear up any doubts? Cuz after following the instructions in step 91, there's nothing mysterious about the error anymore.
I don't think so. Step 89, where error is introduced, doesn't mention it. Neither does 90. It's only when you reach 91 that the error is mentioned and the text is which is incorrect. Changing to has no effect on the error. It's only the combination of that and adjusting the conditional that finally removes the error. The main issue with this is that it breaks the feedback loop between learner's actions and the code's behaviour. Speaking for myself, everything gets harder when the results of my actions are essentially invisible. I know we run tests to check you re doing it right, but that's not really a substitute for them seeing how your actions impact the program.
Okay. We need to at least note the possibility of an unexpected error to the camper. I'm thinking on step 89 now.
Just for posterity, the steps got shifted. Error is introduced by completing step 95 Error is resolved by completing step 96 What should be changed here: Step 95 should: Introduce and explain the error Ask the campers to change the comparison to Step 96 should: No longer ask campers to change the to Not mention that creates a
Change:
flex-direction: column; } .footer-right { <del> padding-left: 0px; </del> <ins> padding-left: 0; </ins> } .footer-container .col-spacer { margin-top: 40px;

Discussion:
found an issue: Unexpected shorthand &quot;padding&quot; after &quot;padding-bottom&quot; (declaration-block-no-shorthand-property-overrides) It's currently on:
I'm happy to fix this (and remove the units from zero values also in that file), but I'm not sure what the preferred replacement is for the padding. Should I just remove the padding: and add lines for padding-top: 0; padding-right: 15px; to reflect the styles currently specified by the padding: 0 15px 15px line?
I would delete , you can start and these question will be answer by reviewers if they need changes later
Change:
Here is an example of returning a value using an `if-else` statement and a refactored example using a ternary operator: ```js <del> if (num > 5) { return 'num is greater than 5'; </del> <ins> // if-else statement if (score > 0) { return score </ins> } else { <del> return 'num is smaller than or equal to 5'; </del> <ins> return default_score </ins> } <del> return num > 5 ? 'num is greater than 5' : 'num is smaller than or equal to 5'; </del> <ins> // ternary operator score > 0 ? score : default_score </ins> ``` In `getMonsterAttackValue`, change `return hit` to a ternary operator that returns `hit` if `hit` is greater than `0`, or returns `0` if it is not.

Discussion:
We are still getting a lot of people on the forum confused on how to do step 146 of RPG project. They are looking to the current example and returning strings when the directions say to return the variable and the number . In order to clear up confusion, we should chose a different example. I know that this is updated code example is very similar to what they need to do in the step. But I think that is what they need at this stage. js // if-else statement if (score 0) { return score } else { return defaultscore } // ternary operator score 0 ? score : defaultscore ` see explanation above see explanation above No response Device: [e.g. iPhone 6, Laptop] OS: [e.g. iOS 14, Windows 10, Ubuntu 20.04] Browser: [e.g. Chrome, Safari] Version: [e.g. 22] No response
This has been opened for contribution. The first comprehensive PR created will be reviewed and merged. We typically do not assign issues to anyone other than long-time contributors. If you would like to contribute and have not read the contributors docs, please do so here: If you have any issues with contributing, be sure to join us on the , or on the Happy coding