jiebi/CodeConvo huggingface dataset:
"The next option for the CSS <code>position</code> property is <code>absolute</code>, which locks the element in place relative to its parent container. Unlike the <code>relative</code> position, this removes the element from the normal flow of the document, so surrounding items ignore it. The CSS offset properties (top or bottom and left or right) are used to adjust the position.", "One nuance with absolute positioning is that it will be locked relative to its closest <em>positioned</em> ancestor. If you forget to add a position rule to the parent item, (this is typically done using <code>position: relative;</code>), the browser will keep looking up the chain and ultimately default to the body tag.", "<hr>", <del> "Lock the <code>#searchbar</code> element to the top-right of its <code>section</code> parent by declaring its <code>position</code> as <code>absolute</code>. Give it <code>top</code> and <code>right</code> offsets of 0.5 pixels each." </del> <ins> "Lock the <code>#searchbar</code> element to the top-right of its <code>section</code> parent by declaring its <code>position</code> as <code>absolute</code>. Give it <code>top</code> and <code>right</code> offsets of 50 pixels each." </ins> ], "challengeSeed": [ "<style>",
], "tests": [ "assert($('#searchbar').css('position') == 'absolute', 'message: The <code>#searchbar</code> element should have a <code>position</code> set to <code>absolute</code>.');", <del> "assert($('#searchbar').css('top') == '0.5px', 'message: Your code should use the <code>top</code> CSS offset of 0.5 pixels on the <code>#searchbar</code> element.');", "assert($('#searchbar').css('right') == '0.5px', 'message: Your code should use the <code>right</code> CSS offset of 0.5 pixels on the <code>#searchbar</code> element.');" </del> <ins> "assert($('#searchbar').css('top') == '50px', 'message: Your code should use the <code>top</code> CSS offset of 50 pixels on the <code>#searchbar</code> element.');", "assert($('#searchbar').css('right') == '50px', 'message: Your code should use the <code>right</code> CSS offset of 50 pixels on the <code>#searchbar</code> element.');" </ins> ], "solutions": [], "hints": [],
], "tests": [ "assert(typeof timesFive === 'function', 'message: <code>timesFive</code> should be a function');", <del> "assert(code.match(/timesFive(s*d+s*)/g), 'message: function <code>timesFive</code> should be called with a number');", </del> <ins> "assert(code.match(/timesFive(s*d+s*)/g), 'message: function <code>timesFive</code> should be called with a number');", </ins> "assert(timesFive(5) === 25, 'message: <code>timesFive(5)</code> should return <code>25</code>');", "assert(timesFive(2) === 10, 'message: <code>timesFive(2)</code> should return <code>10</code>');", "assert(timesFive(0) === 0, 'message: <code>timesFive(0)</code> should return <code>0</code>');"
"In the game of <a href="https://en.wikipedia.org/wiki/Golf" target="_blank">golf</a> each hole has a <code>par</code> meaning the average number of <code>strokes</code> a golfer is expected to make in order to sink the ball in a hole to complete the play. Depending on how far above or below <code>par</code> your <code>strokes</code> are, there is a different nickname.", "Your function will be passed <code>par</code> and <code>strokes</code> arguments. Return the correct string according to this table which lists the strokes in order of priority; top (highest) to bottom (lowest):", "<table class="table table-striped"><thead><tr><th>Strokes</th><th>Return</th></tr></thead><tbody><tr><td>1</td><td>"Hole-in-one!"</td></tr><tr><td>&lt;= par - 2</td><td>"Eagle"</td></tr><tr><td>par - 1</td><td>"Birdie"</td></tr><tr><td>par</td><td>"Par"</td></tr><tr><td>par + 1</td><td>"Bogey"</td></tr><tr><td>par + 2</td><td>"Double Bogey"</td></tr><tr><td>&gt;= par + 3</td><td>"Go Home!"</td></tr></tbody></table>", <del> "<code>par</code> and <code>strokes</code> will always be numeric and positive." </del> <ins> "<code>par</code> and <code>strokes</code> will always be numeric and positive. We have added an array of all the names for your convenience." </ins> ], "releasedOn": "January 1, 2016", "challengeSeed": [ <ins> "var names = ["Hole-in-one!", "Eagle", "Birdie", "Par", "Bogey", "Double Bogey", "Go Home!"];", </ins> "function golfScore(par, strokes) {", "  // Only change code below this line", "  ",
```yml tests: - text: The first <code>div</code> should have a <code>height</code> of 12 pixels. <del> testString: assert($('div').eq(0).css('height') == '12px'); </del> <ins> testString: assert($('div').eq(0)[0].style.height === '12px'); </ins> - text: The second <code>div</code> should have a <code>height</code> of 31 pixels. <del> testString: assert($('div').eq(1).css('height') == '31px'); </del> <ins> testString: assert($('div').eq(1)[0].style.height === '31px'); </ins> - text: The third <code>div</code> should have a <code>height</code> of 22 pixels. <del> testString: assert($('div').eq(2).css('height') == '22px'); </del> <ins> testString: assert($('div').eq(2)[0].style.height === '22px'); </ins> - text: The fourth <code>div</code> should have a <code>height</code> of 17 pixels. <del> testString: assert($('div').eq(3).css('height') == '17px'); </del> <ins> testString: assert($('div').eq(3)[0].style.height === '17px'); </ins> - text: The fifth <code>div</code> should have a <code>height</code> of 25 pixels. <del> testString: assert($('div').eq(4).css('height') == '25px'); </del> <ins> testString: assert($('div').eq(4)[0].style.height === '25px'); </ins> - text: The sixth <code>div</code> should have a <code>height</code> of 18 pixels. <del> testString: assert($('div').eq(5).css('height') == '18px'); </del> <ins> testString: assert($('div').eq(5)[0].style.height === '18px'); </ins> - text: The seventh <code>div</code> should have a <code>height</code> of 29 pixels. <del> testString: assert($('div').eq(6).css('height') == '29px'); </del> <ins> testString: assert($('div').eq(6)[0].style.height === '29px'); </ins> - text: The eighth <code>div</code> should have a <code>height</code> of 14 pixels. <del> testString: assert($('div').eq(7).css('height') == '14px'); </del> <ins> testString: assert($('div').eq(7)[0].style.height === '14px'); </ins> - text: The ninth <code>div</code> should have a <code>height</code> of 9 pixels. <del> testString: assert($('div').eq(8).css('height') == '9px'); </del> <ins> testString: assert($('div').eq(8)[0].style.height === '9px'); </ins> ```
## Solution <section id='solution'> <del> ```js // solution required </del> <ins> ```html <style> .bar { width: 25px; height: 100px; display: inline-block; background-color: blue; } </style> <body> <script> const dataset = [12, 31, 22, 17, 25, 18, 29, 14, 9]; d3.select("body").selectAll("div") .data(dataset) .enter() .append("div") .attr("class", "bar") .style('height', d => `${d}px`) </script> </body> </ins> ``` </section>
Puedes realizar los cambios sin tener que ejecutar nada desde tu sistema local. <del> Después de que encuentres el archivo que quieras modificar desde la interfaz de GitHub, haz clic en el icono de lápiz para comenzar a editar el archivo. Esto automáticamente creara una bifurcación del proyecto, si es que no tienes una todavía. </del> <ins> Después de que encuentres el archivo que quieras modificar desde la interfaz de GitHub, hace clic en el icono de lápiz para comenzar a editar el archivo. Esto automáticamente creara una bifurcación del proyecto, si es que no tienes una todavía. </ins> También puedes clonar el proyecto y editarlo de manera local en tu ordenador. Si necesitas ayuda al respecto, dale un vistazo a la [guía principal de contribución](/CONTRIBUTING.md). ### Patrón de los Desafíos. <del> He aquí un patrón de cómo se verán los archivos markdown correspondientes a los desafíos. </del> <ins> He aquí un patrón de cómo se verán los archivos reduccion correspondientes a los desafíos. </ins> ````md ---
Documentos: Actualizadas recomendaciones de contribución ``` <del> Se breve, no más de 50 caracteres. Puedes añadir información extra en la descripción del mensaje. </del> <ins> Sea breve, no más de 50 caracteres. Puedes añadir información extra en la descripción del mensaje. </ins> esto no supone ningún esfuerzo adicional respecto a mensajes como 'update file' o 'add index.md'
<ins> <!-- do not translate this --> | [Read these guidelines in other languages](/docs/i18n-languages) | |-| <!-- do not translate this --> # Как создать Pull Request (Пулл Реквест) ## Как сделать хороший заголовок для Pull Request: Создавая Pull Request (PR), воспользуйтесь данной таблицей, чтобы решить, как правильно озаглавить PR в формате: `fix/feat/chore/refactor/docs/perf (scope): PR Title` Например: `fix(learn): Fixed tests for the do...while loop challenge`. | Область | Описание | |---|---| | `learn`,`curriculum` | Для PR'ов, которые вносят изменения в учебный план. | | `client` | Для PR'ов, которые вносят изменения в логику клиентской платформы или пользовательский интерфейс. | | `guide` | Для PR'ов, которые вносят изменения в инстукции. | | `docs` | Для PR'ов, которые вносят изменения в документацию. | ## Создание Пулл Реквеста (PR) 1. После того, как вы внесёте какие-нибудь изменения в свой форк репозитория, GitHub предложит вам создать PR ![Изображение - Предложение о создании PR](/docs/images/github/compare-pull-request-prompt.png) 2. По умолчанию все PR создаются в ветку `master` основного репозитория freeCodeCamp При создании PR, убедитесь, что в поле "base fork" указан репозиторий freeCodeCamp/freeCodeCamp ![Изображение - Сравнение форков при создании PR](/docs/images/github/comparing-forks-for-pull-request.png) 3. Нажать на кнопку "Create pull request", для создания PR из вашей верки в ветку `master` freeCodeCamp. 4. В поле описания PR добавьте более подробный отчёт сделанных вами изменений и причины по которым появилась такая необходимость - Вам будет предоставлен шаблон, который содержит контрольные список пунктов, которые вам необходимо выполнить, прежде чем вы создадите PR. - Заполните эти пункты. Опираясь на них, будет приниматься решение о рассмотрении и принятии вашего PR - Если PR предназначен для исправления существующей ошибки/проблемы, то в конце описание вашего PR добавьте ключевое слово `closes` и #xxxx (где xxxx это номер выпуска). Например: `closes #1337`. Так GitHub поймёт, что при успешном принятии PR нужно автоматически закрыть Issue с указанным номером 5. Укажите, тестировали ли вы локальную копию сайта или нет. Тестирование необходимо, когда вы не просто меняете какой-то текст (например, статью руководства), а изменяете JavaScript, HTML или CSS файлы, которые могут изменить функциональность или макет страницы. </ins>
<ins> --- title: Use the d3.max and d3.min Functions to Find Minimum and Maximum Values in a Dataset --- ## Use the d3.max and d3.min Functions to Find Minimum and Maximum Values in a Dataset This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/certifications/data-visualization/data-visualization-with-d3/use-the-d3.max-and-d3.min-functions-to-find-minimum-and-maximum-values-in-a-dataset/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>. <a href='https://github.com/freecodecamp/guides/blob/master/README.md' target='_blank' rel='nofollow'>This quick style guide will help ensure your pull request gets accepted</a>. <!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds  --> </ins>
<del> --- title: Use the d3.max and d3.min Functions to Find Minimum and Maximum Values in a Dataset --- ## Use the d3.max and d3.min Functions to Find Minimum and Maximum Values in a Dataset This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/certifications/data-visualization/data-visualization-with-d3/use-the-d3.max-and-d3.min-functions-to-find-minimum-and-maximum-values-in-a-dataset/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>. <a href='https://github.com/freecodecamp/guides/blob/master/README.md' target='_blank' rel='nofollow'>This quick style guide will help ensure your pull request gets accepted</a>. <!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds  --> </del>
The `<header>` tag is a container which is used for navigational links or introductory content. It may typically include heading elements, such as `<h1>`, `<h2>`, but may also include other elements such as a search form, logo, author information etc. <del> <h1> corresponds to the most important heading. As we move to other tags like <h2>, <h3>, etc the degree of importance decreases. </del> <ins> `<h1>` corresponds to the most important heading. As we move to other tags like `<h2>`, `<h3>`, etc the degree of importance decreases. </ins> Although not required, the `<header>` tag is intended to contain the surrounding sections heading. It may also be used more than once in an HTML document. It is important to note that the `<header>` tag does not introduce a new section, but is simply the head of a section. Here's an example using the `<header>` tag:
- text: No global <code>myVar</code> variable testString: assert(typeof myVar === 'undefined', 'No global <code>myVar</code> variable'); - text: Add a local <code>myVar</code> variable <del> testString: assert(/vars+myVar/.test(code), 'Add a local <code>myVar</code> variable'); </del> <ins> testString: assert(/functions+myLocalScopes*(s*)s*{s[sS]+s*vars*myVars*(s*|=[sS]+)s*;[sS]+}/.test(code), 'Add a local <code>myVar</code> variable'); </ins> ```
'project.backEnd': submitProject }; <del> function shouldShowDonate(state) { return showDonationSelector(state) ? of(openDonationModal()) : empty(); } </del> export default function completionEpic(action$, state$) { return action$.pipe( ofType(types.submitChallenge), switchMap(({ type }) => { const state = state$.value; const meta = challengeMetaSelector(state); <del> const { isDonating } = userSelector(state); </del> const { nextChallengePath, introPath, challengeType } = meta; <del> const showDonate = isDonating ? empty() : shouldShowDonate(state); </del> const closeChallengeModal = of(closeModal('completion')); let submitter = () => of({ type: 'no-user-signed-in' }); if (
yield put(updateSuccessMessage(randomCompliment())); } <ins> function* showDonateModalSaga() { let { isDonating } = yield select(userSelector); let shouldShowDonate = yield select(showDonationSelector); if (!isDonating && shouldShowDonate) { yield put(openDonationModal()); } } </ins> export function createCurrentChallengeSaga(types) { return [ takeEvery(types.challengeMounted, currentChallengeSaga), <del> takeEvery(types.challengeMounted, updateSuccessMessageSaga) </del> <ins> takeEvery(types.challengeMounted, updateSuccessMessageSaga), takeEvery(types.challengeMounted, showDonateModalSaga) </ins> ]; }
Вы можете внести свой вклад в интересующую вас область: <del> 1. [Внести вклад в этот открытый репозиторий.](#contribute-to-this-open-source-codebase) </del> <ins> 1. [Внести вклад в этот открытый репозиторий.](#внести-свой-вклад-в-этот-open-source-проект) </ins> Помогите нам в создании или редактировании [обучающих статей](https://www.freecodecamp.org/guide), [задач по программированию](https://www.freecodecamp.org/learn) или исправлении ошибок на нашей обучающей платформе.
Вы можете помочь нам: <del> - [📝 В исследовании, написании и обновлении статей нашего руководства.](#research-write-and-update-our-guide-articles) </del> <ins> - [📝 В исследовании, написании и обновлении статей нашего руководства.](#изучение-написание-и-обновление-статей-нашего-руководства) </ins> <del> - [💻 В создании, обновлении и исправлении ошибок в наших задачах по программированию.](#create-update-and-fix-bugs-in-our-curriculum-challenges) </del> <ins> - [💻 В создании, обновлении и исправлении ошибок в наших задачах по программированию.](#создание-обновление-и-исправление-ошибок-в-наших-задачах-на-кодирование) </ins> <del> - [🌐 В переводе обучающих статей и задач по программированию.](#translate-guide-articles-and-curriculum-challenges) </del> <ins> - [🌐 В переводе обучающих статей и задач по программированию.](#перевод-статей-руководства-и-задач-на-кодирование) </ins> <del> - [🛠 В исправлении ошибок на обучающей платформе freeCodeCamp.org](#help-us-fix-bugs-in-freecodecamporgs-learning-platform) </del> <ins> - [🛠 В исправлении ошибок на обучающей платформе freeCodeCamp.org](#помогите-нам-исправить-ошибки-в-обучающей-платформе-freecodecamporg) </ins> ### Изучение, написание и обновление статей нашего руководства
Puedes optar por contribuir a cualquier área de tu interés: <del> 1. [Contribuir a esta base de código fuente abierto.](#contribute-to-this-open-source-codebase) </del> <ins> 1. [Contribuir a esta base de código fuente abierto.](#contribuye-a-esta-base-de-código-abierto) </ins> Ayúdanos a crear o editar [artículos de guía](https://www.freecodecamp.org/guide), [desafíos de codificación](https://www.freecodecamp.org/learn) o a corregir errores en la plataforma de aprendizaje.
Puedes ayudarnos a: <del> - [📝 Investigar, escribir y actualizar nuestras guías.](#investiga-escribe-y-actualiza-nuestros-artículos-de-guía) </del> <ins> - [📝 Investigar, escribir y actualizar nuestras guías.](#investiga-escribe-y-actualiza-nuestras-guías) </ins> - [💻 Crear, actualizar y corregir errores en nuestros desafíos de código.](#crear-actualizar-y-corregir-errores-en-nuestros-desafíos-de-codificación) - [🌐 Traducir artículos de guía y desafíos de código.](#traducir-artículos-de-guía-y-desafíos-de-codificación) <del> - [🛠 Corregir errores en la plataforma de aprendizaje de freeCodeCamp.org.](#ayúdenos-a-corregir-errores-en-la-plataforma-de-aprendizaje-de-freeCodeCamp.org) </del> <ins> - [🛠 Corregir errores en la plataforma de aprendizaje de freeCodeCamp.org.](#investiga-escribe-y-actualiza-nuestras-guías) </ins> ### Investiga, escribe y actualiza nuestras guías
3. 帮助我们为[YouTube频道视频](https://www.youtube.com/channel/UC8butISFwT-Wl7EV0hUK0BQ/videos)添加字幕。 <del> ##贡献予开源代码库 </del> <ins> ## 贡献予开源代码库 </ins> 我们有数以千计的[编码挑战](https://learn.freecodecamp.org)和[指南文章](https://guide.freecodecamp.org)集中在这个庞大的开源代码库中。
- [📝 研究，编写和更新我们的指南文章](#研究编写和更新我们的指南文章) <del> - [💻 创建，更新编码挑战和修复其中的错误](创建更新编码挑战和修复其中的错误) </del> <ins> - [💻 创建，更新编码挑战和修复其中的错误](#创建更新编码挑战和修复其中的错误) </ins> - [🌐 翻译指南文章和编码挑战](#翻译指南文章和编码挑战) <del> - [🛠 帮助我们修复freeCodeCamp.org学习平台中的错误](#帮助我们修复freeCodeCamp.org学习平台中的错误) </del> <ins> - [🛠 帮助我们修复freeCodeCamp.org学习平台中的错误](#帮助我们修复freecodecamporg学习平台中的错误) </ins> ### 研究，编写和更新我们的指南文章
1. [Contribua para essa base de códigos abertos.](#contribua-para-essa-base-de-códigos-abertos) <del> Nos ajude criando e editando [Artigos de guias](https://www.freecodecamp.org/guide), [desafios de código](https://www.freecodecamp.org/learn) e corrigindo bugs na plataforma de aprendizado. </del> <ins> Nos ajude criando e editando [Artigos de guias](https://guide.freecodecamp.org), [desafios de código](https://www.freecodecamp.org/learn) e corrigindo bugs na plataforma de aprendizado. </ins> 2. Ajude campistas em nosso [fórum público](https://www.freecodecamp.org/forum/).
[stubTrue, identity] ]); <del> export function concatHtml({ required = [], template, files = [], theme = 'night' } = {}) { theme = theme === '' ? 'night' : theme; </del> <ins> export function concatHtml({ required = [], template, files = [] } = {}) { </ins> const createBody = template ? _template(template) : defaultTemplate; <del> const displayTheme = theme === 'night' ? nightThemeStyle : ` `; </del> const head = required .map(({ link, src }) => { if (link && src) {
runTestInTestFrame(document, testString, testTimeout); } <del> export function buildDOMChallenge({ files, required = [], template = '', theme = `` }) { </del> <ins> export function buildDOMChallenge({ files, required = [], template = '' }) { </ins> const finalRequires = [...globalRequires, ...required, ...frameRunner]; const loadEnzyme = Object.keys(files).some(key => files[key].ext === 'jsx'); const toHtml = [jsToHtml, cssToHtml];
} const { textarea } = this.state; <ins> const placeholderText = `Please provide as much detail as possible about the account or behavior you are reporting.`; </ins> return ( <Fragment> <Helmet> <title>Report a users profile | freeCodeCamp.org</title> </Helmet> <del> <FullWidthRow> <Spacer size={2} /> <Col md={8} mdOffset={2}> </del> <ins> <Spacer size={2} /> <Row className='text-center'> <Col sm={8} smOffset={2} xs={12}> </ins> <h2> Do you want to report {username} 's profile for abuse? </h2> <ins> </Col> </Row> <Row> <Col sm={6} smOffset={3} xs={12}> </ins> <p> We will notify the community moderators' team, and a send copy of <del> this report to your email:{' '} <span className='green-text'>{email}</span>. </del> <ins> this report to your email: <strong>{email}</strong> </ins> </p> <p>We may get back to you for more information, if required.</p> <form onSubmit={this.handleSubmit}> <FormGroup controlId='report-user-textarea'> <del> <ControlLabel>Additional Information</ControlLabel> </del> <ins> <ControlLabel>What would you like to report?</ControlLabel> </ins> <FormControl componentClass='textarea' onChange={this.handleChange} <del> placeholder='' </del> <ins> placeholder={placeholderText} </ins> value={textarea} /> </FormGroup> <Button block={true} bsStyle='primary' type='submit'> Submit the report </Button> <ins> <Spacer /> </ins> </form> </Col> <del> </FullWidthRow> </del> <ins> </Row> </ins> </Fragment> ); }
} }; <del> exports.createPages = function createPages({ graphql, actions }) { </del> <ins> exports.createPages = function createPages({ graphql, actions, reporter }) { if (!env.algoliaAPIKey || !env.algoliaAppId) { if (process.env.FREECODECAMP_NODE_ENV === 'production') { throw new Error( 'Algolia App id and API key are required to start the client!' ); } else { reporter.info( 'Algolia keys missing or invalid. Required for search to yield results.' ); } } </ins> const { createPage } = actions; return new Promise((resolve, reject) => {
const DEBOUNCE_TIME = 100; <del> const searchClient = algoliasearch(algoliaAppId, algoliaAPIKey); </del> <ins> // If a key is missing, searches will fail, but the client will still render. const searchClient = algoliaAppId && algoliaAPIKey ? algoliasearch(algoliaAppId, algoliaAPIKey) : {}; </ins> const propTypes = { children: PropTypes.any,
module.exports = Object.assign(locations, { locale, stripePublicKey, <del> algoliaAppId, algoliaAPIKey </del> <ins> algoliaAppId: !algoliaAppId || algoliaAppId === 'Algolia app id from dashboard' ? null : algoliaAppId, algoliaAPIKey: !algoliaAPIKey || algoliaAPIKey === 'Algolia api key from dashboard' ? null : algoliaAPIKey </ins> });
ROLLBAR_CLIENT_ID='post_client_id from rollbar dashboard' ALGOLIA_ADMIN_KEY=123abc <del> ALGOLIA_APP_ID=ACDEFG ALGOLIA_API_KEY=123abc </del> <ins> ALGOLIA_APP_ID='Algolia app id from dashboard' ALGOLIA_API_KEY='Algolia api key from dashboard' </ins> AUTH0_CLIENT_ID=stuff AUTH0_CLIENT_SECRET=stuff
## Description <section id='description'> We can access the data inside arrays using <dfn>indexes</dfn>. <del> Array indexes are written in the same bracket notation that strings use, except that instead of specifying a character, they are specifying an entry in the array. Like strings, arrays use <dfn>zero-based</dfn> indexing, so the first element in an array is element <code>0</code>. </del> <ins> Array indexes are written in the same bracket notation that strings use, except that instead of specifying a character, they are specifying an entry in the array. Like strings, arrays use <dfn>zero-based</dfn> indexing, so the first element in an array has an index of <code>0</code>. </ins> <br /> <strong>Example</strong>