content_type stringclasses 8 values | main_lang stringclasses 7 values | message stringlengths 1 50 | sha stringlengths 40 40 | patch stringlengths 52 962k | file_count int64 1 300 |
|---|---|---|---|---|---|
Java | Java | synchronize message sending | b796c1e87eea10bb6ddd7dc5c3b6b1befa3806a7 | <ide><path>spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/session/AbstractHttpSockJsSession.java
<ide> public abstract class AbstractHttpSockJsSession extends AbstractSockJsSession {
<ide>
<ide> private final Object responseLock = new Object();
<ide>
<del> private volatile boolean requestInitialized;
<add> private volatile boolean readyToSend;
<ide>
<ide>
<ide> private final Queue<String> messageCache;
<ide> public void handleInitialRequest(ServerHttpRequest request, ServerHttpResponse r
<ide> this.localAddress = request.getLocalAddress();
<ide> this.remoteAddress = request.getRemoteAddress();
<ide>
<del> this.response = response;
<del> this.frameFormat = frameFormat;
<del> this.asyncRequestControl = request.getAsyncRequestControl(response);
<del>
<ide> synchronized (this.responseLock) {
<ide> try {
<add> this.response = response;
<add> this.frameFormat = frameFormat;
<add> this.asyncRequestControl = request.getAsyncRequestControl(response);
<add> this.asyncRequestControl.start(-1);
<add>
<ide> // Let "our" handler know before sending the open frame to the remote handler
<ide> delegateConnectionEstablished();
<del> writePrelude(request, response);
<del> writeFrame(SockJsFrame.openFrame());
<del> if (isStreaming() && !isClosed()) {
<del> startAsyncRequest();
<add>
<add> if (isStreaming()) {
<add> writePrelude(request, response);
<add> writeFrame(SockJsFrame.openFrame());
<add> flushCache();
<add> this.readyToSend = true;
<add> }
<add> else {
<add> writeFrame(SockJsFrame.openFrame());
<ide> }
<ide> }
<ide> catch (Throwable ex) {
<ide> public void handleInitialRequest(ServerHttpRequest request, ServerHttpResponse r
<ide> protected void writePrelude(ServerHttpRequest request, ServerHttpResponse response) throws IOException {
<ide> }
<ide>
<del> private void startAsyncRequest() {
<del> this.asyncRequestControl.start(-1);
<del> if (this.messageCache.size() > 0) {
<del> flushCache();
<del> }
<del> else {
<del> scheduleHeartbeat();
<del> }
<del> this.requestInitialized = true;
<del> }
<del>
<ide> /**
<ide> * Handle all requests, except the first one, to receive messages on a SockJS
<ide> * HTTP transport based session.
<ide> public void handleSuccessiveRequest(ServerHttpRequest request, ServerHttpRespons
<ide> try {
<ide> if (isClosed()) {
<ide> response.getBody().write(SockJsFrame.closeFrameGoAway().getContentBytes());
<add> return;
<ide> }
<ide> this.response = response;
<ide> this.frameFormat = frameFormat;
<ide> this.asyncRequestControl = request.getAsyncRequestControl(response);
<del> writePrelude(request, response);
<del> startAsyncRequest();
<add> this.asyncRequestControl.start(-1);
<add>
<add> if (isStreaming()) {
<add> writePrelude(request, response);
<add> flushCache();
<add> this.readyToSend = true;
<add> }
<add> else {
<add> if (this.messageCache.isEmpty()) {
<add> scheduleHeartbeat();
<add> this.readyToSend = true;
<add> }
<add> else {
<add> flushCache();
<add> }
<add> }
<ide> }
<ide> catch (Throwable ex) {
<ide> tryCloseWithSockJsTransportError(ex, CloseStatus.SERVER_ERROR);
<ide> public void handleSuccessiveRequest(ServerHttpRequest request, ServerHttpRespons
<ide>
<ide> @Override
<ide> protected final void sendMessageInternal(String message) throws SockJsTransportFailureException {
<del> this.messageCache.add(message);
<del> tryFlushCache();
<del> }
<del>
<del> private boolean tryFlushCache() throws SockJsTransportFailureException {
<ide> synchronized (this.responseLock) {
<del> if (this.messageCache.isEmpty()) {
<del> logger.trace("Nothing to flush in session=" + this.getId());
<del> return false;
<del> }
<add> this.messageCache.add(message);
<ide> if (logger.isTraceEnabled()) {
<ide> logger.trace(this.messageCache.size() + " message(s) to flush in session " + this.getId());
<ide> }
<del> if (isActive() && this.requestInitialized) {
<add> if (isActive() && this.readyToSend) {
<ide> if (logger.isTraceEnabled()) {
<ide> logger.trace("Session is active, ready to flush.");
<ide> }
<ide> cancelHeartbeat();
<ide> flushCache();
<del> return true;
<add> return;
<ide> }
<ide> else {
<ide> if (logger.isTraceEnabled()) {
<ide> logger.trace("Session is not active, not ready to flush.");
<ide> }
<del> return false;
<add> return;
<ide> }
<ide> }
<ide> }
<ide> protected void resetRequest() {
<ide>
<ide> ServerHttpAsyncRequestControl control = this.asyncRequestControl;
<ide> this.asyncRequestControl = null;
<del> this.requestInitialized = false;
<add> this.readyToSend = false;
<ide> this.response = null;
<ide>
<ide> updateLastActiveTime();
<ide><path>spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/session/StreamingSockJsSession.java
<ide> protected boolean isStreaming() {
<ide>
<ide> @Override
<ide> protected void flushCache() throws SockJsTransportFailureException {
<del> do {
<add> while (!getMessageCache().isEmpty()) {
<ide> String message = getMessageCache().poll();
<ide> SockJsMessageCodec messageCodec = getSockJsServiceConfig().getMessageCodec();
<ide> SockJsFrame frame = SockJsFrame.messageFrame(messageCodec, message);
<ide> protected void flushCache() throws SockJsTransportFailureException {
<ide> break;
<ide> }
<ide> }
<del> while (!getMessageCache().isEmpty());
<ide> scheduleHeartbeat();
<ide> }
<ide>
<ide><path>spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/handler/HttpSendingTransportHandlerTests.java
<ide> /*
<del> * Copyright 2002-2013 the original author or authors.
<add> * Copyright 2002-2014 the original author or authors.
<ide> *
<ide> * Licensed under the Apache License, Version 2.0 (the "License");
<ide> * you may not use this file except in compliance with the License.
<ide> public void handleRequestXhr() throws Exception {
<ide> assertFalse("Polling request should complete after open frame", this.servletRequest.isAsyncStarted());
<ide> verify(this.webSocketHandler).afterConnectionEstablished(session);
<ide>
<del> resetResponse();
<add> resetRequestAndResponse();
<ide> transportHandler.handleRequest(this.request, this.response, this.webSocketHandler, session);
<ide>
<ide> assertTrue("Polling request should remain open", this.servletRequest.isAsyncStarted());
<ide><path>spring-websocket/src/test/java/org/springframework/web/socket/sockjs/transport/session/HttpSockJsSessionTests.java
<ide> public void handleInitialRequest() throws Exception {
<ide> this.session.handleInitialRequest(this.request, this.response, this.frameFormat);
<ide>
<ide> assertEquals("hhh\no", this.servletResponse.getContentAsString());
<del> assertFalse(this.servletRequest.isAsyncStarted());
<add> assertTrue(this.servletRequest.isAsyncStarted());
<ide>
<ide> verify(this.webSocketHandler).afterConnectionEstablished(this.session);
<ide> }
<ide> public TestAbstractHttpSockJsSession(SockJsServiceConfig config, WebSocketHandle
<ide>
<ide> @Override
<ide> protected boolean isStreaming() {
<del> return false;
<add> return true;
<ide> }
<ide>
<ide> @Override | 4 |
PHP | PHP | use a collection | cb2eb7963b29aafe63c87e1d2b1e633ecd0c25b0 | <ide><path>src/Illuminate/Foundation/Console/RouteListCommand.php
<ide> protected function displayRoutes(array $routes)
<ide> */
<ide> protected function getMiddleware($route)
<ide> {
<del> $middlewares = $route->gatherMiddleware();
<del>
<del> foreach ($middlewares as $i => $middleware) {
<del> if ($middleware instanceof Closure) {
<del> $middlewares[$i] = 'Closure';
<del> }
<del> }
<del>
<del> return implode(',', $middlewares);
<add> return collect($route->gatherMiddleware())->map(function ($middleware) {
<add> return $middleware instanceof Closure ? 'Closure' : $middleware;
<add> })->implode(',');
<ide> }
<ide>
<ide> /** | 1 |
Ruby | Ruby | fix use of formbuilder.field_helpers | 1c0eece9ebfaf81b09ea9f7735020e714823314a | <ide><path>actionpack/lib/action_view/helpers/form_helper.rb
<ide> def initialize(object_name, object, template, options, proc)
<ide> @multipart = nil
<ide> end
<ide>
<del> (field_helpers - %w(label check_box radio_button fields_for hidden_field file_field)).each do |selector|
<add> (field_helpers - [:label, :check_box, :radio_button, :fields_for, :hidden_field, :file_field]).each do |selector|
<ide> class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1
<ide> def #{selector}(method, options = {}) # def text_field(method, options = {})
<ide> @template.send( # @template.send( | 1 |
Text | Text | add a note | b173abaf49164e3a7fb0f41a3ca81a48fb58bd2e | <ide><path>docs/api-reference/next/link.md
<ide> export default Home
<ide>
<ide> `Link` accepts the following props:
<ide>
<del>- `href` - The path or URL to navigate to. This is the only required prop
<add>- `href` - The path or URL to navigate to. This is the only required prop. It can also be an object, see [example here](/docs/api-reference/next/link.md#with-url-object)
<ide> - `as` - Optional decorator for the path that will be shown in the browser URL bar. Before Next.js 9.5.3 this was used for dynamic routes, check our [previous docs](https://nextjs.org/docs/tag/v9.5.2/api-reference/next/link#dynamic-routes) to see how it worked. Note: when this path differs from the one provided in `href` the previous `href`/`as` behavior is used as shown in the [previous docs](https://nextjs.org/docs/tag/v9.5.2/api-reference/next/link#dynamic-routes).
<ide> - [`passHref`](#if-the-child-is-a-custom-component-that-wraps-an-a-tag) - Forces `Link` to send the `href` property to its child. Defaults to `false`
<ide> - `prefetch` - Prefetch the page in the background. Defaults to `true`. Any `<Link />` that is in the viewport (initially or through scroll) will be preloaded. Prefetch can be disabled by passing `prefetch={false}`. When `prefetch` is set to `false`, prefetching will still occur on hover. Pages using [Static Generation](/docs/basic-features/data-fetching/get-static-props.md) will preload `JSON` files with the data for faster page transitions. Prefetching is only enabled in production. | 1 |
Mixed | Ruby | do nothing when the same block is included again | 8212dfcf14c63c006b9e1c37595f3d62eab052cf | <ide><path>activesupport/CHANGELOG.md
<add>* If the same block is `included` multiple times for a Concern, an exception is no longer raised.
<add>
<add> *Mark J. Titorenko*, *Vlad Bokov*
<add>
<ide> * Fix bug where `#to_options` for `ActiveSupport::HashWithIndifferentAccess`
<ide> would not act as alias for `#symbolize_keys`.
<ide>
<ide><path>activesupport/lib/active_support/concern.rb
<ide> def append_features(base)
<ide>
<ide> def included(base = nil, &block)
<ide> if base.nil?
<del> raise MultipleIncludedBlocks if instance_variable_defined?(:@_included_block)
<del>
<del> @_included_block = block
<add> if instance_variable_defined?(:@_included_block)
<add> if @_included_block.source_location != block.source_location
<add> raise MultipleIncludedBlocks
<add> end
<add> else
<add> @_included_block = block
<add> end
<ide> else
<ide> super
<ide> end
<ide><path>activesupport/test/concern_test.rb
<ide> def test_raise_on_multiple_included_calls
<ide> end
<ide> end
<ide> end
<add>
<add> def test_no_raise_on_same_included_call
<add> assert_nothing_raised do
<add> 2.times do
<add> load File.expand_path("../fixtures/concern/some_concern.rb", __FILE__)
<add> end
<add> end
<add> end
<ide> end
<ide><path>activesupport/test/fixtures/concern/some_concern.rb
<add># frozen_string_literal: true
<add>
<add>require "active_support/concern"
<add>
<add>module SomeConcern
<add> extend ActiveSupport::Concern
<add>
<add> included do
<add> # shouldn't raise when module is loaded more than once
<add> end
<add>end | 4 |
Javascript | Javascript | remove redundant word "the" | c8ef2feda98d8cc9fb59829148b3db1671ac3b9b | <ide><path>packages/react-dom/src/client/ReactDOMInput.js
<ide> export function postMountWrapper(
<ide> }
<ide> } else {
<ide> // When syncing the value attribute, the value property should use
<del> // the the wrapperState._initialValue property. This uses:
<add> // the wrapperState._initialValue property. This uses:
<ide> //
<ide> // 1. The value React property when present
<ide> // 2. The defaultValue React property when present
<ide> export function postMountWrapper(
<ide> node.defaultChecked = !!props.defaultChecked;
<ide> }
<ide> } else {
<del> // When syncing the checked attribute, both the the checked property and
<add> // When syncing the checked attribute, both the checked property and
<ide> // attribute are assigned at the same time using defaultChecked. This uses:
<ide> //
<ide> // 1. The checked React property when present | 1 |
Javascript | Javascript | simplify code for action helper | 4bed6d0e6bdae99574b2af1efb1b86b05f18ec95 | <ide><path>packages/ember-routing/lib/helpers/action.js
<ide> Ember.onLoad('Ember.Handlebars', function(Handlebars) {
<ide> contexts = a_slice.call(arguments, 1, -1);
<ide>
<ide> var hash = options.hash,
<del> controller;
<add> controller = options.data.keywords.controller;
<ide>
<ide> // create a hash to pass along to registerAction
<ide> var action = {
<del> eventName: hash.on || "click"
<add> eventName: hash.on || "click",
<add> parameters: {
<add> context: this,
<add> options: options,
<add> params: contexts
<add> },
<add> view: options.data.view,
<add> bubbles: hash.bubbles,
<add> preventDefault: hash.preventDefault,
<add> target: { options: options }
<ide> };
<ide>
<del> action.parameters = {
<del> context: this,
<del> options: options,
<del> params: contexts
<del> };
<del>
<del> action.view = options.data.view;
<del>
<del> var root, target;
<del>
<ide> if (hash.target) {
<del> root = this;
<del> target = hash.target;
<del> } else if (controller = options.data.keywords.controller) {
<del> root = controller;
<add> action.target.root = this;
<add> action.target.target = hash.target;
<add> } else if (controller) {
<add> action.target.root = controller;
<ide> }
<ide>
<del> action.target = { root: root, target: target, options: options };
<del> action.bubbles = hash.bubbles;
<del> action.preventDefault = hash.preventDefault;
<del>
<ide> var actionId = ActionHelper.registerAction(actionName, action, hash.allowedKeys);
<ide> return new SafeString('data-ember-action="' + actionId + '"');
<ide> });
<del>
<ide> }); | 1 |
Ruby | Ruby | use time#compare_without_coercion for super speed | fcde948e43e07d2c4e32988e05f5920501a26364 | <ide><path>activesupport/lib/active_support/file_update_checker.rb
<ide> def max_mtime(paths)
<ide> paths.each do |path|
<ide> time = File.mtime(path)
<ide>
<del> if time < time_now && time > max_time
<add> # This avoids ActiveSupport::CoreExt::Time#time_with_coercion
<add> # which is super slow when comparing two Time objects
<add> #
<add> # Equivalent Ruby:
<add> # time < time_now && time > max_time
<add> if time.compare_without_coercion(time_now) < 0 && time.compare_without_coercion(max_time) > 0
<ide> max_time = time
<ide> end
<ide> end | 1 |
Ruby | Ruby | handle some github repo audit edge cases | c0c68b2b3fc258f7d1cbc7284fda1c99d51f6052 | <ide><path>Library/Homebrew/cmd/audit.rb
<ide> def audit_github_repository
<ide> _, user, repo = *regex.match(formula.homepage) unless user
<ide> return if !user || !repo
<ide>
<del> metadata = GitHub.repository(user, repo)
<add> repo.gsub!(/.git$/, "")
<add>
<add> begin
<add> metadata = GitHub.repository(user, repo)
<add> rescue GitHub::HTTPNotFoundError => e
<add> return
<add> end
<add>
<ide> problem "GitHub fork (not canonical repository)" if metadata["fork"]
<ide> if (metadata["forks_count"] < 5) || (metadata["watchers_count"] < 5) ||
<ide> (metadata["stargazers_count"] < 10) | 1 |
Text | Text | add backticks [ci-skip] | a84788e117de633cef89d996f90c6959756c41d7 | <ide><path>guides/source/action_controller_overview.md
<ide> Your application has a session for each user in which you can store small amount
<ide> * [`ActionDispatch::Session::CookieStore`][] - Stores everything on the client.
<ide> * [`ActionDispatch::Session::CacheStore`][] - Stores the data in the Rails cache.
<ide> * `ActionDispatch::Session::ActiveRecordStore` - Stores the data in a database using Active Record (requires the `activerecord-session_store` gem).
<del>* [`ActionDispatch::Session::MemCacheStore`][] - Stores the data in a memcached cluster (this is a legacy implementation; consider using CacheStore instead).
<add>* [`ActionDispatch::Session::MemCacheStore`][] - Stores the data in a memcached cluster (this is a legacy implementation; consider using `CacheStore` instead).
<ide>
<ide> All session stores use a cookie to store a unique ID for each session (you must use a cookie, Rails will not allow you to pass the session ID in the URL as this is less secure).
<ide>
<ide><path>guides/source/active_record_querying.md
<ide> time_range = (Time.now.midnight - 1.day)..Time.now.midnight
<ide> Customer.joins(:orders).where(orders: { created_at: time_range }).distinct
<ide> ```
<ide>
<del>For more advanced conditions or to reuse an existing named scope, `Relation#merge` may be used. First, let's add a new named scope to the Order model:
<add>For more advanced conditions or to reuse an existing named scope, `Relation#merge` may be used. First, let's add a new named scope to the `Order` model:
<ide>
<ide> ```ruby
<ide> class Order < ApplicationRecord
<ide><path>guides/source/active_support_instrumentation.md
<ide> INFO. Additional keys may be added by the caller.
<ide>
<ide> #### unpermitted_parameters.action_controller
<ide>
<del>| Key | Value |
<del>| ------------- | --------------------------------------------------------------------- |
<del>| `:keys` | The unpermitted keys |
<del>| `:context` | Hash with the following keys: :controller, :action, :params, :request |
<add>| Key | Value |
<add>| ------------- | ----------------------------------------------------------------------------- |
<add>| `:keys` | The unpermitted keys |
<add>| `:context` | Hash with the following keys: `:controller`, `:action`, `:params`, `:request` |
<ide>
<ide> ### Action Dispatch
<ide>
<ide> INFO. The adapters will add their own data as well.
<ide>
<ide> #### cache_read.active_support
<ide>
<del>| Key | Value |
<del>| ------------------ | ------------------------------------------------- |
<del>| `:key` | Key used in the store |
<del>| `:store` | Name of the store class |
<del>| `:hit` | If this read is a hit |
<del>| `:super_operation` | :fetch is added when a read is used with `#fetch` |
<add>| Key | Value |
<add>| ------------------ | --------------------------------------------------- |
<add>| `:key` | Key used in the store |
<add>| `:store` | Name of the store class |
<add>| `:hit` | If this read is a hit |
<add>| `:super_operation` | `:fetch` is added when a read is used with `#fetch` |
<ide>
<ide> #### cache_generate.active_support
<ide>
<ide><path>guides/source/generators.md
<ide> $ bin/rails generate scaffold User name:string
<ide> create test/system/users_test.rb
<ide> ```
<ide>
<del>Looking at this output, it's easy to understand how generators work in Rails 3.0 and above. The scaffold generator doesn't actually generate anything; it just invokes others to do the work. This allows us to add/replace/remove any of those invocations. For instance, the scaffold generator invokes the scaffold_controller generator, which invokes erb, test_unit and helper generators. Since each generator has a single responsibility, they are easy to reuse, avoiding code duplication.
<add>Looking at this output, it's easy to understand how generators work in Rails 3.0 and above. The scaffold generator doesn't actually generate anything; it just invokes others to do the work. This allows us to add/replace/remove any of those invocations. For instance, the scaffold generator invokes the `scaffold_controller` generator, which invokes `erb`, `test_unit` and `helper` generators. Since each generator has a single responsibility, they are easy to reuse, avoiding code duplication.
<ide>
<ide> The next customization on the workflow will be to stop generating stylesheet and test fixture files for scaffolds altogether. We can achieve that by changing our configuration to the following:
<ide> | 4 |
PHP | PHP | fix scope nesting | d9cc1bdc6c624f81222ca8b467374409ebcd737b | <ide><path>src/Illuminate/Database/Eloquent/Builder.php
<ide> protected function applyScope($scope, $builder)
<ide> */
<ide> protected function shouldNestWheresForScope(QueryBuilder $query, $originalWhereCount)
<ide> {
<del> return $originalWhereCount && count($query->wheres) > $originalWhereCount;
<add> return count($query->wheres) > $originalWhereCount;
<ide> }
<ide>
<ide> /**
<ide><path>tests/Database/DatabaseEloquentGlobalScopesTest.php
<ide> public function testGlobalScopesWithOrWhereConditionsAreNested()
<ide> {
<ide> $model = new EloquentClosureGlobalScopesWithOrTestModel();
<ide>
<add> $query = $model->newQuery();
<add> $this->assertEquals('select "email", "password" from "table" where ("email" = ? or "email" = ?) and "active" = ? order by "name" asc', $query->toSql());
<add> $this->assertEquals(['taylor@gmail.com', 'someone@else.com', 1], $query->getBindings());
<add>
<ide> $query = $model->newQuery()->where('col1', 'val1')->orWhere('col2', 'val2');
<ide> $this->assertEquals('select "email", "password" from "table" where ("col1" = ? or "col2" = ?) and ("email" = ? or "email" = ?) and "active" = ? order by "name" asc', $query->toSql());
<ide> $this->assertEquals(['val1', 'val2', 'taylor@gmail.com', 'someone@else.com', 1], $query->getBindings()); | 2 |
Ruby | Ruby | fix broken output on ci | 9ecdf117b3f8b68dde5bc98407ffffc9f73cc5bc | <ide><path>Library/Homebrew/brew.rb
<ide> class MissingEnvironmentVariables < RuntimeError; end
<ide> begin
<ide> trap("INT", std_trap) # restore default CTRL-C handler
<ide>
<add> if ENV["CI"]
<add> $stdout.sync = true
<add> $stderr.sync = true
<add> end
<add>
<ide> empty_argv = ARGV.empty?
<ide> help_flag_list = %w[-h --help --usage -?]
<ide> help_flag = !ENV["HOMEBREW_HELP"].nil? | 1 |
PHP | PHP | fix arg passing in doesntcontain | 739d8472eb2c97c4a8d8f86eb699c526e42f57fa | <ide><path>src/Illuminate/Collections/Collection.php
<ide> public function contains($key, $operator = null, $value = null)
<ide> */
<ide> public function doesntContain($key, $operator = null, $value = null)
<ide> {
<del> return ! $this->contains($key, $operator, $value);
<add> return ! $this->contains(...func_get_args());
<ide> }
<ide>
<ide> /**
<ide><path>src/Illuminate/Collections/LazyCollection.php
<ide> public function contains($key, $operator = null, $value = null)
<ide> */
<ide> public function doesntContain($key, $operator = null, $value = null)
<ide> {
<del> return ! $this->contains($key, $operator, $value);
<add> return ! $this->contains(...func_get_args());
<ide> }
<ide>
<ide> /** | 2 |
Ruby | Ruby | calculate actual delta in usage | b9b1b24e4e0c607bd27137f3a1928e1b6ee97908 | <ide><path>Library/Homebrew/cleanup.rb
<ide> def cleanup_path(path)
<ide> yield
<ide> end
<ide>
<del> @disk_cleanup_size += disk_usage
<add> @disk_cleanup_size += disk_usage - path.disk_usage
<ide> end
<ide>
<ide> def cleanup_lockfiles(*lockfiles) | 1 |
Javascript | Javascript | remove unused local variables | c5e39622b5799d03b5ae8e7a73415e1210d920eb | <ide><path>packages/ember-metal/lib/computed.js
<ide> function mkCpSetter(keyName, desc) {
<ide> return function(value) {
<ide> var m = meta(this, cacheable),
<ide> watched = (m.source===this) && m.watching[keyName]>0,
<del> ret, oldSuspended, lastSetValues;
<add> ret, oldSuspended;
<ide>
<ide> oldSuspended = desc._suspended;
<ide> desc._suspended = this;
<ide> Cp.set = function(obj, keyName, value) {
<ide>
<ide> var m = meta(obj, cacheable),
<ide> watched = (m.source===obj) && m.watching[keyName]>0,
<del> ret, oldSuspended, lastSetValues;
<add> ret, oldSuspended;
<ide>
<ide> oldSuspended = this._suspended;
<ide> this._suspended = obj; | 1 |
Javascript | Javascript | update islocal logic to enforce protocol and port | fb0b7534d7ccec36b582e819436bfc7c07062187 | <ide><path>lib/link.js
<ide> export default class Link extends Component {
<ide> function isLocal (href) {
<ide> const url = parse(href, false, true)
<ide> const origin = parse(getLocationOrigin(), false, true)
<del> return (!url.host || !url.hostname) ||
<del> (origin.host === url.host || origin.hostname === url.hostname)
<add> return !url.host ||
<add> (url.protocol === origin.protocol && url.host === origin.host)
<ide> }
<ide>
<ide> const warnLink = execOnce(warn) | 1 |
Python | Python | define xrange() in python 3 | bade0fedcdd0db1148d840eaa17d7dbed2511bf7 | <ide><path>tools/cpplint.py
<ide> import sys
<ide> import unicodedata
<ide>
<add>try:
<add> xrange
<add>except NameError:
<add> xrange = range
<add>
<ide>
<ide> logger = logging.getLogger('testrunner')
<ide> | 1 |
Javascript | Javascript | improve accuracy of offline warning | 22e24dfb5409cfb721fc0e1b80feeffd9156c86d | <ide><path>client/src/components/OfflineWarning/OfflineWarning.js
<ide> const propTypes = {
<ide> function OfflineWarning({ isOnline, isSignedIn }) {
<ide> return !isSignedIn || isOnline ? null : (
<ide> <div className='offline-warning'>
<del> We cannot reach the server to update your progress.
<add> You appear to be offline, your progress may not be being saved.
<ide> </div>
<ide> );
<ide> } | 1 |
Ruby | Ruby | check default_formula requirements | 395d798bc293aae877a92f9535c5621fea226876 | <ide><path>Library/Homebrew/cmd/test-bot.rb
<ide> def skip formula_name
<ide> puts "#{Tty.blue}==>#{Tty.white} SKIPPING: #{formula_name}#{Tty.reset}"
<ide> end
<ide>
<del> def satisfied_requirements? formula, spec
<add> def satisfied_requirements? formula, spec, dependency=nil
<ide> requirements = formula.send(spec).requirements
<ide>
<ide> unsatisfied_requirements = requirements.reject do |requirement|
<del> requirement.satisfied? || requirement.default_formula?
<add> satisfied = false
<add> satisfied = true if requirement.satisfied?
<add> if !satisfied && requirement.default_formula?
<add> default = Formula[requirement.class.default_formula]
<add> satisfied = satisfied_requirements?(default, :stable, formula.name)
<add> end
<add> satisfied
<ide> end
<ide>
<ide> if unsatisfied_requirements.empty?
<ide> true
<ide> else
<ide> name = formula.name
<ide> name += " (#{spec})" unless spec == :stable
<add> name += " (#{dependency} dependency)" if dependency
<ide> skip name
<ide> puts unsatisfied_requirements.map(&:message)
<ide> false | 1 |
Text | Text | add the syntax "for infinite loop " | 5a99e02a875c1cf19f56352d0f3cc5f212005930 | <ide><path>guide/english/c/for/index.md
<ide> The initialization statement is executed only once. Then, the test expression is
<ide>
<ide> The for loop is commonly used when the number of iterations is known.
<ide>
<del>## Example
<add>#### Example
<ide> ```c
<ide> #include <stdio.h>
<ide>
<ide> int main () {
<ide> }
<ide> ```
<ide>
<del>## Output:
<add>#### Output:
<ide> ```shell
<ide> > Item on index 0 is 1
<ide> > Item on index 1 is 2
<ide> main ()
<ide>
<ide>
<ide>
<add>## Syntax of For infinite loop
<add>
<add>```c
<add>for ( ; ; ) {
<add> statement(s);
<add>}
<add>```
<add>
<add>An infinite loop occurs when the condition will never be met, due to some inherent characteristic of the loop. An infinite loop also called an endless loop, and it is a piece of coding that lacks a functional exit so that it repeats indefinitely. | 1 |
Ruby | Ruby | update time_zone_options_for_select docs | 5ee4a57a26a7863c7ff610dd3a46c04e0f53f7f7 | <ide><path>actionview/lib/action_view/helpers/form_options_helper.rb
<ide> def grouped_options_for_select(grouped_options, selected_key = nil, options = {}
<ide> # an ActiveSupport::TimeZone.
<ide> #
<ide> # By default, +model+ is the ActiveSupport::TimeZone constant (which can
<del> # be obtained in Active Record as a value object). The only requirement
<del> # is that the +model+ parameter be an object that responds to +all+, and
<del> # returns an array of objects that represent time zones.
<add> # be obtained in Active Record as a value object). The +model+ parameter
<add> # must respond to +all+ and return an array of objects that represent time
<add> # zones; each object must respond to +name+. If a Regexp is given it will
<add> # attempt to match the zones using the <code>=~<code> operator.
<ide> #
<ide> # NOTE: Only the option tags are returned, you have to wrap this call in
<ide> # a regular HTML select tag. | 1 |
Javascript | Javascript | fix atom --dev with json config files | 18a308de575a463d20eb1d4e8852816c71f8ec51 | <ide><path>src/main-process/atom-application.js
<ide> class AtomApplication extends EventEmitter {
<ide> if (devMode) {
<ide> try {
<ide> windowInitializationScript = require.resolve(
<del> path.join(this.devResourcePath, 'src', 'initialize-application-window')
<add> path.join(this.devResourcePath, 'src', 'initialize-application-window.coffee')
<ide> )
<ide> resourcePath = this.devResourcePath
<ide> } catch (error) {}
<ide> }
<ide>
<ide> if (!windowInitializationScript) {
<del> windowInitializationScript = require.resolve('../initialize-application-window')
<add> windowInitializationScript = require.resolve('../initialize-application-window.coffee')
<ide> }
<ide> if (!resourcePath) resourcePath = this.resourcePath
<ide> if (!windowDimensions) windowDimensions = this.getDimensionsForNewWindow() | 1 |
Ruby | Ruby | add docs to collectionassociation#empty? | bf55f28af159ccfaa0bb8e5e0b52e50e14ede406 | <ide><path>activerecord/lib/active_record/associations/collection_association.rb
<ide> def length
<ide> load_target.size
<ide> end
<ide>
<del> # Equivalent to <tt>collection.size.zero?</tt>. If the collection has
<del> # not been already loaded and you are going to fetch the records anyway
<del> # it is better to check <tt>collection.length.zero?</tt>.
<add> # Returns true if the collection is empty. Equivalent to
<add> # <tt>collection.size.zero?</tt>. If the collection has not been already
<add> # loaded and you are going to fetch the records anyway it is better to
<add> # check <tt>collection.length.zero?</tt>.
<add> #
<add> # class Person < ActiveRecord::Base
<add> # has_many :pets
<add> # end
<add> #
<add> # person.pets.count # => 1
<add> # person.pets.empty? # => false
<add> #
<add> # person.pets.delete_all
<add> # person.pets.count # => 0
<add> # person.pets.empty? # => true
<add> #
<add> # Also, you can pass a block to define a criteria. The behaviour
<add> # is the same, it returns true if the collection based on the
<add> # criteria is empty.
<add> #
<add> # person.pets
<add> # # => [#<Pet name: "Wy", group: "cats">]
<add> #
<add> # person.pets.empty? do |pet|
<add> # pet.group == 'cats'
<add> # end
<add> # # => false
<add> #
<add> # person.pets.empty? do |pet|
<add> # pet.group == 'dogs'
<add> # end
<add> # # => true
<ide> def empty?
<ide> size.zero?
<ide> end | 1 |
Ruby | Ruby | move existence check into helper script | aceb02125461be3f2224fa31fa5b9c3090d5d2d7 | <ide><path>Library/Homebrew/cask/pkg.rb
<ide> def special?(path)
<ide> set -euo pipefail
<ide>
<ide> for path in "${@}"; do
<add> if [[ ! -e "${path}" ]]; then
<add> continue
<add> fi
<add>
<ide> if [[ -e "${path}/.DS_Store" ]]; then
<ide> /bin/rm -f "${path}/.DS_Store"
<ide> fi
<ide> def special?(path)
<ide>
<ide> sig { params(path: T.any(Pathname, T::Array[Pathname])).void }
<ide> def rmdir(path)
<del> return unless path.exist?
<del>
<ide> @command.run!(
<ide> "/usr/bin/xargs",
<ide> args: ["-0", "--", "/bin/bash", "-c", RMDIR_SH, "--"], | 1 |
PHP | PHP | fix case sensitive issue in table alias | 48e457ec5beede17f86bea433027906d248d0135 | <ide><path>tests/TestCase/ORM/ResultSetTest.php
<ide> public function testHasOneEagerLoaderLeavesEmptyAssocation() {
<ide> $this->assertEquals(1, $article->id);
<ide> $this->assertNotEmpty($article->title);
<ide>
<del> $article = $this->table->find()->where(['Articles.id' => 1])
<add> $article = $this->table->find()->where(['articles.id' => 1])
<ide> ->contain(['Comments'])
<ide> ->hydrate(false)
<ide> ->first(); | 1 |
Javascript | Javascript | destroy folds on fold marker click | c2206b88dac8158193b7743381f914628a96c677 | <ide><path>spec/text-editor-component-spec.js
<ide> describe('TextEditorComponent', () => {
<ide> expect(editor.getSelectedScreenRange()).toEqual([[2, 0], [5, 0]])
<ide> })
<ide>
<add> it('destroys folds when clicking on their fold markers', async () => {
<add> const {component, element, editor} = buildComponent()
<add> editor.foldBufferRow(1)
<add> await component.getNextUpdatePromise()
<add>
<add> const target = element.querySelector('.fold-marker')
<add> const {clientX, clientY} = clientPositionForCharacter(component, 1, editor.lineLengthForScreenRow(1))
<add> component.didMouseDownOnContent({detail: 1, button: 0, target, clientX, clientY})
<add> expect(editor.isFoldedAtBufferRow(1)).toBe(false)
<add> expect(editor.getCursorScreenPosition()).toEqual([0, 0])
<add> })
<add>
<ide> it('autoscrolls the content when dragging near the edge of the screen', async () => {
<ide> const {component, editor} = buildComponent({width: 200, height: 200})
<ide> const {scroller} = component.refs
<ide><path>src/text-editor-component.js
<ide> class TextEditorComponent {
<ide>
<ide> didMouseDownOnContent (event) {
<ide> const {model} = this.props
<del> const {button, detail, ctrlKey, shiftKey, metaKey} = event
<add> const {target, button, detail, ctrlKey, shiftKey, metaKey} = event
<ide>
<ide> // Only handle mousedown events for left mouse button (or the middle mouse
<ide> // button on Linux where it pastes the selection clipboard).
<ide> if (!(button === 0 || (this.getPlatform() === 'linux' && button === 1))) return
<ide>
<ide> const screenPosition = this.screenPositionForMouseEvent(event)
<add>
<add> if (target.matches('.fold-marker')) {
<add> const bufferPosition = model.bufferPositionForScreenPosition(screenPosition)
<add> model.destroyFoldsIntersectingBufferRange(Range(bufferPosition, bufferPosition))
<add> return
<add> }
<add>
<ide> const addOrRemoveSelection = metaKey || (ctrlKey && this.getPlatform() !== 'darwin')
<ide>
<ide> switch (detail) { | 2 |
Python | Python | update relatedfield#field_from_native coding style | f8a1256b1c006ee9ab46645a11ef19123b429a56 | <ide><path>rest_framework/fields.py
<ide> def field_from_native(self, data, files, field_name, into):
<ide> if self.read_only:
<ide> return
<ide>
<del> if field_name not in data and self.required:
<del> raise ValidationError(self.error_messages['required'])
<del> elif field_name not in data:
<add> try:
<add> value = data[field_name]
<add> except KeyError:
<add> if self.required:
<add> raise ValidationError(self.error_messages['required'])
<ide> return
<ide>
<del> value = data.get(field_name)
<del>
<ide> if value in (None, '') and not self.null:
<ide> raise ValidationError('Value may not be null')
<ide> elif value in (None, '') and self.null: | 1 |
Javascript | Javascript | handle navigation keys when viewer is not focused | ce9400dc8b7a3dc74f7c531e93120797a66bbc07 | <ide><path>web/viewer.js
<ide> window.addEventListener('keydown', function keydown(evt) {
<ide> // Some shortcuts should not get handled if a control/input element
<ide> // is selected.
<ide> var curElement = document.activeElement || document.querySelector(':focus');
<del> if (curElement && (curElement.tagName.toUpperCase() === 'INPUT' ||
<del> curElement.tagName.toUpperCase() === 'TEXTAREA' ||
<del> curElement.tagName.toUpperCase() === 'SELECT')) {
<add> var curElementTagName = curElement && curElement.tagName.toUpperCase();
<add> if (curElementTagName === 'INPUT' ||
<add> curElementTagName === 'TEXTAREA' ||
<add> curElementTagName === 'SELECT') {
<ide> // Make sure that the secondary toolbar is closed when Escape is pressed.
<ide> if (evt.keyCode !== 27) { // 'Esc'
<ide> return;
<ide> }
<ide> }
<del>//#if (FIREFOX || MOZCENTRAL)
<del>//// Workaround for issue in Firefox, that prevents scroll keys from working
<del>//// when elements with 'tabindex' are focused.
<del>//PDFView.container.blur();
<del>//#endif
<ide>
<ide> if (cmd === 0) { // no control key pressed at all.
<ide> switch (evt.keyCode) {
<ide> window.addEventListener('keydown', function keydown(evt) {
<ide> PDFView.rotatePages(90);
<ide> break;
<ide> }
<add> if (!handled && !PresentationMode.active) {
<add> // 33=Page Up 34=Page Down 35=End 36=Home
<add> // 37=Left 38=Up 39=Right 40=Down
<add> if (evt.keyCode >= 33 && evt.keyCode <= 40 &&
<add> !PDFView.container.contains(curElement)) {
<add> // The page container is not focused, but a page navigation key has been
<add> // pressed. Change the focus to the viewer container to make sure that
<add> // navigation by keyboard works as expected.
<add> PDFView.container.focus();
<add> }
<add> // 32=Spacebar
<add> if (evt.keyCode === 32 && curElementTagName !== 'BUTTON') {
<add>//#if !(FIREFOX || MOZCENTRAL)
<add>//// Workaround for issue in Firefox, that prevents scroll keys from working
<add>//// when elements with 'tabindex' are focused. (#3499)
<add>// PDFView.container.blur();
<add>//#else
<add> if (!PDFView.container.contains(curElement)) {
<add> PDFView.container.focus();
<add> }
<add>//#endif
<add> }
<add> }
<ide> }
<ide>
<ide> if (cmd === 4) { // shift-key | 1 |
Javascript | Javascript | execute backend challenge saga | c43dfe1eb7678d04dc9a6f5b29335efb957fdbe2 | <ide><path>client/src/templates/Challenges/redux/execute-challenge-saga.js
<ide> import {
<ide> challengeFilesSelector
<ide> } from './';
<ide>
<del>import { buildJSFromFiles, buildFromFiles } from '../utils/build';
<add>import {
<add> buildJSFromFiles,
<add> buildFromFiles,
<add> buildBackendChallenge
<add>} from '../utils/build';
<ide>
<ide> import { challengeTypes } from '../../../../utils/challengeTypes';
<ide>
<ide> function* ExecuteChallengeSaga() {
<ide> const { js, bonfire, backend } = challengeTypes;
<ide> const { challengeType } = yield select(challengeMetaSelector);
<ide>
<del> // TODO: ExecuteBackendChallengeSaga
<del> if (challengeType === backend) {
<del> return;
<del> }
<del>
<ide> yield put(initLogs());
<ide> yield put(initConsole('// running tests'));
<ide>
<ide> function* ExecuteChallengeSaga() {
<ide> testResults = yield ExecuteJSChallengeSaga();
<ide> break;
<ide> case backend:
<del> // yield ExecuteBackendChallengeSaga();
<add> testResults = yield ExecuteBackendChallengeSaga();
<ide> break;
<ide> default:
<ide> testResults = yield ExecuteDOMChallengeSaga();
<ide> function* ExecuteDOMChallengeSaga() {
<ide> return testResults;
<ide> }
<ide>
<add>// TODO: use a web worker
<add>function* ExecuteBackendChallengeSaga() {
<add> const state = yield select();
<add> const ctx = yield call(buildBackendChallenge, state);
<add> const consoleProxy = yield channel();
<add>
<add> yield call(createTestFrame, state, ctx, consoleProxy);
<add>
<add> const testResults = yield call(executeTests, {
<add> testRunner: {
<add> execute({ script }, testTimeout) {
<add> return Promise.race([
<add> runTestInTestFrame(document, script),
<add> new Promise((_, reject) =>
<add> setTimeout(() => reject('timeout'), testTimeout)
<add> )
<add> ]);
<add> },
<add> killWorker() {}
<add> }
<add> });
<add>
<add> consoleProxy.close();
<add> return testResults;
<add>}
<add>
<ide> function* updateMainSaga() {
<ide> try {
<ide> const { html, modern } = challengeTypes;
<ide><path>client/src/templates/Challenges/utils/build.js
<del>import { of } from 'rxjs';
<ide> import { flow } from 'lodash';
<ide>
<ide> import { throwers } from '../rechallenge/throwers';
<ide> export function buildBackendChallenge(state) {
<ide> const {
<ide> solution: { value: url }
<ide> } = backendFormValuesSelector(state);
<del> return of({
<add> return {
<ide> build: frameRunner,
<del> sources: { url },
<del> checkChallengePayload: { solution: url }
<del> });
<add> sources: { url }
<add> };
<ide> } | 2 |
PHP | PHP | fix incorrect triggering of callable strings | c68a773912328bd9684d89988a952cafb8eca157 | <ide><path>src/Http/Response.php
<ide> public function body($content = null)
<ide> }
<ide>
<ide> // Compatibility with closure/streaming responses
<del> if (is_callable($content)) {
<add> if (!is_string($content) && is_callable($content)) {
<ide> $this->stream = new CallbackStream($content);
<ide> } else {
<ide> $this->_createStream();
<ide><path>tests/TestCase/Http/ResponseTest.php
<ide> public function testSendWithCallableBodyWithReturn()
<ide> $this->assertEquals('the response body', ob_get_clean());
<ide> }
<ide>
<add> /**
<add> * Tests that callable strings are not triggered
<add> *
<add> * @return void
<add> */
<add> public function testSendWithCallableStringBody()
<add> {
<add> $response = $this->getMockBuilder('Cake\Http\Response')
<add> ->setMethods(['_sendHeader'])
<add> ->getMock();
<add> $response->body('phpversion');
<add>
<add> ob_start();
<add> $response->send();
<add> $this->assertEquals('phpversion', ob_get_clean());
<add> }
<add>
<ide> /**
<ide> * Tests the disableCache method
<ide> * | 2 |
Ruby | Ruby | add tests for non glob dirs audit | a73c29fef21ccb7f45243500f04f1ed9965fdf38 | <ide><path>Library/Homebrew/rubocops/lines_cop.rb
<ide> def audit_formula(_node, _class_node, _parent_class_node, body_node)
<ide> problem "\"#{m.source}\" is deprecated, use a comparison to MacOS.version instead"
<ide> end
<ide> end
<del> #
<del> # dirPattern(body_node) do |m|
<del> # next unless m =~ /\[("[^\*{},]+")\]/
<del> # problem "Dir(#{Regexp.last_match(1)}) is unnecessary; just use #{Regexp.last_match(1)}"
<del> # end
<add>
<add> find_instance_method_call(body_node, "Dir", :[]) do |m|
<add> path = parameters(m).first
<add> next if !path.str_type?
<add> next unless match = regex_match_group(path, /^[^\*{},]+$/)
<add> problem "Dir([\"#{string_content(path)}\"]) is unnecessary; just use \"#{match[0]}\""
<add> end
<add>
<ide> #
<ide> # fileUtils_methods= FileUtils.singleton_methods(false).map { |m| Regexp.escape(m) }.join "|"
<ide> # find_method_with_args(body_node, :system, /fileUtils_methods/) do |m|
<ide><path>Library/Homebrew/test/rubocops/lines_cop_spec.rb
<ide> class Foo < Formula
<ide> expect_offense(expected, actual)
<ide> end
<ide> end
<add>
<add> it "with non glob DIR" do
<add> source = <<-EOS.undent
<add> class Foo < Formula
<add> desc "foo"
<add> url 'http://example.com/foo-1.0.tgz'
<add> rm_rf Dir["src/{llvm,test,librustdoc,etc/snapshot.pyc}"]
<add> rm_rf Dir["src/snapshot.pyc"]
<add> end
<add> EOS
<add>
<add> expected_offenses = [{ message: "Dir([\"src/snapshot.pyc\"]) is unnecessary; just use \"src/snapshot.pyc\"",
<add> severity: :convention,
<add> line: 5,
<add> column: 13,
<add> source: source }]
<add>
<add> inspect_source(cop, source)
<add>
<add> expected_offenses.zip(cop.offenses).each do |expected, actual|
<add> expect_offense(expected, actual)
<add> end
<add> end
<ide> end
<ide> def expect_offense(expected, actual)
<ide> expect(actual.message).to eq(expected[:message]) | 2 |
Ruby | Ruby | remove a redundant test assertion | 7a80ab54393b500ae08cc1cf93c93ece89097112 | <ide><path>activerecord/test/cases/finder_test.rb
<ide> def test_find_on_multiple_hash_conditions
<ide> assert Topic.where(author_name: "David", title: "The First Topic", replies_count: 1, approved: false).find(1)
<ide> assert_raise(ActiveRecord::RecordNotFound) { Topic.where(author_name: "David", title: "The First Topic", replies_count: 1, approved: true).find(1) }
<ide> assert_raise(ActiveRecord::RecordNotFound) { Topic.where(author_name: "David", title: "HHC", replies_count: 1, approved: false).find(1) }
<del> assert_raise(ActiveRecord::RecordNotFound) { Topic.where(author_name: "David", title: "The First Topic", replies_count: 1, approved: true).find(1) }
<ide> end
<ide>
<ide> def test_condition_interpolation | 1 |
PHP | PHP | remove duplicate method | a6e1aa68b47903c54410bcca62ae96ee8fd7a630 | <ide><path>src/Illuminate/Foundation/Console/Kernel.php
<ide> public function all()
<ide> return $this->getArtisan()->all();
<ide> }
<ide>
<del> /**
<del> * Get all of the commands registered with the console.
<del> *
<del> * @return array
<del> */
<del> public function all()
<del> {
<del> $this->bootstrap();
<del>
<del> return $this->getArtisan()->all();
<del> }
<del>
<ide> /**
<ide> * Get the output for the last run command.
<ide> * | 1 |
PHP | PHP | log query execution time and rows | ba917d38a4aab270d28de48543a5a2936ea1a2c2 | <ide><path>src/Database/Log/LoggedQuery.php
<ide> class LoggedQuery
<ide> */
<ide> public function __toString()
<ide> {
<del> return $this->query;
<add> return "duration={$this->took} rows={$this->numRows} {$this->query}";
<ide> }
<ide> }
<ide><path>tests/TestCase/Database/Log/LoggedQueryTest.php
<ide> public function testStringConversion()
<ide> {
<ide> $logged = new LoggedQuery;
<ide> $logged->query = 'SELECT foo FROM bar';
<del> $this->assertEquals('SELECT foo FROM bar', (string)$logged);
<add> $this->assertEquals('duration=0 rows=0 SELECT foo FROM bar', (string)$logged);
<ide> }
<ide> }
<ide><path>tests/TestCase/Database/Log/QueryLoggerTest.php
<ide> public function testStringInterpolation()
<ide>
<ide> $logger->expects($this->once())->method('_log')->with($query);
<ide> $logger->log($query);
<del> $expected = "SELECT a FROM b where a = 'string' AND b = 3 AND c = NULL AND d = 1 AND e = 0 AND f = 0";
<add> $expected = "duration=0 rows=0 SELECT a FROM b where a = 'string' AND b = 3 AND c = NULL AND d = 1 AND e = 0 AND f = 0";
<ide> $this->assertEquals($expected, (string)$query);
<ide> }
<ide>
<ide> public function testStringInterpolation2()
<ide>
<ide> $logger->expects($this->once())->method('_log')->with($query);
<ide> $logger->log($query);
<del> $expected = "SELECT a FROM b where a = 'string' AND b = '3' AND c = NULL AND d = 1 AND e = 0 AND f = 0";
<add> $expected = "duration=0 rows=0 SELECT a FROM b where a = 'string' AND b = '3' AND c = NULL AND d = 1 AND e = 0 AND f = 0";
<ide> $this->assertEquals($expected, (string)$query);
<ide> }
<ide>
<ide> public function testStringInterpolation3()
<ide>
<ide> $logger->expects($this->once())->method('_log')->with($query);
<ide> $logger->log($query);
<del> $expected = "SELECT a FROM b where a = 'string' AND b = 'string' AND c = 3 AND d = 3";
<add> $expected = "duration=0 rows=0 SELECT a FROM b where a = 'string' AND b = 'string' AND c = 3 AND d = 3";
<ide> $this->assertEquals($expected, (string)$query);
<ide> }
<ide>
<ide> public function testStringInterpolationNamed()
<ide>
<ide> $logger->expects($this->once())->method('_log')->with($query);
<ide> $logger->log($query);
<del> $expected = "SELECT a FROM b where a = 'string' AND b = 'test' AND c = 5 AND d = 3";
<add> $expected = "duration=0 rows=0 SELECT a FROM b where a = 'string' AND b = 'test' AND c = 5 AND d = 3";
<ide> $this->assertEquals($expected, (string)$query);
<ide> }
<ide> | 3 |
Javascript | Javascript | run the new integration tests in htmlbars | dd38edea81ae142946eb1290f5495334bf7bd59b | <ide><path>packages/ember-glimmer/tests/utils/test-case.js
<ide> let assert = QUnit.assert;
<ide>
<ide> const TextNode = window.Text;
<ide> const HTMLElement = window.HTMLElement;
<add>const Comment = window.Comment;
<ide>
<ide> export class TestCase {
<ide> teardown() {}
<ide> }
<ide>
<add>function isMarker(node) {
<add> if (node instanceof Comment && node.textContent === '') {
<add> return true;
<add> }
<add>
<add> if (node instanceof TextNode && node.textContent === '') {
<add> return true;
<add> }
<add>
<add> return false;
<add>}
<add>
<ide> export class RenderingTest extends TestCase {
<ide> constructor() {
<ide> super();
<ide> export class RenderingTest extends TestCase {
<ide> }
<ide>
<ide> get firstChild() {
<del> return this.element.firstChild;
<add> let node = this.element.firstChild;
<add>
<add> while (node && isMarker(node)) {
<add> node = node.nextSibling;
<add> }
<add>
<add> return node;
<ide> }
<ide>
<ide> render(templateStr, context = {}) {
<ide> let { env, renderer, owner } = this;
<ide>
<ide> let attrs = assign({}, context, {
<add> tagName: '',
<ide> [OWNER]: owner,
<ide> renderer,
<ide> template: compile(templateStr, { env })
<ide><path>packages/ember-htmlbars/tests/integration/content-test.js
<add>../../../ember-glimmer/tests/integration/content-test.js
<ide>\ No newline at end of file
<ide><path>packages/ember-htmlbars/tests/utils/environment.js
<add>export default class Environment {
<add>}
<ide><path>packages/ember-htmlbars/tests/utils/helpers.js
<add>export { default as DOMHelper } from 'ember-htmlbars/system/dom-helper';
<add>export { Renderer } from 'ember-metal-views';
<add>export { default as compile } from 'ember-template-compiler/system/compile';
<ide><path>packages/ember-htmlbars/tests/utils/package-name.js
<add>export default 'htmlbars';
<ide><path>packages/ember-htmlbars/tests/utils/test-case.js
<add>../../../ember-glimmer/tests/utils/test-case.js
<ide>\ No newline at end of file | 6 |
Text | Text | update changelog for new patch release | c306e4f7f38447f24f197ec3c4d34661996f9620 | <ide><path>CHANGELOG.md
<ide> CHANGELOG
<ide> =========
<ide>
<ide> ## HEAD (Unreleased)
<del>_(none)_
<add>* @gkatsev re-published to make sure that the audio button has css
<ide>
<ide> --------------------
<ide> | 1 |
Python | Python | add bootstrap task | 57fc6f53283986d221651a434145ea3510f07040 | <ide><path>pavement.py
<ide> import os
<add>import sys
<ide> import subprocess
<ide> try:
<ide> from hash import md5
<ide> RELEASE = 'doc/release/1.3.0-notes.rst'
<ide> LOG_START = 'tags/1.2.0'
<ide> LOG_END = 'master'
<add>BOOTSTRAP_DIR = "bootstrap"
<add>BOOTSTRAP_PYEXEC = "%s/bin/python" % BOOTSTRAP_DIR
<add>BOOTSTRAP_SCRIPT = "%s/bootstrap.py" % BOOTSTRAP_DIR
<ide>
<del>options(sphinx=Bunch(builddir="build", sourcedir="source", docroot='doc'))
<add>options(sphinx=Bunch(builddir="build", sourcedir="source", docroot='doc'),
<add> virtualenv=Bunch(script_name=BOOTSTRAP_SCRIPT))
<add>
<add># Bootstrap stuff
<add>@task
<add>def bootstrap():
<add> """create virtualenv in ./install"""
<add> install = paver.path.path(BOOTSTRAP_DIR)
<add> if not install.exists():
<add> install.mkdir()
<add> call_task('paver.virtual.bootstrap')
<add> sh('cd %s; %s bootstrap.py' % (BOOTSTRAP_DIR, sys.executable))
<add>
<add>@task
<add>def clean():
<add> """Remove build, dist, egg-info garbage."""
<add> d = ['build', 'dist']
<add> for i in d:
<add> paver.path.path(i).rmtree()
<add>
<add> (paver.path.path('doc') / options.sphinx.builddir).rmtree()
<add>
<add>@task
<add>def clean_bootstrap():
<add> paver.path.path('bootstrap').rmtree()
<ide>
<ide> # NOTES/Changelog stuff
<ide> def compute_md5():
<ide> def write_release():
<ide> def write_log():
<ide> write_log_task()
<ide>
<del># Doc build stuff
<add># Doc stuff
<ide> @task
<ide> @needs('paver.doctools.html')
<ide> def html(options):
<ide> """Build numpy documentation and put it into build/docs"""
<del> builtdocs = paver.path.path("docs") / options.sphinx.builddir / "html"
<add> builtdocs = paver.path.path("doc") / options.sphinx.builddir / "html"
<ide> HTML_DESTDIR.rmtree()
<ide> builtdocs.copytree(HTML_DESTDIR) | 1 |
Python | Python | combine test_sparse functions together | 5c224403d3948983035682a1f71bc2e0e64cbb87 | <ide><path>tests/keras/engine/test_training.py
<ide> def gen_data(batch_sz):
<ide>
<ide>
<ide> @keras_test
<del>def test_sparse_input_target_fit():
<del> test_inputs = [sparse.random(6, 3, density=0.25).tocsr() for _ in range(2)]
<del> test_outputs = [sparse.random(6, i, density=0.25).tocsr() for i in range(3, 5)]
<del> in1 = Input(shape=(3,))
<del> in2 = Input(shape=(3,))
<del> out1 = Dropout(0.5, name='dropout')(in1)
<del> out2 = Dense(4, name='dense_1')(in2)
<del> model = Model([in1, in2], [out1, out2])
<del> model.compile('rmsprop', 'mse')
<del> model.fit(test_inputs, test_outputs, epochs=1, batch_size=2, validation_split=0.2)
<del>
<del>
<del>@keras_test
<del>def test_sparse_input_target_evaluate():
<add>def test_sparse_inputs_targets():
<ide> test_inputs = [sparse.random(6, 3, density=0.25).tocsr() for _ in range(2)]
<ide> test_outputs = [sparse.random(6, i, density=0.25).tocsr() for i in range(3, 5)]
<ide> in1 = Input(shape=(3,))
<ide> in2 = Input(shape=(3,))
<ide> out1 = Dropout(0.5, name='dropout')(in1)
<ide> out2 = Dense(4, name='dense_1')(in2)
<ide> model = Model([in1, in2], [out1, out2])
<add> model.predict(test_inputs, batch_size=2)
<ide> model.compile('rmsprop', 'mse')
<add> model.fit(test_inputs, test_outputs, epochs=1, batch_size=2, validation_split=0.5)
<ide> model.evaluate(test_inputs, test_outputs, batch_size=2)
<ide>
<ide>
<del>@keras_test
<del>def test_sparse_input_predict():
<del> test_inputs = [sparse.random(6, 3, density=0.25).tocsr() for _ in range(2)]
<del> in1 = Input(shape=(3,))
<del> in2 = Input(shape=(3,))
<del> out1 = Dropout(0.5, name='dropout')(in1)
<del> out2 = Dense(4, name='dense_1')(in2)
<del> model = Model([in1, in2], [out1, out2])
<del> model.compile('rmsprop', 'mse')
<del> model.predict(test_inputs, batch_size=2)
<del>
<del>
<ide> @pytest.mark.skipif(K.backend() != 'tensorflow', reason='sparse operations supported only by TensorFlow')
<ide> @keras_test
<ide> def test_sparse_placeholder_fit():
<ide> def test_sparse_placeholder_fit():
<ide> out1 = Dropout(0.5, name='dropout')(in1)
<ide> out2 = Dense(4, name='dense_1')(in2)
<ide> model = Model([in1, in2], [out1, out2])
<add> model.predict(test_inputs, batch_size=2)
<ide> model.compile('rmsprop', 'mse')
<del> model.fit(test_inputs, test_outputs, epochs=1, batch_size=2, validation_split=0.2)
<del>
<del>
<del>@pytest.mark.skipif(K.backend() != 'tensorflow', reason='sparse operations supported only by TensorFlow')
<del>@keras_test
<del>def test_sparse_placeholder_evaluate():
<del> test_inputs = [sparse.random(6, 3, density=0.25).tocsr() for _ in range(2)]
<del> test_outputs = [sparse.random(6, i, density=0.25).tocsr() for i in range(3, 5)]
<del> in1 = Input(shape=(3,))
<del> in2 = Input(shape=(3,), sparse=True)
<del> out1 = Dropout(0.5, name='dropout')(in1)
<del> out2 = Dense(4, name='dense_1')(in2)
<del> model = Model([in1, in2], [out1, out2])
<del> model.compile('rmsprop', 'mse')
<add> model.fit(test_inputs, test_outputs, epochs=1, batch_size=2, validation_split=0.5)
<ide> model.evaluate(test_inputs, test_outputs, batch_size=2)
<ide>
<ide>
<del>@pytest.mark.skipif(K.backend() != 'tensorflow', reason='sparse operations supported only by TensorFlow')
<del>@keras_test
<del>def test_sparse_placeholder_predict():
<del> test_inputs = [sparse.random(6, 3, density=0.25).tocsr() for _ in range(2)]
<del> in1 = Input(shape=(3,))
<del> in2 = Input(shape=(3,), sparse=True)
<del> out1 = Dropout(0.5, name='dropout')(in1)
<del> out2 = Dense(4, name='dense_1')(in2)
<del> model = Model([in1, in2], [out1, out2])
<del> model.compile('rmsprop', 'mse')
<del> model.predict(test_inputs, batch_size=2)
<del>
<del>
<ide> @keras_test
<ide> def test_trainable_argument():
<ide> x = np.random.random((5, 3)) | 1 |
Text | Text | add link to v8 | 6a2314acd7c23b0aa9761751fe304184bdedb155 | <ide><path>doc/api/addons.md
<ide> Node-API.
<ide> When not using Node-API, implementing addons is complicated,
<ide> involving knowledge of several components and APIs:
<ide>
<del>* V8: the C++ library Node.js uses to provide the
<add>* [V8][]: the C++ library Node.js uses to provide the
<ide> JavaScript implementation. V8 provides the mechanisms for creating objects,
<ide> calling functions, etc. V8's API is documented mostly in the
<ide> `v8.h` header file (`deps/v8/include/v8.h` in the Node.js source
<ide> console.log(result);
<ide> [Embedder's Guide]: https://github.com/v8/v8/wiki/Embedder's%20Guide
<ide> [Linking to libraries included with Node.js]: #addons_linking_to_libraries_included_with_node_js
<ide> [Native Abstractions for Node.js]: https://github.com/nodejs/nan
<add>[V8]: https://v8.dev/
<ide> [`Worker`]: worker_threads.md#worker_threads_class_worker
<ide> [bindings]: https://github.com/TooTallNate/node-bindings
<ide> [download]: https://github.com/nodejs/node-addon-examples | 1 |
Python | Python | fix variable substitution in error message | 4f30cb7c57c4b5d74ba98953f59670a647623f7a | <ide><path>flask/cli.py
<ide> def locate_app(script_info, app_id, raise_if_not_found=True):
<ide> )
<ide> elif raise_if_not_found:
<ide> raise NoAppException(
<del> 'The file/path provided (%s) does not appear to exist. Please'
<del> ' verify the path is correct. If app is not on PYTHONPATH,'
<del> ' ensure the extension is .py.'.format(module=module)
<add> 'The file/path provided ({module}) does not appear to exist.'
<add> ' Please verify the path is correct. If app is not on'
<add> ' PYTHONPATH, ensure the extension is .py.'.format(
<add> module=module)
<ide> )
<ide> else:
<ide> return | 1 |
Javascript | Javascript | fix a url regression | 307f39ce9ed8f4d3de06f63cd1855157be2db82f | <ide><path>lib/url.js
<ide> var protocolPattern = /^([a-z0-9]+:)/i,
<ide> // them.
<ide> nonHostChars = ['%', '/', '?', ';', '#']
<ide> .concat(unwise).concat(autoEscape),
<add> nonAuthChars = ['/', '@', '?', '#'].concat(delims),
<ide> hostnameMaxLen = 255,
<ide> hostnamePartPattern = /^[a-zA-Z0-9][a-z0-9A-Z-]{0,62}$/,
<ide> hostnamePartStart = /^([a-zA-Z0-9][a-z0-9A-Z-]{0,62})(.*)$/,
<ide> function urlParse(url, parseQueryString, slashesDenoteHost) {
<ide> // there's a hostname.
<ide> // the first instance of /, ?, ;, or # ends the host.
<ide> // don't enforce full RFC correctness, just be unstupid about it.
<add>
<add> // If there is an @ in the hostname, then non-host chars *are* allowed
<add> // to the left of the first @ sign, unless some non-auth character
<add> // comes *before* the @-sign.
<add> // URLs are obnoxious.
<add> var atSign = rest.indexOf('@');
<add> if (atSign !== -1) {
<add> // there *may be* an auth
<add> var hasAuth = true;
<add> for (var i = 0, l = nonAuthChars.length; i < l; i++) {
<add> var index = rest.indexOf(nonAuthChars[i]);
<add> if (index !== -1 && index < atSign) {
<add> // not a valid auth. Something like http://foo.com/bar@baz/
<add> hasAuth = false;
<add> break;
<add> }
<add> }
<add> if (hasAuth) {
<add> // pluck off the auth portion.
<add> out.auth = rest.substr(0, atSign);
<add> rest = rest.substr(atSign + 1);
<add> }
<add> }
<add>
<ide> var firstNonHost = -1;
<ide> for (var i = 0, l = nonHostChars.length; i < l; i++) {
<ide> var index = rest.indexOf(nonHostChars[i]);
<ide> if (index !== -1 &&
<ide> (firstNonHost < 0 || index < firstNonHost)) firstNonHost = index;
<ide> }
<add>
<ide> if (firstNonHost !== -1) {
<ide> out.host = rest.substr(0, firstNonHost);
<ide> rest = rest.substr(firstNonHost);
<ide> function urlParse(url, parseQueryString, slashesDenoteHost) {
<ide> rest = '';
<ide> }
<ide>
<del> // pull out the auth and port.
<add> // pull out port.
<ide> var p = parseHost(out.host);
<add> if (out.auth) out.host = out.auth + '@' + out.host;
<ide> var keys = Object.keys(p);
<ide> for (var i = 0, l = keys.length; i < l; i++) {
<ide> var key = keys[i];
<ide> function urlFormat(obj) {
<ide> // to clean up potentially wonky urls.
<ide> if (typeof(obj) === 'string') obj = urlParse(obj);
<ide>
<add> var auth = obj.auth;
<add> if (auth) {
<add> auth = auth.split('@').join('%40');
<add> for (var i = 0, l = nonAuthChars.length; i < l; i++) {
<add> var nAC = nonAuthChars[i];
<add> auth = auth.split(nAC).join(encodeURIComponent(nAC));
<add> }
<add> }
<add>
<ide> var protocol = obj.protocol || '',
<ide> host = (obj.host !== undefined) ? obj.host :
<ide> obj.hostname !== undefined ? (
<del> (obj.auth ? obj.auth + '@' : '') +
<add> (auth ? auth + '@' : '') +
<ide> obj.hostname +
<ide> (obj.port ? ':' + obj.port : '')
<ide> ) :
<ide> function urlResolveObject(source, relative) {
<ide>
<ide> function parseHost(host) {
<ide> var out = {};
<del> var at = host.indexOf('@');
<del> if (at !== -1) {
<del> out.auth = host.substr(0, at);
<del> host = host.substr(at + 1); // drop the @
<del> }
<ide> var port = portPattern.exec(host);
<ide> if (port) {
<ide> port = port[0];
<ide><path>test/simple/test-url.js
<ide> var parseTests = {
<ide> 'host': 'isaacschlueter@jabber.org',
<ide> 'auth': 'isaacschlueter',
<ide> 'hostname': 'jabber.org'
<add> },
<add> 'http://atpass:foo%40bar@127.0.0.1:8080/path?search=foo#bar' : {
<add> 'href' : 'http://atpass:foo%40bar@127.0.0.1:8080/path?search=foo#bar',
<add> 'protocol' : 'http:',
<add> 'host' : 'atpass:foo%40bar@127.0.0.1:8080',
<add> 'auth' : 'atpass:foo%40bar',
<add> 'hostname' : '127.0.0.1',
<add> 'port' : '8080',
<add> 'pathname': '/path',
<add> 'search' : '?search=foo',
<add> 'query' : 'search=foo',
<add> 'hash' : '#bar'
<ide> }
<ide> };
<ide> for (var u in parseTests) {
<ide> var formatTests = {
<ide> 'host': 'isaacschlueter@jabber.org',
<ide> 'auth': 'isaacschlueter',
<ide> 'hostname': 'jabber.org'
<add> },
<add> 'http://atpass:foo%40bar@127.0.0.1/' : {
<add> 'href': 'http://atpass:foo%40bar@127.0.0.1/',
<add> 'auth': 'atpass:foo@bar',
<add> 'hostname': '127.0.0.1',
<add> 'protocol': 'http:',
<add> 'pathname': '/'
<add> },
<add> 'http://atslash%2F%40:%2F%40@foo/' : {
<add> 'href': 'http://atslash%2F%40:%2F%40@foo/',
<add> 'auth': 'atslash/@:/@',
<add> 'hostname': 'foo',
<add> 'protocol': 'http:',
<add> 'pathname': '/'
<ide> }
<ide> };
<ide> for (var u in formatTests) { | 2 |
Javascript | Javascript | fix intersect test parameters to translate | 1ef8062877113d4e2c7b473368d2f93536e49359 | <ide><path>src/math/Box3.js
<ide> Object.assign( Box3.prototype, {
<ide>
<ide> translate: function ( offset ) {
<ide>
<add> if ( ! offset.isVector3 ) {
<add>
<add> throw new Error( 'THREE.Box3: .translate() expects a Vector3.' );
<add>
<add> }
<add>
<ide> this.min.add( offset );
<ide> this.max.add( offset );
<ide>
<ide><path>test/unit/src/math/Frustum.tests.js
<ide> import { Matrix4 } from '../../../../src/math/Matrix4';
<ide> import { Box3 } from '../../../../src/math/Box3';
<ide> import { Mesh } from '../../../../src/objects/Mesh';
<ide> import { BoxGeometry } from '../../../../src/geometries/BoxGeometry';
<del>import { zero3, one3 } from './Constants.tests';
<add>import { zero3, one3, eps } from './Constants.tests';
<ide>
<ide> const unit3 = new Vector3( 1, 0, 0 );
<ide>
<ide> export default QUnit.module( 'Maths', () => {
<ide> intersects = a.intersectsBox( box );
<ide> assert.notOk( intersects, "No intersection" );
<ide>
<del> box.translate( - 1, - 1, - 1 );
<add> // add eps so that we prevent box touching the frustum, which might intersect depending on floating point numerics
<add> box.translate( new Vector3( - 1 - eps, - 1 - eps, - 1 - eps ) );
<ide>
<ide> intersects = a.intersectsBox( box );
<ide> assert.ok( intersects, "Successful intersection" ); | 2 |
Text | Text | remove the mock guide | 19312f361913bf1ff9eccfc2aaf498b2264cc6ec | <ide><path>mock-guide/README.md
<del># Mock Guide Articles
<del>
<del>This directory contains mock guide articles for testing while developing the client source code. If you are looking forward to contribute to a guide article you should check this directory instead: [`/guide`](/guide)
<ide><path>mock-guide/english/accessibility/accessibility-basics/index.md
<del>---
<del>title: Accessibility Basics
<del>---
<del>> "The Dark Arts are many, varied, ever-changing, and eternal. Fighting them is like fighting a many-headed monster, which, each time a neck is severed, sprouts a head even fiercer and cleverer than before. You are fighting that which is unfixed, mutating, indestructible."
<del>>
<del>> --Professor Severus Snape, Harry Potter Series
<del>
<del>
<del>Accessibility's role in development is essentially understanding the user's perspective and needs, and knowing that the web, and applications are a solution for people with disabilities.
<del>
<del>In this day and age, more and more new technologies are invented to make the life of developers, as well as users, easier. To what degree this is a good thing is a debate for another time, for now it's enough to say the toolbox of a developer, especially a web developer, is as ever-changing as the so called "dark arts" are according to our friend Snape.
<del>
<del>One tool in that toolbox should be accessibility. It is a tool that should ideally be used in one of the very first steps of writing any form of web content. However, this tool is often not all that well presented in the toolbox of most developers. This could be due to a simple case of not knowing it even exists to extreme cases like not caring about it.
<del>
<del>In my life as a user, and later a developer, who benefits from accessibility in any form of content, I have seen both ends of that spectrum. If you are reading this article, I am guessing you are in one of the following categories:
<del>
<del>* You are a novice web developer and would like to know more about accessibility.
<del>* You are a seasoned web developer and have lost your way (more on that later).
<del>* You feel that there is a legal obligation from work, and need to learn more about it.
<del>
<del>If you fall outside these rather broad categories, please let me know. I always like to hear from the people who read what I write about. Implementing accessibility impacts the entire team, from the colors chosen by the designer, the copy written by the copywriter, and to you, the developer.
<del>
<del>## So, what is accessibility anyway?
<del>
<del>Accessibility in itself is a bit of a misleading term sometimes, especially if English is your second language. It is sometimes referred to as inclusive design.
<del>
<del>If your site is on the Internet, reachable by anyone with a web browser, in one sense that website is accessible to everyone with a web browser.
<del>
<del>But, is all content on your website actually readable, usable and understandable for everyone? Are there no thresholds that bar certain people from 'accessing' all the information you are exposing?
<del>
<del>You could ask yourself questions like the following ones:
<del>
<del>* If you add information that is only contained in an audio file, can a deaf person still get that information?
<del>* If you denote an important part of your website with a certain color, will a colorblind person know about it?
<del>* If you add images on your website that convey important information, how will a blind or low-vision person know about it?
<del>* If you want to navigate the application with keyboard or mouth-stick, will it be possible and predictable?
<del>* Does your application assume the orientation of the device, and what if the user can't physically change it?
<del>* Are there forgiving timed aspects of your application for someone that might need more time to fill in a form?
<del>* Does your application still work (progressive enhancement) assuming that JavaScript does not load in time?
<del>* You can even go as far as saying, if your website is very resource-heavy, will someone on a slow or spotty connection be able to read your content?
<del>
<del>This is where accessibility comes into play. Accessibility basically entails making your content as friendly, as easy to 'access' as possible for the largest amount of people. This includes people who are deaf, low-vision, blind, dyslexic, mute, on a slow connection, colorblind, suffering from epilepsy, mental fatigue, age, physical limitations, etc.
<del>
<del>## Why implement accessibility?
<del>
<del>You may think that accessibility doesn't apply to you or to your users, so why implement it? What would a blind person do with a photo editing tool?
<del>
<del>The truth is, you're right to a certain degree. If you have done meticulous user research and have excluded any chance of a certain group of people visiting your website, the priority for catering to that group of people diminishes quite a bit.
<del>
<del>However, doing this research is key in actually defending such a statement. Did you know there were <a href='http://audiogames.net' target='_blank' rel='nofollow'>blind gamers?</a> and even <a href='http://peteeckert.com/' target='_blank' rel='nofollow'>blind photographers?</a>. Perhaps you knew <a href='http://mentalfloss.com/article/25750/roll-over-beethoven-6-modern-deaf-musicians' target='_blank' rel='nofollow'>musicians can be deaf</a>?
<del>
<del>If you did, good for you. If not, I guess this drives my point home all the more.
<del>
<del>The picture gets even more complicated when we look at legislation that actually forces you to make certain websites and web apps accessible. A prime example is the US-based <a href='http://jimthatcher.com/webcourse1.htm' target='_blank' rel='nofollow'>section 508</a>. Right now, this law mainly refers to government organizations, public sector websites etc. However, laws change.
<del>
<del>Last year, airline websites were included in this list which meant that even here in Europe, airline website devs scrambled to make their content accessible. Not doing so can get your company a fine of literally tens of thousands of dollars for each day the problem isn't fixed.
<del>
<del>There's variations on this legislation all over the world, some more severe and all-encompassing than others. Not knowing about that fact doesn't make the lawsuit go away, sadly.
<del>
<del>## Ok, so accessibility is a big deal. Now how do we implement it?
<del>
<del>That question, sadly, is harder to answer than it may seem. The Harry Potter quote at the top is there for a reason, and its not my being an avid Fantasy reader.
<del>
<del>As I stated above, accessibility is important for a large group of different people, each with their own needs. Making your website work for literally everyone is a large, on-going task.
<del>
<del>To bring a bit of a method to the madness, the Web Content Accessibility Guidelines or <a href='https://www.wuhcag.com/web-content-accessibility-guidelines/' target='_blank' rel='nofollow'>WCAG</a> were composed. This document contains a number of criteria you can use to check your website. For now, I will cover some of the most important basics here. I will point you at the low-hanging fruits, so to speak. In subsequent articles, I will discuss more advanced techniques like [WAI-ARIA] which is important for JavaScript-based apps.
<del>
<del>### Talk like the natives
<del>
<del>The HTML specification is a document that describes how the language should be used to build websites. Assistive technologies, like screen-readers, speech recognition programs etc. are aware of this document. Web developers however, often are not, or at least not enough, and think something like this is ok:
<del>```html
<del> <div class="awesome-button"></div>
<del>
<del> <span><strong>Huge heading I will style with CSS later</strong></span>
<del>
<del> <span class="clickable-with-JavaScript">English</span>
<del>```
<del>Guess what? All three of these elements break several criteria of WCAG and therefore are not accessible at all.
<del>
<del>The first element breaks the so-called 'name, role, value'-criterium, which states that all elements on a web page should expose their name, their role (like button) and their value (like the contents of an edit field) to assistive technologies. This div actually doesn't provide any of the three, rendering it invisible to screen-readers.
<del>
<del>The second element looks like a heading visually after styling it with CSS, but semantically is a span. Therefore, assistive technologies won't know its a heading. A screen-reader will read this as regular text, instead of a heading. Screen-readers often have a hotkey to quickly jump to the nearest heading, this heading will not be included in that scope.
<del>
<del>The third element could for example be an element a user can click to change the language of the website. Maybe a fancy animated menu of languages will expand when it is clicked. However, this is also a span and does not expose its role (link, or button), making assistive technologies think this is just the word English with some styling.
<del>
<del>Spans and divs are non-elements. They are meant to contain other elements, not to be elements themselves. You can fix these in two ways:
<del>
<del>* You can manually add ARIA-attributes to the elements above. This is an advanced topic and outside the scope of this article.
<del>* Or, you can simply do this:
<del>```html
<del> <button>This is a button</button>
<del>
<del> <h2>Here's a heading level two</h2>
<del>
<del> <a href="JavascriptThing">English</a>
<del>```
<del>Boom. Suddenly, all these elements are now perfectly accessible, just by using native HTML. HTML the way it was meant to be used, in other words.
<del>
<del>### A foundation cannot stand without structure
<del>
<del>A bit earlier, I touched upon a screen-reader's hotkeys to jump from heading to heading. There are in fact many hotkeys like this to quickly jump to the nearest table, form field, link etc. Making sure these headings are actually in logical places is therefore a good practice and really decreases your assistive technology users' stress levels, which is good if you want visitors to keep coming back to your website.
<del>
<del>Also remember that headings are hierarchical. If you use an h2, make sure the h3's that follow it actually have something to do with that h2\. Don't put an h3 for contact details under your h2 for recent blog posts. A good analogy here is a book with chapters, that have subsections. You wouldn't put a section on baking cookies in the middle of a chapter on preparing vegetables ...or ...you wouldn't... right?
<del>
<del>### What's the alternative?
<del>
<del>Images on a website are great. They add a new layer to your content, can really make the experience your site visitors have way more immersive and generally just look good among all that text. A picture can say more than a thousand words, right?
<del>
<del>Certainly. That is, if you can see them. In the HTML5-specification, an img-attribute must always have an alt-attribute. This attribute is meant as an alternative to the image in case it can't be seen. This would be true for blind visitors to your website, but also when your image can't be loaded for some reason. Not adding an alt-tag to an img-attribute is therefore not only breaking accessibility, but going against the HTML5-spec.
<del>
<del>I implore any web developer who catches themselves doing this to eat their programmer's hat and work on Windows 95 exclusively for a week. After the time is up, write an essay on what you have learned from this ordeal so I can have a laugh during my afternoon coffee.
<del>
<del>Now, there is one caveat here. Alt-attributes are mandatory according to the HTML5-spec, but it's not mandatory to actually fill them in. `<img src="awesome-image.jpg", alt="">` is therefore legal HTML5 code.
<del>
<del>Should you therefore fill in alt-tags for all images? It depends on the image, really. For background images, the answer is usually no, but you should use CSS for those anyway.
<del>
<del>For purely decorative images that have no information in them at all, you're basically free to choose. Either put in something useful and descriptive or nothing at all.
<del>
<del>For images that contain information, like a brochure, a map, a chart etc., not adding alt text breaks WCAG unless you provide a textual alternative. This is usually an alt-attribute, but can also be a block of text right below or next to the image.
<del>
<del>For images of text, the text can either be included in the alt-attribute or offered in some alternative manner. The problem is that adding the textual alternative on the same page would basically make the same content show twice for people who can see the image, which is why the alt-attribute is better in this case.
<del>
<del>The text should provide the context and information that is an alternative to seeing the image. It is simply not enough to write "image of hot air balloons" - why are the balloon pictures there? If the image is stylized or conveys an emotional meaning, this can be included.
<del>
<del>### I can't read your scrawl, son
<del>
<del>Even people who don't wear glasses and have no problem with their eyesight at all benefit from an easy to read font and proper contrast. I'm sure you would cringe if you had to fill in a form where light yellow, hopelessly loopy letters are placed on a white background. For people who's eyesight is not as good, like your grandma, for example, this becomes hopelessly worse.
<del>
<del>The WCAG has contrast ratios for smaller and larger letters and there's plenty of tools out there to check if the contrast ratios are strong enough. The information and tooling is there, go use it.
<del>
<del>A good place to start checking color contrast is by using the [WebAIM](https://webaim.org/resources/contrastchecker/) color contrast checker.
<del>
<del>### What does this button do?
<del>While we are on the topic of forms, let's quickly glance at the <code>input</code> tag. This little guy is kinda important.
<del>
<del>When you put some input fields on a web page, you can use labels to ...well ...label them. However, putting them next to each other is not quite enough. The attribute you want is the for-attribute, which takes the ID of a subsequent input field. This way, assistive technologies know what label to associate with what form field.
<del>
<del>I guess the best way to illustrate this is by giving an example:
<del>```html
<del> <label for='username'>
<del>
<del> <input type='text' id='username'>
<del>```
<del>
<del>This will make for example a screen-reader say "username, text edit field", instead of just reporting' text edit field' and requiring the user to go look for a label. This also really helps people who use speech recognition software.
<del>
<del>### That's a tall order
<del>
<del>Let's take a small break. I want you to go look at a really well-designed web page. It can be any page. Go on, I'll wait.
<del>
<del>Back? Ok, great. Now, look at the page again but disable all CSS. Does it still look good? Is the content on the page still in a logical order? If so, great. You found a page with decent HTML structure. (One way to easily view a page without CSS is to load the site in WebAIM's <a href='http://wave.webaim.org' target='_blank' rel='nofollow'>WAVE Web Accessibility Evaluation Tool</a>. Then click on the "No Styles" tab to see it without styles.)
<del>
<del>If not, great. Now you get an impression of what I have to deal with on a daily basis when I come across a badly structured website.
<del>
<del>Full disclosure: I tend to curse when this happens. Loudly. With vigor.
<del>
<del>Why is this such a big deal? I'll explain.
<del>
<del>_spoiler alert!_ To those who have only covered the HTML/CSS curriculum so far, we're going to skip ahead a little.
<del>
<del>Screen-readers and other assistive technologies render a top-to-bottom representation of a web page based on your website's DOM. All positional CSS is ignored in this version of the web page.
<del>
<del>DOM stands for Document Object Model and is the tree-like structure of your website's HTML elements. All your HTML elements are nodes that hierarchically interlink based on the HTML tags you use and JavaScript. Screen-readers use this DOM tree to work with your HTML code.
<del>
<del>If you put your element at the top of your element, it will show up at the top of your DOM tree as well. therefore, the screen-reader will put it at the top as well, even if you move it to the bottom of the page using CSS.
<del>
<del>So a final tip I want to give you all is to pay attention to the order of your HTML, not just your finished website with CSS added in. Does it still make sense without CSS? Great!
<del>
<del>Oh ... it doesn't? In that case ..you might one day hear a muffled curse carried to you on a chilly breeze while walking outside. That will most likely be me, visiting your website.
<del>
<del>In that case I really only have two words for you. Often have I heard those same two words directed at me when I wrote some bad code and it is with great pleasure that I tell you: "go fix!"
<del>
<del>### Color Contrast
<del>Color contrast should be a minimum of 4.5:1 for normal text and 3:1 for large text. “Large text” is defined as text that is at least 18 point (24px) or 14 point (18.66px) and bold. [Contrast Checker](https://webaim.org/resources/contrastchecker/)
<del>
<del>## Conclusion
<del>I have told you about accessibility, what it is, what it's not and why it's important.
<del>
<del>I have also given you the basics, the very basics, of getting accessibility right. These basics are however very powerful and can make your life a lot easier when coding for accessibility.
<del>
<del>If we talk in FCC terms, you should keep these in mind while doing the HTML/CSS curriculum as well as the JavaScript curriculum.
<del>In subsequent articles, I will touch on a number of more notch topics. A number of questions I will answer are:
<del>
<del>* Adding structured headings sounds like a good idea, but they don't fit in my design. What do I do?
<del>* Is there a way for me to write content only screen-readers and other assistive technologies see?
<del>* How do I make custom JavaScript components accessible?
<del>* What tools are there, in addition to inclusive user testing, that can be used to develop the most robust and accessible experience for the largest group of users?
<ide><path>mock-guide/english/accessibility/index.md
<del>---
<del>title: Accessibility
<del>---
<del>## Accessibility
<del><strong>Web accessibility means that people with disabilities can use the Web</strong>.
<del>
<del>More specifically, Web accessibility means that people with disabilities can perceive, understand, navigate, and interact with the Web and that they can
<del>contribute to the Web. Web accessibility also benefits others, including [older people](https://www.w3.org/WAI/bcase/soc.html#of) with changing abilities
<del>due to aging.
<del>
<del>Web accessibility encompasses all disabilities that affect access to the Web, including visual, auditory, physical, speech, cognitive, and neurological
<del>disabilities. The document [How People with Disabilities Use the Web](http://www.w3.org/WAI/intro/people-use-web/Overview.html) describes how different
<del>disabilities affect Web use and includes scenarios of people with disabilities using the Web.
<del>
<del>Web accessibility also **benefits** people *without* disabilities. For example, a key principle of Web accessibility is designing Web sites and software
<del>that are flexible to meet different user needs, preferences, and situations. This **flexibility** also benefits people *without* disabilities in certain
<del>situations, such as people using a slow Internet connection, people with "temporary disabilities" such as a broken arm, and people with changing abilities
<del>due to aging. The document [Developing a Web Accessibility Business Case for Your Organization](https://www.w3.org/WAI/bcase/Overview) describes many
<del>different benefits of Web accessibility, including **benefits for organizations**.
<del>
<del>Web accessibility should also include people who don't have access to the internet or to computers.
<del>
<del>A prominent guideline for web development was introduced by the [World Wide Web Consortium (W3C)](https://www.w3.org/), the [Web Accessibility Initiative](https://www.w3.org/WAI/)
<del>from which we get the [WAI-ARIA](https://developer.mozilla.org/en-US/docs/Learn/Accessibility/WAI-ARIA_basics), the Accessible Rich Internet Applications Suite.
<del>Where WAI tackles the semantics of html to more easily navigate the DOM Tree, ARIA attempts to make web apps, especially those developed with javascript and
<del>AJAX, more accessible.
<del>
<del>The use of images and graphics on websites can decrease accessibility for those with visual impairments. However, this doesn't mean designers should avoid
<del>using these visual elements. When used correctly, visual elements can convey the appropriate look and feel to users without disabilities and should be used
<del>to do so. In order to use these elements appropriately, web designers must use alt text to communicate the message of these elements to those who cannot see
<del>them. Alt text should be short and to the point--generally [no more than five to 15 words](https://www.thoughtco.com/writing-great-alt-text-3466185). If a
<del>graphic is used to convey information that exceeds the limitations of alt text, that information should also exist as web text in order to be read by screen
<del>readers. [Learn more about alt text](https://webaim.org/techniques/alttext/).
<del>
<del>Just like Alt text is for people who are visually impaired, transcripts of the audio are for the people who cannot listen. Providing a written document or a transcript of what is being spoken accessible to people who are hard of hearing.
<del>
<del>Copyright © 2005 <a href="http://www.w3.org" shape="rect">World Wide Web Consortium</a>, (<a href="http://www.csail.mit.edu/" shape="rect">MIT</a>, <a href="http://www.ercim.org" shape="rect">ERCIM</a>, <a href="http://www.keio.ac.jp" shape="rect">Keio</a>,<a href="http://ev.buaa.edu.cn" shape="rect">Beihang</a>). http://www.w3.org/Consortium/Legal/2015/doc-license
<del>
<del>### More Information:
<del><a href='https://www.w3.org/WAI/intro/accessibility.php' target='_blank' rel='nofollow'>w3.org introduction to accessibility.</a>
<del><a href='http://a11yproject.com/' target='_blank' rel='nofollow'>The A11Y Project</a>
<ide><path>mock-guide/english/agile/index.md
<del>---
<del>title: Agile
<del>---
<del>## Agile
<del>
<del>Agile software development is a collection of methodologies used to manage teams of developers. It advocates adaptive planning, evolutionary development, early delivery, and continuous improvement, and it encourages rapid and flexible response to change. People and communication are considered more important than tools and processes.
<del>
<del>Agile emphasizes asking end users what they want, and frequently showing them demos of the product as it is developed. This stands in contrast to the "Waterfall" approach, specification-driven development, and what Agile practitioners call "Big Up-Front Design." In these approaches, the features are planned out and budgeted before development starts.
<del>
<del>With Agile, the emphasis is on "agility" - being able to quickly respond to feedback from users and other changing circumstances.
<del>
<del>
<del>
<del>The agile software development places its emphasis on four core values.
<del>1. Preference on team and individual interactions over tools and processes.
<del>2. A working software over exhaustive documentation.
<del>3. Collaboration with customer is given more importance than contract negotiations.
<del>4. Response to changes over following a plan.
<del>
<del>There are many different flavors of agile, including Scrum and Extreme Programming.
<del>
<del>
<del>
<del>### More information
<del>
<del>[Agile Alliance's Homepage](https://www.agilealliance.org/)
<ide><path>mock-guide/english/algorithms/algorithm-design-patterns/behavioral-patterns/index.md
<del>---
<del>title: Behavioral patterns
<del>---
<del>
<del>## Behavioral patterns
<del>
<del>Behavioral design patterns are design patterns that identify common communication problems between objects and realize these patterns. By doing so, these patterns increase flexibility in carrying out this communication, making the software more reliable and easy to mantain.
<del>
<del>Examples of this type of design pattern include:
<del>
<del>1. **Chain of responsibility pattern**: Command objects are handled or passed on to other objects by logic-containing processing objects.
<del>2. **Command pattern**: Command objects encapsulate an action and its parameters.
<del>3. **Interpreter pattern**: Implement a specialized computer language to rapidly solve a specific set of problems.
<del>4. **Iterator pattern**: Iterators are used to access the elements of an aggregate object sequentially without exposing its underlying representation.
<del>5. **Mediator pattern**: Provides a unified interface to a set of interfaces in a subsystem.
<del>6. **Memento pattern**: Provides the ability to restore an object to its previous state (rollback).
<del>7. **Null Object pattern**: Designed to act as a default value of an object.
<del>8. **Observer pattern**: a.k.a. P**ublish/Subscribe** or **Event Listener**. Objects register to observe an event that may be raised by another object.
<del>9. **Weak reference pattern**: De-couple an observer from an observable.
<del>10. **Protocol stack**: Communications are handled by multiple layers, which form an encapsulation hierarchy.
<del>11. **Scheduled-task pattern**: A task is scheduled to be performed at a particular interval or clock time (used in real-time computing).
<del>12. **Single-serving visitor pattern**: Optimize the implementation of a visitor that is allocated, used only once, and then deleted.
<del>13. **Specification pattern**: Recombinable business logic in a boolean fashion.
<del>14. **State pattern**: A clean way for an object to partially change its type at runtime.
<del>15. **Strategy pattern**: Algorithms can be selected on the fly.
<del>16. **Template method pattern**: Describes the program skeleton of a program.
<del>17. **Visitor pattern**: A way to separate an algorithm from an object.
<del>
<del>### Sources
<del>[https://en.wikipedia.org/wiki/Behavioral_pattern](https://en.wikipedia.org/wiki/Behavioral_pattern)
<ide><path>mock-guide/english/algorithms/algorithm-design-patterns/index.md
<del>---
<del>title: Algorithm Design Patterns
<del>---
<del>## Algorithm Design Patterns
<del>
<del>In software engineering, a design pattern is a general repeatable solution to a commonly occurring problem in software design. A design pattern isn't a finished design that can be transformed directly into code. It is a description or template for how to solve a problem that can be used in many different situations.
<del>
<del>Design patterns can speed up the development process by providing tested, proven development paradigms.
<del>
<del>This patterns are divided in three major categories:
<del>
<del>### Creational patterns
<del>
<del>These are design patterns that deal with object creation mechanisms, trying to create objects in a manner suitable to the situation. The basic form of object creation could result in design problems or in added complexity to the design. Creational design patterns solve this problem by somehow controlling this object creation.
<del>
<del>### Structural patterns
<del>
<del>These are design patterns that ease the design by identifying a simple way to realize relationships between entities.
<del>
<del>### Behavioral patterns
<del>
<del>These are design patterns that identify common communication patterns between objects and realize these patterns. By doing so, these patterns increase flexibility in carrying out this communication.
<del>
<del>#### More Information:
<del><!-- Please add any articles you think might be helpful to read before writing the article -->
<del>[Design patterns - Wikipedia](https://en.wikipedia.org/wiki/Design_Patterns)
<del>
<ide><path>mock-guide/english/algorithms/avl-trees/index.md
<del>---
<del>title: AVL Trees
<del>---
<del>## AVL Trees
<del>
<del>
<del>An AVL tree is a subtype of binary search tree.
<del>
<del>A BST is a data structure composed of nodes. It has the following guarantees:
<del>
<del>1. Each tree has a root node (at the top).
<del>2. The root node has zero or more child nodes.
<del>3. Each child node has zero or more child nodes, and so on.
<del>4. Each node has up to two children.
<del>5. For each node, its left descendents are less than the current node, which is less than the right descendents.
<del>
<del>AVL trees have an additional guarantee:
<del>6. The difference between the depth of right and left subtrees cannot be more than one. In order to maintain this guarantee, an implementation of an AVL will include an algorithm to rebalance the tree when adding an additional element would upset this guarantee.
<del>
<del>AVL trees have a worst case lookup, insert and delete time of O(log n).
<del>
<del>### Right Rotation
<del>
<del>
<del>
<del>### Left Rotation
<del>
<del>
<del>
<del>### AVL Insertion Process
<del>
<del>You will do an insertion similar to a normal Binary Search Tree insertion. After inserting, you fix the AVL property using left or right rotations.
<del>
<del> - If there is an imbalance in left child of right subtree, then you perform a left-right rotation.
<del> - If there is an imbalance in left child of left subtree, then you perform a right rotation.
<del> - If there is an imbalance in right child of right subtree, then you perform a left rotation.
<del> - If there is an imbalance in right child of left subtree, then you perform a right-left rotation.
<del>
<del>
<del>#### More Information:
<del>[YouTube - AVL Tree](https://www.youtube.com/watch?v=7m94k2Qhg68)
<del>
<del>An AVL tree is a self-balancing binary search tree.
<del>An AVL tree is a binary search tree which has the following properties:
<del>->The sub-trees of every node differ in height by at most one.
<del>->Every sub-tree is an AVL tree.
<del>
<del>AVL tree checks the height of the left and the right sub-trees and assures that the difference is not more than 1. This difference is called the Balance Factor.
<del>The height of an AVL tree is always O(Logn) where n is the number of nodes in the tree.
<del>
<del>AVL Tree Rotations:-
<del>
<del>In AVL tree, after performing every operation like insertion and deletion we need to check the balance factor of every node in the tree. If every node satisfies the balance factor condition then we conclude the operation otherwise we must make it balanced. We use rotation operations to make the tree balanced whenever the tree is becoming imbalanced due to any operation.
<del>
<del>Rotation operations are used to make a tree balanced.There are four rotations and they are classified into two types:
<del>->Single Left Rotation (LL Rotation)
<del>In LL Rotation every node moves one position to left from the current position.
<del>->Single Right Rotation (RR Rotation)
<del>In RR Rotation every node moves one position to right from the current position.
<del>->Left Right Rotation (LR Rotation)
<del>The LR Rotation is combination of single left rotation followed by single right rotation. In LR Rotation, first every node moves one position to left then one position to right from the current position.
<del>->Right Left Rotation (RL Rotation)
<del>The RL Rotation is combination of single right rotation followed by single left rotation. In RL Rotation, first every node moves one position to right then one position to left from the current position.
<ide><path>mock-guide/english/algorithms/index.md
<del>---
<del>title: Algorithms
<del>---
<del>
<del>## Algorithms
<del>
<del>In computer science, an algorithm is an unambiguous specification of how to solve a class of problems. Algorithms can perform calculations, data processing and automated reasoning tasks.
<del>
<del>An algorithm is an effective method that can be expressed within a finite amount of space and time and in a well-defined formal language for calculating a function. Starting from an initial state and initial input (perhaps empty), the instructions describe a computation that, when executed, proceeds through a finite number of well-defined successive states, eventually producing "output" and terminating at a final ending state. The transition from one state to the next is not necessarily deterministic; some algorithms, known as randomized algorithms, incorporate random input.
<del>
<del>There are certain requirements that an algorithm must abide by:
<del><ol>
<del> <li>Definiteness: Each step in the process is precisely stated.</li>
<del> <li>Effective Computability: Each step in the process can be carried out by a computer.</li>
<del> <li>Finiteness: The program will eventually successfully terminate.</li>
<del></ol>
<del>
<del>Some common types of algorithms include sorting algorithms, search algorithms, and compression algorithms. Classes of algorithms include Graph, Dynamic Programming, Sorting, Searching, Strings, Math, Computational Geometry, Optimization, and Miscellaneous. Although technically not a class of algorithms, Data Structures are often grouped with them.
<del>
<del>### Efficiency
<del>
<del>Algorithms are most commonly judged by their efficiency and the amount of computing resources they require to complete their task. A common way to evaluate an algorithm is to look at its time complexity. This shows how the running time of the algorithm grows as the input size grows. Since algorithms today have to operate on large data inputs, it is essential for our algorithms to have a reasonably fast running time.
<del>
<del>### Sorting Algorithms
<del>
<del>Sorting algorithms come in various flavors depending on your necessity.
<del>Some, very common and widely used are:
<del>
<del>#### Quick Sort
<del>
<del>There is no sorting discussion which can finish without quick sort. The basic concept is in the link below.
<del>[Quick Sort](http://me.dt.in.th/page/Quicksort/)
<del>
<del>#### Merge Sort
<del>It is the sorting algorithm which relies on the concept how to sorted arrays are merged to give one sorted arrays. Read more about it here-
<del>[Merge Sort](https://www.geeksforgeeks.org/merge-sort/)
<del>
<del>freeCodeCamp's curriculum heavily emphasizes creating algorithms. This is because learning algorithms is a good way to practice programming skills. Interviewers most commonly test candidates on algorithms during developer job interviews.
<del>
<del>### Further Resources
<del>
<del>[Intro to Algorithms | Crash Course: Computer Science](https://www.youtube.com/watch?v=rL8X2mlNHPM)
<del>
<del>This video gives an accessible and lively introduction to algorithms focusing on sorting and graph search algorithms.
<del>
<del>[What is an Algorithm and Why Should you Care? | Khan Academy](https://www.youtube.com/watch?v=CvSOaYi89B4)
<del>
<del>This video introduces algorithms and briefly discusses some high profile uses of them.
<del>
<del>[15 Sorting Algorithms in 6 Minutes | Timo Bingmann](https://www.youtube.com/watch?v=kPRA0W1kECg)
<del>
<del>This video visually demonstrates some popular sorting algorithms that are commonly taught in programming and Computer Science courses.
<del>
<del>[Algorithm Visualizer](http://algo-visualizer.jasonpark.me)
<del>
<del>This is a really good open source project that helps you visualize algorithms.
<del>
<del>[Infographic on how Machine Learning Algorithms Work](https://www.boozallen.com/content/dam/boozallen_site/sig/pdf/infographic/how-do-machines-learn.pdf)
<del>
<del>This infographic shows you how unsupervised and supervised machine learning algorithms work.
<ide><path>mock-guide/english/components/example/index.md
<del>---
<del>title: Example component
<del>component: example/Component/index.js
<del>---
<del>## Example component
<del>
<del>We can place inline component: <span id='example-component_span'></span>.
<del>Or place block component: <div id='example-component_div'></div>
<ide><path>mock-guide/english/components/index.md
<del>---
<del>title: Components
<del>---
<del>
<del>## Components
<del>
<del>We can use custom components for guide articles. Add
<del>
<del>```yml
<del>component: path/to/component
<del>```
<del>
<del>to an article frontmatter to use your component. Your component should be
<del>located in `client/src/templates/Guide/components/path/to/component`.
<ide><path>mock-guide/english/git/authenticate-with-github-using-ssh/index.md
<del>---
<del>title: How to authenticate with GitHub using SSH
<del>---
<del>
<del># How to authenticate with GitHub using SSH
<del>
<del>Check that there are no `rsa` files here before continuing, use:
<del>
<del>```shell
<del>ls -al ~/.ssh
<del>```
<del>
<del>If there is nothing to list (i.e. `: No such file or directory`) then use:
<del>
<del>```shell
<del>mkdir $HOME/.ssh
<del>```
<del>
<del>If there's nothing there then generate a new keygen with:
<del>
<del>```shell
<del>ssh-keygen -t rsa -b 4096 -C your@email.com
<del>```
<del>
<del>Now using `ls -al ~/.ssh` will show our `id_rsa.pub` file.
<del>
<del>Add the SSH key to the SSH agent:
<del>
<del>```shell
<del>eval "$(ssh-agent -s)" # for mac and Linux from bash
<del>```
<del>
<del>```shell
<del>eval `ssh-agent -s`
<del>ssh-agent -s # for Windows
<del>```
<del>
<del>Add RSA key to SHH with:
<del>
<del>```shell
<del>ssh-add ~/.ssh/id_rsa
<del>```
<del>
<del>Copy your key to clipboard
<del>
<del>```shell
<del>clip < ~/.ssh/id_rsa.pub # Windows
<del>```
<del>
<del>```shell
<del>cat ~/.ssh/id_rsa.pub # Linux
<del>```
<del>
<del>Go to your GitHub [settings](https://github.com/settings/keys) page and click the 'New SSH key' button paste in your generated key.
<del>
<del>Then authenticate with:
<del>
<del>```shell
<del>ssh -T git@github.com
<del>```
<ide><path>mock-guide/english/git/difference-git-github/index.md
<del>---
<del>title: Difference between Git and GitHub
<del>---
<del>## Difference between Git and GitHub
<del>
<del>Git and GitHub are two different things. [Git](https://git-scm.com/) is the [version control system](https://en.wikipedia.org/wiki/Version_control), while [GitHub](https://github.com/) is a service for hosting Git repos and help people collaborate on writing software. However, they are often confounded because of their similar name, because of the fact that GitHub builds on top of Git, and because many websites and articles don't make the difference between them clear enough.
<del>
<del>
<del>
<del>### Git
<del>
<del>Git is the distributed version control system. Git is responsible for keeping track of changes to content – usually source code files.
<del>
<del>For more info, there is a [complete article about Git itself](https://guide.freecodecamp.org/git).
<del>
<del>### GitHub
<del>
<del>GitHub is a company that provides Git repository hosting. That means that they provide a turnkey solution to host Git repositories on their servers. That can be useful to keep a backup of your repository (Git only tracks the changes made to you files over time, the repo still needs to be backed up), and to have a centralized place to keep and share your code with others.
<del>
<del>More than just a Git repository hosting service, GitHub is a [software forge](https://en.wikipedia.org/wiki/Forge_(software)). That means it also provides an [issue tracker](https://en.wikipedia.org/wiki/Issue_tracking_system), tools for [code review](https://en.wikipedia.org/wiki/Code_review), and other tools for collaborating with other people and creating software.
<del>
<del>GitHub isn't the only one to provide this kind of service. One of its major competitors is [GitLab](https://gitlab.com). For more on this, look at the [article about Git hosting](https://guide.freecodecamp.org/git/git-hosting).
<ide><path>mock-guide/english/git/git-alias/index.md
<del>---
<del>title: Git Aliases
<del>---
<del>
<del>## Git Alias
<del>
<del>Git doesn’t automatically infer your command if you type it in partially. If you don’t want to type the entire text of each of the Git commands, you can easily set up an alias for each command using git config. Here are a couple of examples you may want to set up:
<del>
<del>```shell
<del>$ git config --global alias.co checkout
<del>$ git config --global alias.br branch
<del>$ git config --global alias.ci commit
<del>$ git config --global alias.st status
<del>```
<del>This means that, for example, instead of typing git commit, you just need to type git ci. As you go on using Git, you’ll probably use other commands frequently as well; don’t hesitate to create new aliases.
<del>
<del>This technique can also be very useful in creating commands that you think should exist. For example, to correct the usability problem you encountered with unstaging a file, you can add your own unstage alias to Git:
<del>
<del>```shell
<del>$ git config --global alias.unstage 'reset HEAD --'
<del>```
<del>This makes the following two commands equivalent:
<del>
<del>```shell
<del>$ git unstage fileA
<del>$ git reset HEAD fileA
<del>```
<del>This seems a bit clearer. It’s also common to add a last command, like this:
<del>
<del>```shell
<del>$ git config --global alias.last 'log -1 HEAD'
<del>```
<del>This way, you can see the last commit easily:
<del>
<del>```shell
<del>$ git last
<del>commit 66938dae3329c7aebe598c2246a8e6af90d04646
<del>Author: Josh Goebel <dreamer3@example.com>
<del>Date: Tue Aug 26 19:48:51 2008 +0800
<del>
<del> test for current head
<del>
<del> Signed-off-by: Scott Chacon <schacon@example.com>
<del>```
<del>
<del>```shell
<del>$ git config --global alias.st status --short --branch
<del>```
<del>When you run the command `git st`, your git status will be displayed in a nice, streamlined format.
<del>
<del>### View, Edit and Delete Aliases
<del>To view all of the aliases you have created on your machine, run the command:
<del>```shell
<del>cat ~/.gitconfig
<del>```
<del>Replacing `cat` with `nano` will allow you to edit them or remove them completely.
<del>
<del>### Alias to view all Aliases
<del>To add an alias to view all others created on your machine, add the alias
<del>```shell
<del> git config --global alias.aliases 'config --get-regexp alias'
<del>```
<ide><path>mock-guide/english/git/git-bisect/index.md
<del>---
<del>title: Git Bisect
<del>---
<del>
<del>## Git Bisect
<del>
<del>The `git bisect` command helps you find commits that added specific changes in your project. This is particularly useful if you need to find which change introduced a bug.
<del>
<del>This command works by providing it a "bad" commit that includes the bug and a "good" commit from before the bug was introduced. Through binary search, `git bisect` will pick commits and ask you to identify whether the commit is "good" or "bad". This continues until the command is able to find the exact commit that introduced the change.
<del>
<del>### Bisect Commands
<del>To start a bisect session, you will tell git to start a bisect session, identify a "bad" version, and identify a "good" version. Assuming the current commit is broken but commit `4b60707` is good, you will run the following:
<del>```shell
<del>git bisect start
<del>git bisect bad
<del>git bisect good 4b60707
<del>```
<del>
<del>Git will check out a commit between the "good" and "bad" versions and output something like the following:
<del>```
<del>Bisecting: 2 revisions left to test after this (roughly 2 steps)
<del>```
<del>
<del>You should now tell git if the current commit works with `git bisect good` or if the current commit is broken with `git bisect bad`. This process will repeat until the command is able to print out the first bad commit.
<del>
<del>When finished, you should clean up the bisect session. This will reset your HEAD to what it was before you started the bisect session:
<del>```shell
<del>git bisect reset
<del>```
<del>
<del>### Other Resources
<del>- [Git bisect documentation](https://git-scm.com/docs/git-bisect)
<ide><path>mock-guide/english/git/git-blame/index.md
<del>---
<del>title: Git Blame
<del>---
<del>## Git Blame
<del>
<del>With `git blame` you can see who changed what in a specific file, line by line, which is useful if you work in a team, instead of alone. For example, if a line of code makes you wonder why it is there, you can use `git blame` and you will know who you must ask.
<del>
<del>### Usage
<del>
<del>You use `git blame` like this: `git blame NAME_OF_THE_FILE`
<del>
<del>For example: `git blame triple_welcome.rb`
<del>
<del>You will see an output like this:
<del>
<del>```shell
<del>0292b580 (Jane Doe 2018-06-18 00:17:23 -0500 1) 3.times do
<del>e483daf0 (John Doe 2018-06-18 23:50:40 -0500 2) print 'Welcome '
<del>0292b580 (Jane Doe 2018-06-18 00:17:23 -0500 3) end
<del>```
<del>
<del>Each line is annotated with the SHA, name of the author and date of the last commit.
<del>
<del>### Aliasing Git Blame
<del>
<del>Some programmers don't like the word 'blame', because of the negative connotation 'blaming someone' brings with it. Also, the tool is rarely (if ever) used for blaming someone, but rather to ask for advice or understand the history of a file. Therefore, sometimes people use an alias to change `git blame` to something which sounds a bit nicer such as `git who`, `git history` or `git praise`. To do that you simply add a git alias like this:
<del>
<del>`git config --global alias.history blame`
<del>
<del>You can find more information about aliasing git commands [here](../git-alias/index.md).
<del>
<del>### Text Editor Plugins utilizing Git Blame
<del>
<del>There are a few plugins out there for various text editors which utilize `git blame`. For example, to create something like heat maps or add inline information for the current line you are inspecting. A famous example is [GitLense](https://gitlens.amod.io/) for VSCode.
<del>
<del>### Further Reading
<del>
<del>- [Git Blame documentation](https://git-scm.com/docs/git-blame)
<del>- [further reading on usage of Git Blame](https://corgibytes.com/blog/2016/10/18/git-blame/)
<ide><path>mock-guide/english/git/git-branch/index.md
<del>---
<del>title: Git Branch
<del>---
<del>
<del>## Git Branch
<del>
<del>Git's branching functionality lets you create new branches of a project to test ideas, isolate new features, or experiment without impacting the main project.
<del>
<del>**Table of Contents**
<del>- [View Branches](#view-branches)
<del>- [Checkout a Branch](#checkout-a-branch)
<del>- [Create a New Branch](#create-a-new-branch)
<del>- [Rename a Branch](#rename-a-branch)
<del>- [Delete a Branch](#delete-a-branch)
<del>- [Compare Branches](#compare-branches)
<del>- [Help with Git Branch](#help-with-git-branch)
<del>- [More Information](#more-information)
<del>
<del>### View Branches <a name="view-branches"></a>
<del>To view the branches in a Git repository, run the command:
<del>```shell
<del>git branch
<del>```
<del>
<del>To view both remote-tracking branches and local branches, run the command:
<del>```shell
<del>git branch -a
<del>```
<del>
<del>There will be an asterisk (\*) next to the branch that you're currently on.
<del>
<del>There are a number of different options you can include with `git branch` to see different information. For more details about the branches, you can use the `-v` (or `-vv`, or `--verbose`) option. The list of branches will include the SHA-1 value and commit subject line for the `HEAD` of each branch next to its name.
<del>
<del>You can use the `-a` (or `--all`) option to show the local branches as well as any remote branches for a repository. If you only want to see the remote branches, use the `-r` (or `--remotes`) option.
<del>
<del>### Checkout a Branch <a name="checkout-a-branch"></a>
<del>To checkout an existing branch, run the command:
<del>```shell
<del>git checkout BRANCH-NAME
<del>```
<del>
<del>Generally, Git won't let you checkout another branch unless your working directory is clean, because you would lose any working directory changes that aren't committed. You have three options to handle your changes:
<del>1) trash them (see <a href='https://guide.freecodecamp.org/git/git-checkout/' target='_blank' rel='nofollow'>Git checkout for details</a>) or
<del>2) commit them (see <a href='https://guide.freecodecamp.org/git/git-commit/' target='_blank' rel='nofollow'>Git commit for details</a>) or
<del>3) stash them (see <a href='https://guide.freecodecamp.org/git/git-stash/' target='_blank' rel='nofollow'>Git stash for details</a>).
<del>
<del>### Create a New Branch <a name="create-a-new-branch"></a>
<del>To create a new branch, run the command:
<del>```shell
<del>git branch NEW-BRANCH-NAME
<del>```
<del>
<del>Note that this command only creates the new branch. You'll need to run `git checkout NEW-BRANCH-NAME` to switch to it.
<del>
<del>There's a shortcut to create and checkout a new branch at once. You can pass the `-b` option (for branch) with `git checkout`. The following commands do the same thing:
<del>```shell
<del># Two-step method
<del>git branch NEW-BRANCH-NAME
<del>git checkout NEW-BRANCH-NAME
<del>
<del># Shortcut
<del>git checkout -b NEW-BRANCH-NAME
<del>```
<del>
<del>When you create a new branch, it will include all commits from the parent branch. The parent branch is the branch you're on when you create the new branch.
<del>
<del>### Rename a Branch <a name="rename-a-branch"></a>
<del>To rename a branch, run the command:
<del>```shell
<del>git branch -m OLD-BRANCH-NAME NEW-BRANCH-NAME
<del>
<del># Alternative
<del>git branch --move OLD-BRANCH-NAME NEW-BRANCH-NAME
<del>```
<del>
<del>### Delete a Branch <a name="delete-a-branch"></a>
<del>Git won't let you delete a branch that you're currently on. You first need to checkout a different branch, then run the command:
<del>```shell
<del>git branch -d BRANCH-TO-DELETE
<del>
<del># Alternative:
<del>git branch --delete BRANCH-TO-DELETE
<del>```
<del>
<del>The branch that you switch to makes a difference. Git will throw an error if the changes in the branch you're trying to delete are not fully merged into the current branch. You can override this and force Git to delete the branch with the `-D` option (note the capital letter) or using the `--force` option with `-d` or `--delete`:
<del>```shell
<del>git branch -D BRANCH-TO-DELETE
<del>
<del># Alternatives
<del>git branch -d --force BRANCH-TO-DELETE
<del>git branch --delete --force BRANCH-TO-DELETE
<del>```
<del>
<del>### Compare Branches <a name="compare-branches"></a>
<del>You can compare branches with the `git diff` command:
<del>```shell
<del>git diff FIRST-BRANCH..SECOND-BRANCH
<del>```
<del>
<del>You'll see colored output for the changes between branches. For all lines that have changed, the `SECOND-BRANCH` version will be a green line starting with a "+", and the `FIRST-BRANCH` version will be a red line starting with a "-". If you don't want Git to display two lines for each change, you can use the `--color-words` option. Instead, Git will show one line with deleted text in red, and added text in green.
<del>
<del>If you want to see a list of all the branches that are completely merged into your current branch (in other words, your current branch includes all the changes of the other branches that are listed), run the command `git branch --merged`.
<del>
<del>### Help with Git Branch <a name="help-with-git-branch"></a>
<del>If you forget how to use an option, or want to explore other functionality around the `git branch` command, you can run any of these commands:
<del>```shell
<del>git help branch
<del>git branch --help
<del>man git-branch
<del>```
<del>
<del>### More Information: <a name="more-information"></a>
<del>- The `git merge` command: <a href='https://guide.freecodecamp.org/git/git-merge/' target='_blank' rel='nofollow'>fCC Guide</a>
<del>- The `git checkout` command: <a href='https://guide.freecodecamp.org/git/git-checkout/' target='_blank' rel='nofollow'>fCC Guide</a>
<del>- The `git commit` command: <a href='https://guide.freecodecamp.org/git/git-commit/' target='_blank' rel='nofollow'>fCC Guide</a>
<del>- The `git stash` command: <a href='https://guide.freecodecamp.org/git/git-stash/' target='_blank' rel='nofollow'>fCC Guide</a>
<del>- Git documentation: <a href='https://git-scm.com/docs/git-branch' target='_blank' rel='nofollow'>branch</a>
<ide><path>mock-guide/english/git/git-checkout/index.md
<del>---
<del>title: Git Checkout
<del>---
<del>## Git Checkout
<del>
<del>The `git checkout` command switches between branches or restores working tree files. There are a number of different options for this command that won't be covered here, but you can take a look at all of them in the <a href='https://git-scm.com/docs/git-checkout' target='_blank' rel='nofollow'>Git documentation</a>.
<del>
<del>### Checkout a specific commit
<del>
<del>to checkout a specific commit, run the command :
<del>```shell
<del>git checkout specific-commit-id
<del>```
<del>we can get the specific commit id's by running:
<del>```shell
<del>git log
<del>```
<del>### Checkout an Existing Branch
<del>To checkout an existing branch, run the command:
<del>```shell
<del>git checkout BRANCH-NAME
<del>```
<del>Generally, Git won't let you checkout another branch unless your working directory is clean, because you would lose any working directory changes that aren't committed. You have three options to handle your changes: 1) trash them, 2) <a href='https://guide.freecodecamp.org/git/git-commit/' target='_blank' rel='nofollow'>commit them</a>, or 3) <a href='https://guide.freecodecamp.org/git/git-stash/' target='_blank' rel='nofollow'>stash them</a>.
<del>
<del>### Checkout a New Branch
<del>To create and checkout a new branch with a single command, you can use:
<del>```shell
<del>git checkout -b NEW-BRANCH-NAME
<del>```
<del>This will automatically switch you to the new branch.
<del>
<del>### Checkout a New Branch or Reset a Branch to a Start Point
<del>The following command is similar to checking out a new branch, but uses the `-B` (note the captital B) flag and an optional `START-POINT` parameter:
<del>```shell
<del>git checkout -B BRANCH-NAME START-POINT
<del>```
<del>If the `BRANCH-NAME` branch doesn't exist, Git will create it and start it at `START-POINT`. If the `BRANCH-NAME` branch already exists, then Git resets the branch to `START-POINT`. This is equivalent to running `git branch` with `-f`.
<del>
<del>### Force a Checkout
<del>You can pass the `-f` or `--force` option with the `git checkout` command to force Git to switch branches, even if you have un-staged changes (in other words, the index of the working tree differs from `HEAD`). Basically, it can be used to throw away local changes.
<del>
<del>When you run the following command, Git will ignore unmerged entries:
<del>
<del>```shell
<del>git checkout -f BRANCH-NAME
<del>
<del># Alternative
<del>git checkout --force BRANCH-NAME
<del>```
<del>
<del>### Undo Changes in your Working Directory
<del>You can use the `git checkout` command to undo changes you've made to a file in your working directory. This will revert the file back to the version in `HEAD`:
<del>```shell
<del>git checkout -- FILE-NAME
<del>```
<ide><path>mock-guide/english/git/git-cherry-pick/index.md
<del>---
<del>title: Git Cherry Pick
<del>---
<del>## Git Cherry Pick
<del>
<del>The `git cherry-pick` command applies the changes introduced by some existing commits. This guide will be focusing on explaining this feature as much as possible but of course the real <a href='https://git-scm.com/docs/git-cherry-pick' target='_blank' rel='nofollow'>Git documentation</a> will always come in handy.
<del>
<del>### Checkout an Existing Branch Cherry Pick from master
<del>To apply the change introduced by the commit at the tip of the master branch and create a new commit with this change. Run the following command
<del>```shell
<del>git cherry-pick master
<del>```
<del>
<del>### Check in a change from a different commit
<del>To apply the change introduced by the commit at the particular hash value you want, run the following command
<del>```shell
<del>git cherry-pick {HASHVALUE}
<del>```
<del>This will add the changes included referenced in that commit, to your current repository
<del>
<del>### Apply certain commits from one branch to another
<del>`cherry-pick` allows you to pick and choose between commits from one branch one to another. Let's say you have two branches `master` and `develop-1`. In the branch `develop-1` you have 3 commits with commit ids `commit-1`,`commit-2` and `commit-3`. Here you can only apply `commit-2` to branch `master` by:
<del>```shell
<del>git checkout master
<del>git cherry-pick commit-2
<del>```
<del>If you encounter any conflicts at this point, you have to fix them and add them using `git add` and then you can use the continue flag to apply the cherry-pick.
<del>```shell
<del>git cherry-pick --continue
<del>```
<del>If you wish to abort a cherry-pick in between you can use the abort flag:
<del>```shell
<del>git cherry-pick --abort
<del>```
<del>
<ide><path>mock-guide/english/git/git-clone/index.md
<del>---
<del>title: Git Clone
<del>---
<del>## Git Clone
<del>
<del>The `git clone` command allows you to copy a remote repository onto your local machine.
<del>
<del>First, find the remote repository for the project you're working on or interested in - this can also be your fork of a project. Next, copy the URL for it. For example, if you've forked the freeCodeCamp guides repository, the URL looks like `https://github.com/YOUR-GITHUB-USERNAME/guides.git`.
<del>
<del>In the command line on your local machine, navigate to where you want to save the project in your working directory. Finally, run the `git clone` command:
<del>
<del>```shell
<del>git clone URL-OF-REPOSITORY
<del>```
<del>
<del>The default name of the new directory on your computer is the name of the repository, but you can change this by including the last (optional) parameter:
<del>
<del>```shell
<del>git clone URL-OF-REPOSITORY NAME-OF-DIRECTORY-ON-COMPUTER
<del>```
<del>
<del>Git gives the remote the alias "origin". This is a useful way to refer to the remote when you want to push your changes to the remote server or pull changes from it. See <a href='https://guide.freecodecamp.org/git/git-push/' target='_blank' rel='nofollow'>Git push</a> and <a href='https://guide.freecodecamp.org/git/git-pull/' target='_blank' rel='nofollow'>Git pull</a> for more details.
<del>
<del>Git only pulls the remote's main branch onto your computer. This branch is usually named "master" by convention but may be defined differently depending on the project.
<del>
<del>Also, Git automatically sets up your local main branch to track the remote branch. When you run `git status`, you'll see information about whether your local branch is up-to-date with the remote. Here's an example output:
<del>
<del>```shell
<del>myCommandPrompt (master) >> git status
<del>On branch master
<del>Your branch is up-to-date with 'origin/master'.
<del>nothing to commit, working tree clean
<del>myCommandPrompt (master) >>
<del>```
<del>
<del>If your local `master` branch has three commits that you haven't pushed up to the remote server yet, the status would say "Your branch is ahead of 'origin/master' by 3 commits."
<del>
<del>### Git Clone Mirror
<del>
<del>If you want to host mirror of a repository you can use mirror parameter.
<del>
<del>```shell
<del>git clone URL-OF-REPOSITORY --mirror
<del>```
<del>
<del>After mirroring a repository, you can clone your local mirror from your server.
<del>
<del>```shell
<del>git clone NAME-OF-DIRECTORY-ON-COMPUTER
<del>```
<del>
<del>### To clone a spacific branch
<del>
<del>If you want to clone a spacific branch, you can do that by the following command.
<del>
<del>```shell
<del>git clone URL-OF-REPOSITORY -R branch_name
<del>```
<del>
<del>### More Information:
<del>- Git documentation: [clone](https://git-scm.com/docs/git-clone)
<ide><path>mock-guide/english/git/git-commit/index.md
<del>---
<del>title: Git Commit
<del>---
<del>
<del>## Git Commit
<del>The `git commit` command will save all staged changes, along with a brief description from the user, in a "commit" to the local repository.
<del>
<del>Commits are at the heart of Git usage. You can think of a commit as a snapshot of your project, where a new version of that project is created in the current repository. Two important features of commits are:
<del>
<del>- you can recall the commited changes at a later date, or revert the project to that version ([see Git checkout](https://guide.freecodecamp.org/git/git-checkout))
<del>- if multiple commits edit different parts of the project, they will not overwrite each other even if the authors of the commit were unaware of each other. This is one of the benefits of using Git over a tool like Dropbox or Google Drive.
<del>
<del>### Options
<del>There are a number of options that you can include with `git commit`. However, this guide will only cover the two most common options. For an extensive list of options, please consult the [Git documentation](https://git-scm.com/docs/git-commit).
<del>
<del>#### The -m Option
<del>The most common option used with `git commit` is the `-m` option. The `-m` stands for message. When calling `git commit`, it is required to include a message. The message should be a short description of the changes being committed. The message should be at the end of the command and it must be wrapped in quotations `" "`.
<del>
<del>An example of how to use the `-m` option:
<del>```shell
<del>git commit -m "My message"
<del>```
<del>The output in your terminal should look something like this:
<del>```shell
<del>[master 13vc6b2] My message
<del> 1 file changed, 1 insertion(+)
<del>```
<del>
<del>**NOTE:** If the `-m` is not included with the `git commit` command, you will be prompted to add a message in your default text editor - see 'Using detailed commit messages' below.
<del>
<del>#### The -a Option
<del>Another popular option is the `-a` option. The `-a` stands for all. This option automatically stages all modified files to be committed. If new files are added the `-a` option will not stage those new files. Only files that the Git repository is aware of will be committed.
<del>
<del>For example:
<del>
<del>Let’s say that you have a `README.md` file that has already been committed to your repository. If you make changes to this file, you can use the `-a` option in your commit command to stage and add the changes to your repository. However, what if you also added a new file called `index.html`? The `-a` option will not stage the `index.html` as it does not currently exist in the repository. When new files have been added, the `git add` command should be invoked in order to stage the files before they can be committed to the repository.
<del>
<del>An example of how to use the `-a` option:
<del>```shell
<del>git commit -am “My new changes”
<del>```
<del>The output in your terminal should look something like this:
<del>```shell
<del>[master 22gc8v1] My new message
<del> 1 file changed, 1 insertion(+)
<del>```
<del>
<del>### Using detailed commit messages
<del>Although `git commit -m "commit message"` works just fine, it can be useful to provide more detailed and systmatic information.
<del>
<del>If you commit without using the `-m` option, git will open your default text editor with a new file, which will include a commented-out list of all the files/changes that are staged in the commit. You then write your detailed commit message (the first line will be treated as the subject line) and the commit will be performed when you save/close the file.
<del>
<del>Bear in mind:
<del>* Keep your commit message lines length less than 72 charcters as standard practice
<del>* It is perfectly ok - and even recommended - to write multiline commit messages
<del>* You can also refer to other issues or pull requests in your commit message. GitHub allocated a number reference to all pull requests and issues, so for example if you want to refer to pull request #788 simply do so in either the subject-line or in the body text as appropriate
<del>
<del>#### The --amend Option
<del>The `--amend` option allows you to change your last commit. Let's say you just committed and you made a mistake in your commit log message. You can conveniently modify the most recent commit using the command:
<del>```shell
<del>git commit --amend -m "an updated commit message"
<del>```
<del>If you forget to include a file in the commit:
<del>```shell
<del>git add FORGOTTEN-FILE-NAME
<del>git commit --amend -m "an updated commit message"
<del>
<del># If you don't need to change the commit message, use the --no-edit option
<del>git add FORGOTTEN-FILE-NAME
<del>git commit --amend --no-edit
<del>```
<del>Premature commits happen all the time in the course of your day-to-day development. It’s easy to forget to stage a file or how to correctly format your commit message. The `--amend` flag is a convenient way to fix these minor mistakes. This command will replace the old commit message with the updated one specified in the command.
<del>
<del>Amended commits are actually entirely new commits and the previous commit will no longer be on your current branch. When you're working with others, you should try to avoid amending commits if the last commit is already pushed into the repository.
<del>
<del>With `--amend`, one of the useful flag you could use is `--author` which enables you to change the author of the last commit you've made. Imagine a situation you haven't properly set up your name or email in git configurations but you already made a commit. With `--author` flag you can simply change them without resetting the last commit.
<del>
<del>```
<del>git commit --amend --author="John Doe <johndoe@email.com>"
<del>```
<del>
<del>#### The -v or --verbose Option
<del>The `-v` or `--verbose` option is used without the `-m` option. The `-v` option can be useful when you wish to edit a Git commit message in your default editor while being able to see the changes you made for the commit. The command opens your default text editor with a commit message template *as well as* a copy of the changes you made for this commit. The changes, or diff, will not be included in the commit message, but they provide a nice way to reference your changes when you're describing them in your commit message.
<del>
<del>### More Information:
<del>- Git documentation: [commit](https://git-scm.com/docs/git-commit)
<ide><path>mock-guide/english/git/git-fetch/index.md
<del>---
<del>title: Git Fetch
<del>---
<del>
<del>## Git Fetch
<del>The `git fetch` git-fetch - Download objects and refs from another repository
<ide><path>mock-guide/english/git/git-hooks/index.md
<del>---
<del>title: Git Hooks
<del>---
<del>
<del>## Git Hooks
<del>Git Hooks are scripts located in the `.git/hooks/` directory of a git repository. These scripts run after being triggered by different stages in the version control process.
<del>
<del>### Samples
<del>In this directory are a handful of sample scripts, such as `pre-commit.sample`. This particular sample runs every time a user runs `git commit`. If the hook script exits with a status other than 0, then the commit stops.
<del>
<del>### Documentation
<del> - [Documentation for Git Hooks](https://git-scm.com/docs/githooks)
<del> - [Atlassian Tutorial on Git Hooks](https://www.atlassian.com/git/tutorials/git-hooks)
<del> - [Git Hooks Guide](http://githooks.com/)
<ide><path>mock-guide/english/git/git-hosting/index.md
<del>---
<del>title: Git hosting
<del>---
<del>## Git hosting
<del>
<del><!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
<del>
<del>PHP supports ten primitive types.
<del>
<del>Four scalar types:
<del>* boolean
<del>* integer
<del>* float (floating-point number, aka double)
<del>* string
<del>
<del>Four compound types:
<del>* array
<del>* object
<del>* callable
<del>* iterable
<del>
<del>And finally two special types:
<del>* resource
<del>* NULL
<del>
<del>
<del>#### More Information:
<del><!-- Please add any articles you think might be helpful to read before writing the article -->
<del>
<del>[PHP Manual](http://php.net/manual/en/language.types.intro.php)
<ide><path>mock-guide/english/git/git-how-to-undo-things/index.md
<del>---
<del>title: How to Undo Things in Git
<del>---
<del>## How to Undo Things in Git
<del>
<del>As a version control software, Git gives you the ability to undo your changes at all levels. This includes the un-staged edits you made in your working directory all the way through undoing multiple commits.
<del>
<del>Here's a quick summary outlining how to undo or revert changes in your Git project. There are Guide articles with more details for each of the following commands.
<del>
<del>### Undoing changes in your working directory
<del>
<del>If you want to undo changes you made to a file or directory in your working directory (that you haven't staged or committed yet), you use the `git checkout` command. Git replaces the file or directory you've specified with the version of them from in `HEAD`. The `--` in the command tells Git to stay in the current branch and use that branch's `HEAD`.
<del>
<del>```shell
<del>git checkout -- FILE-NAME
<del>```
<del>
<del>Typically, Git won't allow you to checkout another branch when you have un-staged changes. However, you can do a forced checkout to switch to a different branch, and this will discard all the changes you've made to files in your working directory.
<del>
<del>```shell
<del>git checkout (-f | --force) OTHER-BRANCH-NAME
<del>```
<del>
<del>See the [Git Checkout article](../git-checkout/index.md) for more details.
<del>
<del>### Un-staging files
<del>
<del>Say you ran `git add .` to move several files you edited in your working directory to the staging area. It's possible to remove one or all of them from the staging area while keeping your changes in your working directory. You can un-stage certain files with the `git reset` command. This may happen when you edit several files, add everything to your staging area, but decide you want to make multiple, more focused, commits.
<del>
<del>```shell
<del>git reset HEAD FILE-NAME
<del>```
<del>
<del>See the [Git Reset article](../git-reset/index.md) for more details.
<del>
<del>### Amending the last commit
<del>
<del>If you've committed your changes, but need to make more edits, Git allows you to amend your last commit. Simply make your changes, stage them with the `git add` command, then use the `git commit` command with the `--amend` option.
<del>
<del>```shell
<del># Use the original commit message
<del>git add EDITED-FILE
<del>git commit --amend --no-edit
<del>
<del># Change the commit message
<del>git add EDITED-FILE
<del>git commit --amend -m "new message"
<del>```
<del>
<del>When you're working with others, you should try to avoid amending commits if the last commit is already pushed into the project repository.
<del>
<del>See the [Git Commit article](../git-commit/index.md) for more details.
<del>
<del>### Changing a file back to a version in an older commit
<del>
<del>In a similar workflow to how you removed changes in your working directory, the `git checkout` command also lets you revert to a version of that file in an older commit. First, you need to find the SHA-1 hash for the older commit with the version of the file you want, and copy about the first 8-10 characters of it.
<del>
<del>```shell
<del>git checkout PART-OF-SHA-OF-OLDER-COMMIT -- FILE-NAME
<del>```
<del>
<del>This puts the file (in the state it was in from the older commit) into your working directory and staging area.
<del>
<del>### Reverting a commit
<del>
<del>You can undo changes from a recent commit with the `git revert` command. This will rollback the changes you committed but keep a record of the action in the commit history. It's not just for the recent commit, you can revert to older versions.
<del>
<del>```shell
<del>git revert PART-OF-SHA-OF-OLDER-COMMIT
<del>```
<del>
<del>See the [Git Revert article](../git-revert/index.md) for a detailed example and more information.
<del>
<del>
<del>### Undoing multiple commits
<del>
<del>You can use the `git reset` command to change where your current `HEAD` pointer points. This works for specific files or for the entire branch. The command is different than `git revert` because it will overwrite everything that came after that point.
<del>
<del>The following command resets your current branch's `HEAD` to the given `COMMIT` and updates the index. It basically rewinds the state of your branch, then all commits you make going forward write over anything that came after the reset point. If you omit the `MODE`, it defaults to `--mixed`:
<del>
<del>```shell
<del>git reset MODE COMMIT
<del>```
<del>
<del>There are five options for the `MODE`, but the three you'll likely want to use are `--soft` (resets `HEAD` but doesn't reset the staging area or working directory), `--mixed` (resets the staging area but not the working directory), and `--hard` (resets the staging area and working directory).
<del>
<del>See the [Git Reset article](../git-reset/index.md) for all the options and more information.
<del>
<del>### More Information:
<del>- [Git checkout documentation](https://git-scm.com/docs/git-checkout)
<del>- [Git commit documentation](https://git-scm.com/docs/git-commit)
<del>- [Git revert documentation](https://git-scm.com/docs/git-revert)
<del>- [Git reset documentation](https://git-scm.com/docs/git-reset)
<ide><path>mock-guide/english/git/git-log/index.md
<del>---
<del>title: Git Log
<del>---
<del>## Git Log
<del>
<del>The ```git log``` command displays all of the commits in a respository's history.
<del>
<del>By default, the command displays each commit's:
<del>
<del>* Secure Hash Algorithm (SHA)
<del>* author
<del>* date
<del>* commit message
<del>
<del>### Navigating Git Log
<del>
<del>Git uses the Less terminal pager to page through the commit history. You can navigate it with the following commands:
<del>
<del>* to scroll down by one line, use j or ↓
<del>* to scroll up by one line, use k or ↑
<del>* to scroll down by one page, use the spacebar or the Page Down button
<del>* to scroll up by one page, use b or the Page Up button
<del>* to quit the log, use q
<del>
<del>### Git Log Flags
<del>
<del>You can customize the information presented by ```git log``` using flags.
<del>
<del>#### --oneline
<del>
<del>```git log --oneline```
<del>
<del>The ```--oneline``` flag causes ```git log ``` to display
<del>
<del>* one commit per line
<del>* the first seven characters of the SHA
<del>* the commit message
<del>
<del>#### --stat
<del>
<del>```git log --stat```
<del>
<del>The ```--stat``` flag causes ```git log ``` to display
<del>
<del>* the files that were modified in each commit
<del>* the number of lines added or removed
<del>* a summary line with the total number of files and lines changed
<del>
<del>#### --patch or -p
<del>
<del>```git log --patch```
<del>
<del>or, the shorter version
<del>
<del>```git log -p```
<del>
<del>The ```--patch``` flag causes ```git log ``` to display
<del>
<del>* the files that you modified
<del>* the location of the lines that you added or removed
<del>* the specific changes that you made
<del>
<del>### View specified number of commits by author
<del>
<del>To view a specified number of commits by an author to the current repo (optionally in a prettified format), the following command can be used
<del>
<del>```git log --pretty=format:"%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset" -n {NUMBER_OF_COMMITS} --author="{AUTHOR_NAME}" --all```
<del>
<del>#### Start at a specific commit
<del>
<del>To start ```git log``` at a specific commit, add the SHA:
<del>
<del>```git log 7752b22```
<del>
<del>This will display the commit with the SHA 7752b22 and all of the commits made before that commit. You can combine this with any of the other flags.
<del>
<del>#### --graph
<del>
<del>```git log --graph```
<del>
<del>The ```--graph``` flag enables you to view your ```git log ``` as a graph. To make things things interesting, you can combine this command with ```--oneline``` option you learned from above.
<del>
<del>```git log --graph --oneline```
<del>
<del>The output would be similar to,
<del>
<del> * 64e6db0 Update index.md
<del> * b592012 Update Python articles (#5030)
<del> * ecbf9d3 Add latest version and remove duplicate link (#8860)
<del> * 7e3934b Add hint for Compose React Components (#8705)
<del> * 99b7758 Added more frameworks (#8842)
<del> * c4e6a84 Add hint for "Create a Component with Composition" (#8704)
<del> * 907b004 Merge branch 'master' of github.com:freeCodeCamp/guide
<del> |\
<del> | * 275b6d1 Update index.md
<del> * | cb74308 Merge branch 'dogb3rt-patch-3'
<del> |\ \
<del> | |/
<del> |/|
<del> | * 98015b6 fix merge conflicts after folder renaming
<del> | |\
<del> |/ /
<del> | * fa83460 Update index.md
<del> * | 6afb3b5 rename illegally formatted folder name (#8762)
<del> * | 64b1fe4 CSS3: border-radius property (#8803)
<del>
<del>One of the benefit of using this command is that it enables you to get a overview of how commits have merged and how the git history was created.
<del>
<del>There are may other options you could use in combination with ```--graph```. Couple of them are ```--decorate``` and ```--all```. Make sure to try these out too. And refer to [documantation](https://git-scm.com/docs/git-log) for more helpful info.
<del>
<del>#### More Information:
<del>
<del>- [Git Basics - Viewing the Commit History](https://git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History)
<del>- [Git Log](https://git-scm.com/docs/git-log)
<del>
<del>##### Other Resources on Git in guide.freecodecamp.org
<del>
<del>- [Git Merge](../git-merge/index.md)
<del>- [Git Checkout](../git-checkout/index.md)
<del>- [Git Commit](../git-commit/index.md)
<del>- [Git Stash](../git-stash/index.md)
<del>- [Git Branch](../git-branch/index.md)
<del>
<ide><path>mock-guide/english/git/git-merge/index.md
<del>---
<del>title: Git Merge
<del>---
<del>## Git Merge
<del>The `git merge` command will merge any changes that were made to the code base on a seperate branch to your current branch.
<del>
<del>The command syntax is as follows:
<del>```shell
<del>git merge BRANCH-NAME
<del>```
<del>For example, if you are currently working in a branch named `dev` and would like to merge any new changes that were made in a branch named `new-features`, you would issue the following command:
<del>
<del>```shell
<del>git merge new-features
<del>```
<del>
<del>**Please Note:** If there are any uncommitted changes on your current branch, Git will not allow you to merge until all changes in your current branch have been committed. To handle those changes, you can either:
<del>
<del>* Create a new branch and commit the changes
<del>```shell
<del>git checkout -b new-branch-name
<del>git add .
<del>git commit -m "<your commit message>"
<del>```
<del>
<del>* Stash them
<del>```shell
<del>git stash # add them to the stash
<del>git merge new-features # do your merge
<del>git stash pop # get the changes back into your working tree
<del>```
<del>
<del>* Abandon it all
<del>```shell
<del>git reset --hard # removes all pending changes
<del>```
<del>
<del>## Merge Conflict
<del>
<del>A merge conflict is when you make commits on separate branches that alter the same line in conflicting ways. Therefore Git will not know which version of the file to keep
<del>
<del>resulting in the error message:
<del>
<del>CONFLICT (content): Merge conflict in resumé.txt
<del>Automatic merge failed; fix conflicts and then commit the result.
<del>
<del>In the code editor Git uses markings to indicate the HEAD (master) version of the file and the other version of the file.
<del>
<del>`<<<<<<< HEAD`
<del>
<del>`>>>>>>> OTHER`
<del>
<del>From the code editor delete/update to resolve conflict and remove the special markings including the HEAD and OTHER file names, reload your file, then re add and recommit your changes.
<del>
<del>For more information about the `git merge` command and all available options, please refer to the <a href="https://git-scm.com/docs/git-merge" target="_blank" rel="nofollow">Git documentation</a>.
<ide><path>mock-guide/english/git/git-pull/index.md
<del>---
<del>title: Git Pull
<del>---
<del>## Git Pull
<del>
<del>`git pull` is a Git command used to update the local version of a repository from a remote.
<del>
<del>It is one of the four commands that prompts network interaction by Git. By default, `git pull` does two things.
<del>
<del>1. Updates the current local working branch (currently checked out branch)
<del>1. Updates the remote tracking branches for all other branches.
<del>
<del>`git pull` fetches (`git fetch`) the new commits and merges <a href='https://guide.freecodecamp.org/git/git-merge' target='_blank' rel='nofollow'>(`git merge`)</a> these into your local branch.
<del>
<del>This command's syntax is as follows:
<del>
<del>```shell
<del># General format
<del>git pull OPTIONS REPOSITORY REFSPEC
<del>
<del># Pull from specific branch
<del>git pull REMOTE-NAME BRANCH-NAME
<del>```
<del>
<del>in which:
<del>
<del>- **OPTIONS** are the command options, such as `--quiet` or `--verbose`. You can read more about the different options in the <a href='https://git-scm.com/docs/git-pull' target='_blank' rel='nofollow'>Git documentation</a>
<del>- **REPOSITORY** is the URL to your repo. Example: https://github.com/freeCodeCamp/freeCodeCamp.git
<del>- **REFSPEC** specifies which refs to fetch and which local refs to update
<del>- **REMOTE-NAME** is the name of your remote repository. For example: *origin*.
<del>- **BRANCH-NAME** is the name of your branch. For example: *develop*.
<del>
<del>**Note**
<del>
<del>If you have uncommitted changes, the merge part of the `git pull` command will fail and your local branch will be untouched.
<del>
<del>Thus, you should *always commit your changes in a branch before pulling* new commits from a remote repository.
<del>
<del>**Table of Contents**
<del>
<del>- [Using `git pull`](#using-git-pull)
<del>- [Distributed Version Control](#distributed-version-control)
<del>- [`git fetch` + `git merge`](#git-fetch-plus-git-merge)
<del>- [`git pull` in IDEs](#git-pull-in-IDEs)
<del>
<del>### Using git pull
<del>
<del>Use `git pull` to update a local repository from the corresponding remote repository. Ex: While working locally on `master`, execute `git pull` to update the local copy of `master` and update the other remote tracking branches. (More information on remote tracking branches in the next section.)
<del>
<del>But, there are a few things to keep in mind for that example to be true:
<del>- The local repository has a linked remote repository
<del> - Check this by executing `git remote -v`
<del> - If there are multiple remotes, `git pull` might not be enough information. You might need to enter `git pull origin` or `git pull upstream`.
<del>- The branch you are currently checked out to has a corresponding remote tracking branch
<del> - Check this by executing `git status`. If there is no remote tracking branch, Git doesn't know where to pull information _from_.
<del>
<del>### Distributed Version Control
<del>Git is a **Distributed Version Control System** (DVCS). With DVCS, developers can be working on the same file at the same time in separate environments. After _pushing_ code up to the shared remote repository, other developers can _pull_ changed code.
<del>
<del>#### Network interactions in Git
<del>There are only four commands that prompt network interactions in Git. A local repository has no awareness of changes made on the remote repository until there is a request for information. And, a remote repository has no awareness of local changes until commits are pushed.
<del>
<del>The four network commands are:
<del>- `git clone`
<del>- `git fetch`
<del>- `git pull`
<del>- `git push`
<del>
<del>#### Branches in DVCS
<del>
<del>When working with Git, it can feel like there are lots of copies of the same code floating all over the place. There are different versions of the same file on each branch. And, different copies of the same branches on every developer's computer and on the remote. To keep track of this, Git uses something called **remote tracking branches**.
<del>
<del>If you execute `git branch --all` within a Git repository, remote tracking branches appear in red. These are read-only copies of the code as it appears on the remote. ( When was the last network interaction that would have brought information locally? Remember when this information was last updated. The information in the remote tracking branches reflects the information from that interaction.)
<del>
<del>With **remote tracking branches**, you can work in Git on several branches without network interaction. Every time you execute `git pull` or `git fetch` commands, you update **remote tracking branches**.
<del>
<del>### git fetch plus git merge
<del>
<del>`git pull` is a combination command, equal to `git fetch` + `git merge`.
<del>
<del>#### git fetch
<del>On its own, `git fetch` updates all the remote tracking branches in local repository. No changes are actually reflected on any of the local working branches.
<del>
<del>#### git merge
<del>Without any arguments, `git merge` will merge the corresponding remote tracking branch to the local working branch.
<del>
<del>#### git pull
<del>`git fetch` updates remote tracking branches. `git merge` updates the current branch with the corresponding remote tracking branch. Using `git pull`, you get both parts of these updates. But, this means that if you are checked out to `feature` branch and you execute `git pull`, when you checkout to `master`, any new updates will not be included. Whenever you checkout to another branch that may have new changes, it's always a good idea to execute `git pull`.
<del>
<del>### git pull in IDEs
<del>Common language in other IDES may not include the word `pull`. If you look out for the words `git pull` but don't see them, look for the word `sync` instead.
<del>
<del>### fethcing a remote PR (Pull Request) in to local repo
<del>For purposes of reviewing and such, PRs in remote should be fetched to the local repo. You can use `git fetch` command as follows to achieve this.
<del>
<del>`git fetch origin pull/ID/head:BRANCHNAME`
<del>
<del>ID is the pull request id and BRANCHNAME is the name of the branch that you want to create. Once the branch has been created you can use `git checkout` to switch to that brach.
<del>
<del>
<del>### Other Resources on git pull
<del>- <a href='https://git-scm.com/docs/git-pull' target='_blank' rel='nofollow'>git-scm</a>
<del>- <a href='https://help.github.com/articles/fetching-a-remote/#pull' target='_blank' rel='nofollow'>GitHub Help Docs</a>
<del>- <a href='https://services.github.com/on-demand/intro-to-github/create-pull-request' target='_blank' rel='nofollow'>GitHub On Demand Training</a>
<del>- <a href='https://www.atlassian.com/git/tutorials/syncing' target='_blank' rel='nofollow'>Syncing Tutorials</a>
<del>
<del>### Other Resources on `git` in the freeCodeCamp Guide
<del>- [Git merge](../git-merge/index.md)
<del>- [Git checkout](../git-checkout/index.md)
<del>- [Git commit](../git-commit/index.md)
<del>- [Git stash](../git-stash/index.md)
<del>- [Git branch](../git-branch/index.md)
<ide><path>mock-guide/english/git/git-push/index.md
<del>---
<del>title: Git Push
<del>---
<del>## Git Push
<del>
<del>The `git push` command allows you to send (or *push*) the commits from your local branch in your local Git repository to the remote repository.
<del>
<del>To be able to push to your remote repository, you must ensure that **all your changes to the local repository are committed**.
<del>
<del>This command's syntax is as follows:
<del>```bash
<del>git push <repo name> <branch name>
<del>```
<del>There are a number of different options you can pass with the command, you can learn more about them in the <a href='https://git-scm.com/docs/git-push#_options_a_id_options_a' target='_blank' rel='nofollow'>Git documentation</a> or run `git push --help`.
<del>
<del>### Push to a Specific Remote Repository and Branch
<del>In order to push code, you must first clone a repository to your local machine.
<del>```bash
<del># Once a repo is cloned, you'll be working inside of the default branch (the default is `master`)
<del>git clone https://github.com/<git-user>/<repo-name> && cd <repo-name>
<del># make changes and stage your files (repeat the `git add` command for each file, or use `git add .` to stage all)
<del>git add <filename>
<del># now commit your code
<del>git commit -m "added some changes to my repo!"
<del># push changes in `master` branch to github
<del>git push origin master
<del>```
<del>
<del>To learn more about branches check out the links below:
<del>* [git checkout](https://github.com/renington/guides/blob/master/src/pages/git/git-checkout/index.md)
<del>* [git branch](https://github.com/renington/guides/blob/master/src/pages/git/git-branch/index.md)
<del>
<del>
<del>### Push to a Specific Remote Repository and All Branches in it
<del>If you want to push all your changes to the remote repository and all branches in it, you can use:
<del>```bash
<del>git push --all <REMOTE-NAME>
<del>```
<del>in which:
<del>- `--all` is the flag that signals that you want to push all branches to the remote repository
<del>- `REMOTE-NAME` is the name of the remote repository you want to push to
<del>
<del>### Push to a specific branch with force parameter
<del>If you want to ignore the local changes made to Git repository at GitHub(Which most of developers do for a hot fix to development server) then you can use --force command to push by ignoring those changs.
<del>
<del>```bash
<del>git push --force <REMOTE-NAME> <BRANCH-NAME>
<del>```
<del>in which:
<del>- `REMOTE-NAME` is the name of the remote repository to which you want to push the changes to
<del>- `BRANCH-NAME` is the name of the remote branch you want to push your changes to
<del>
<del>### Push ignoring Git's pre-push hook
<del>By default `git push` will trigger the `--verify` toggle. This means that git will execute any client-side pre-push script that may have been configured. If the pre-push scripts fails, so will the git push. (Pre-Push hooks are good for doing things like, checking if commit messages confirm to company standards, run unit tests etc...). Occasionally you may wish to ignore this default behavior e.g. in the scenario where you wish to push your changes to a feature branch for another contributor to pull, but your work-in-progress changes are breaking unit tests. To ignore the hook, simply input your push command and add the flag `--no-verify`
<del>
<del>```bash
<del>git push --no-verify
<del>```
<del>
<del>
<del>### More Information:
<del>- [Git documentation - push](https://git-scm.com/docs/git-push)
<del>- [Git hooks](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks)
<ide><path>mock-guide/english/git/git-rebase/index.md
<del>---
<del>title: Git Rebase
<del>---
<del>## Git Rebase
<del>
<del>Rebasing a branch in Git is a way to move the entirety of a branch to another point in the tree. The simplest example is moving a branch further up in the tree. Say we have a branch that diverged from the master branch at point A:
<del>
<del> /o-----o---o--o-----o--------- branch
<del> --o-o--A--o---o---o---o----o--o-o-o--- master
<del>
<del>When you rebase you can move it like this:
<del>
<del> /o-----o---o--o-----o------ branch
<del> --o-o--A--o---o---o---o----o--o-o-o master
<del>
<del>To rebase, make sure you have all the commits you want in the rebase in your master branch. Check out the branch you want to rebase and type `git rebase master` (where master is the branch you want to rebase on).
<del>
<del>It is also possible to rebase on a different branch, so that for example a branch that was based on another branch (let's call it feature) is rebased on master:
<del>
<del> /---o-o branch
<del> /---o-o-o-o---o--o------ feature
<del> ----o--o-o-A----o---o--o-o-o--o--o- master
<del>
<del>After `git rebase master branch` or `git rebase master` when you have checked out the branch, you'll get:
<del>
<del>
<del> /---o-o-o-o---o--o------ feature
<del> ----o--o-o-A----o---o--o-o-o--o--o- master
<del> \---o-o branch
<del>
<del>### Git rebase interactive in the console
<del>
<del>To use `git rebase` in the console with a list of commits you can choose, edit or drop in the rebase:
<del>
<del>- Enter `git rebase -i HEAD~5` with the last number being any number of commits from the most recent backwards you want to review.
<del>- In vim, press `esc`, then `i` to start editing the test.
<del>- On the left hand side you can overwrite the `pick` with one of the commands below. If you want to squash a commit into a previous one and discard the commit message, enter `f` in the place of the `pick` of the commit.
<del>
<del>```
<del>pick 452b159 <message for this commit>
<del>pick 7fd4192 <message for this commit>
<del>pick c1af3e5 <message for this commit>
<del>pick 5f5e8d3 <message for this commit>
<del>pick 5186a9f <message for this commit>
<del>
<del># Rebase 0617e63..5186a9f onto 0617e63 (30 commands)
<del>#
<del># Commands:
<del># p, pick = use commit
<del># r, reword = use commit, but edit the commit message
<del># e, edit = use commit, but stop for amending
<del># s, squash = use commit, but meld into previous commit
<del># f, fixup = like "squash", but discard this commit's log message
<del># x, exec = run command (the rest of the line) using shell
<del># d, drop = remove commit
<del>#
<del># These lines can be re-ordered; they are executed from top to bottom.
<del>#
<del># If you remove a line here THAT COMMIT WILL BE LOST.
<del>#
<del># However, if you remove everything, the rebase will be aborted.
<del>#
<del># Note that empty commits are commented out
<del>```
<del>
<del>- Enter `esc` followed by `:wq` to save and quit.
<del>- If it rebases successfully then you need to force push your changes with `git push -f` to add the rebased version to your github repo.
<del>- If there is a merge conflict, there are a number of ways to fix this, including following the suggestions in [this guide](https://help.github.com/enterprise/2.11/user/articles/resolving-a-merge-conflict-using-the-command-line/). One way is to open the files in a text editor and delete the parts of the code you do not want. Then use `git add <file name>` followed by `git rebase --continue`. You can skip over the conflicted commit by entering `git rebase --skip`, exit the git rebase by entering `git rebase --abort` in your console.
<del>
<del>### More Information:
<del>- [Git documentation: rebase](https://git-scm.com/docs/git-rebase)
<del>- [Thoughbot interactive guide to git rebase](https://robots.thoughtbot.com/git-interactive-rebase-squash-amend-rewriting-history)
<ide><path>mock-guide/english/git/git-remote/index.md
<del>---
<del>title: Git Remote
<del>---
<del>## Git Remote
<del>The `git remote` command allows you to manage your Git remote repositories. Remote repositories are references to other Git repositories that operate on the same codebase.
<del>
<del>You can
<del><a href='https://guide.freecodecamp.org/git/git-pull/' target='_blank' rel='nofollow'>pull from</a>
<del>and
<del><a href='https://guide.freecodecamp.org/git/git-push/' target='_blank' rel='nofollow'>push to</a>
<del>remote repositories.
<del>
<del>You can push or pull to either an HTTPS URL, such as `https://github.com/user/repo.git`, or an SSH URL, like `git@github.com:user/repo.git`.
<del>
<del>Don't worry, every time you push something, you don't need to type the entire URL. Git associates a remote URL with a name, and the name most people use is `origin`.
<del>
<del>### List all configured remote repositories
<del>```bash
<del>git remote -v
<del>```
<del>This command lists all remote repositories alongside their location.
<del>
<del>Remote repositories are referred to by name. As noted above, the main repository for a project is usually called `origin`.
<del>
<del>When you you use
<del><a href='https://guide.freecodecamp.org/git/git-clone/' target='_blank' rel='nofollow'>git clone</a>
<del>to obtain a copy of a repository, Git sets up the original location as the *origin* remote repository.
<del>
<del>### Add a remote repository
<del>To add a remote repository to your project, you would run the following command:
<del>```bash
<del>git remote add REMOTE-NAME REMOTE-URL
<del>```
<del>The `REMOTE-URL` can be either HTTPS or SSH. You can find the URL on GitHub by clicking the "Clone or download" dropdown in your repository.
<del>
<del>For example, if you want to add a remote repository and call it `example`, you would run:
<del>```bash
<del>git remote add example https://example.org/my-repo.git
<del>```
<del>
<del>### Update a remote URL
<del>If the URL of a remote repository changes, you can update it with the following command, where `example` is the name of the remote:
<del>```bash
<del>git remote set-url example https://example.org/my-new-repo.git
<del>```
<del>
<del>### Deleting Remotes
<del>Deleting remotes is done like so:
<del>```bash
<del>git remote rm REMOTE-NAME
<del>```
<del>
<del>You can confirm the remote is gone by viewing the list of your existing remotes:
<del>```bash
<del>git remote -v
<del>```
<del>
<del>### More Information:
<del>- [Git remote documentation](https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes)
<ide><path>mock-guide/english/git/git-reset/index.md
<del>---
<del>title: Git Reset
<del>---
<del>## Git Reset
<del>
<del>The `git reset` command allows you to RESET your current head to a specified state. You can reset the state of specific files as well as an entire branch.
<del>
<del>### Reset a file or set of files
<del>The following command lets you selectively choose chunks of content and revert or unstage it.
<del>
<del>```shell
<del>git reset (--patch | -p) [tree-ish] [--] [paths]
<del>```
<del>
<del>### Unstage a file
<del>If you moved a file into the staging area with `git add`, but no longer want it to be part of a commit, you can use `git reset` to unstage that file:
<del>
<del>```shell
<del>git reset HEAD FILE-TO-UNSTAGE
<del>```
<del>
<del>The changes you made will still be in the file, this command just removes that file from your staging area.
<del>
<del>### Reset a branch to a prior commit
<del>The following command resets your current branch's HEAD to the given `COMMIT` and updates the index. It basically rewinds the state of your branch, then all commits you make going forward write over anything that came after the reset point. If you omit the `MODE`, it defaults to `--mixed`:
<del>
<del>```shell
<del>git reset MODE COMMIT
<del>```
<del>
<del>The options for `MODE` are:
<del>
<del>- `--soft`: does not reset the index file or working tree, but resets HEAD to `commit`. Changes all files to "Changes to be commited"
<del>- `--mixed`: resets the index but not the working tree and reports what has not been updated
<del>- `--hard`: resets the index and working tree. Any changes to tracked files in the working tree since `commit` are discarded
<del>- `--merge`: resets the index and updates the files in the working tree that are different between `commit` and HEAD, but keeps those which are different between the index and working tree
<del>- `--keep`: resets index entries and updates files in the working tree that are different between `commit` and HEAD. If a file that is different between `commit` and HEAD has local changes, the reset is aborted
<del>
<del>### More Information:
<del>- [Git reset documentation](https://git-scm.com/docs/git-reset)
<ide><path>mock-guide/english/git/git-revert/index.md
<del>---
<del>title: Git Revert
<del>---
<del>## Git Revert
<del>
<del>The `git revert` command undoes a commit, but unlike `git reset`, which removes the commit from the commit history, it appends a new commit with the resulting content. This prevents Git from losing history, which is important for the integrity of your revision history and for reliable collaboration. When you are working on a repository with other developers, using `git reset` is highly dangerous because you alter the history of commits which makes it very difficult to maintain a consistent history of commits with other developers.
<del>
<del>### Common options
<del>1.) This is a default option and doesn't need to be specified. This option will open the configured system editor and prompts you to edit the commit message prior to committing the revert.
<del>
<del>```shell
<del> -e
<del> --edit
<del>```
<del>2.) This is the inverse of the -e option. The `revert` will not open the editor.
<del>
<del>```shell
<del> --no-edit
<del>```
<del>3.) Passing this option will prevent `git revert` from creating a new commit that inverses the target commit. Instead of creating the new commit this option will add the inverse changes to the Staging Index and Working Directory.
<del>
<del>```shell
<del> -n
<del> --no-edit
<del>```
<del>
<del>### Example.
<del>Let's imagine the following situation.
<del>1.) You are working on a file and you add and commit your changes.
<del>2.) You then work on a few other things, and make some more commits.
<del>3.) Now you realize, three or four commits ago, you did something that you would like to undo - how can you do this?
<del>
<del>You might be thinking, just use `git reset`, but this will remove all of the commits after the one you would like to change - `git revert` to the rescue! Let's walk through this example:
<del>
<del>```shell
<del>mkdir learn_revert # Create a folder called `learn_revert`
<del>cd learn_revert # `cd` into the folder `learn_revert`
<del>git init # Initialize a git repository
<del>
<del>touch first.txt # Create a file called `first.txt`
<del>echo Start >> first.txt # Add the text "Start" to `first.txt`
<del>
<del>git add . # Add the `first.txt` file
<del>git commit -m "adding first" # Commit with the message "Adding first.txt"
<del>
<del>echo WRONG > wrong.txt # Add the text "WRONG" to `wrong.txt`
<del>git add . # Add the `wrong.txt` file
<del>git commit -m "adding WRONG to wrong.txt" # Commit with the message "Adding WRONG to wrong.txt"
<del>
<del>echo More >> first.txt # Add the text "More" to `first.txt`
<del>git add . # Add the `first.txt` file
<del>git commit -m "adding More to first.txt" # Commit with the message "Adding More to first.txt"
<del>
<del>echo Even More >> first.txt # Add the text "Even More" to `first.txt`
<del>git add . # Add the `first.txt` file
<del>git commit -m "adding Even More to First.txt" # Commit with the message "Adding More to first.txt"
<del>
<del># OH NO! We want to undo the commit with the text "WRONG" - let's revert! Since this commit was 2 from where we are not we can use git revert HEAD~2 (or we can use git log and find the SHA of that commit)
<del>
<del>git revert HEAD~2 # this will put us in a text editor where we can modify the commit message.
<del>
<del>ls # wrong.txt is not there any more!
<del>git log --oneline # note that the commit history hasn't been altered, we've just added a new commit reflecting the removal of the `wrong.txt`
<del>```
<del>
<del>#### More Information:
<del>- [Git revert documentation](https://git-scm.com/docs/git-revert)
<del>- [Git revert interactive tutorial](https://www.atlassian.com/git/tutorials/undoing-changes/git-revert)
<ide><path>mock-guide/english/git/git-show/index.md
<del>---
<del>title: Git Show
<del>---
<del>## Git Show
<del>
<del>The `git show` is a handy command that enables you to see in detail view of a given object (commits, tags, blobs and trees).
<del>
<del>This command's syntax is as follows:
<del>```bash
<del>git show [<options>] [<object>…]
<del>```
<del>
<del>For different git objects `git show` gives different outputs.
<del>
<del>* commits it shows the commit log message with a diff of changes which were committed.
<del>* For tags, it shows the tag message and the referenced objects.
<del>* For trees, it shows the names
<del>* For plain blobs, it shows the plain contents
<del>
<del>The most common usage of `git show` would be in association with git commit object
<del>
<del>```bash
<del>git show 3357d63
<del>```
<del>
<del>You'd get an output similar to,
<del>
<del> commit 3357d63d8f44104940e568a1ba89fa88a16dc753
<del> Author: John Doe <johndoe@acme.com>
<del> Date: Tue Oct 2 00:57:38 2018 +0530
<del>
<del> add a section on git commit --amend --author
<del>
<del> diff --git a/src/pages/git/git-commit/index.md b/src/pages/git/git-commit/index.md
<del> index fc9f568..8f1c8eb 100644
<del> --- a/src/pages/git/git-commit/index.md
<del> +++ b/src/pages/git/git-commit/index.md
<del> Premature commits happen all the time in the course of your day-to-day developme
<del>
<del> Amended commits are actually entirely new commits and the previous commit will no longer be on your current branch. When you're working with others, you should try to avoid amending commits if the last commit is already pushed into the repository.
<del>
<del> +With `--amend`, one of the useful flag you could use is `--author` which enables you to change the author of the last commit you've made. Imagine a situation you haven't properly set up your name or email in git configurations but you already made a commit. With `--author` flag you can simply change them without resetting the last commit.
<del> +
<del> +```
<del> +git commit --amend --author="John Doe <johndoe@email.com>"
<del> +```
<del> +
<del> ### More Information:
<del> - Git documentation: [commit](https://git-scm.com/docs/git-commit)
<del>
<del>You could just use `git show` and it will display the content of the latest git commit.
<del>
<del>### More Information:
<del>- [Git documentation - show](https://git-scm.com/docs/git-show)
<del>
<ide><path>mock-guide/english/git/git-squash/index.md
<del>---
<del>title: Git Squash
<del>---
<del>## Git Squash
<del>
<del>One of the things that developers hear quite often regarding their pull requests is something like "That looks good to me, please squash and merge". The fun part is that there is no such command like `git squash` (unless you create an [alias](https://guide.freecodecamp.org/git/git-rebase) to it). To `squash` pull request means commonly to compact all the commits in this request into one (rarely to other number) to make it more concise, readable and not to pollute main branch's history. To achieve that developer needs to use **interactive mode** of [Git Rebase](https://guide.freecodecamp.org/git/git-rebase) command.
<del>
<del>Quite often when you develop some new feature you end up with several intermittent commits in your history - you develop incrementally after all. That might be just some typos or steps to final solution. Most of the time there is no use in having all these commits in final public version of code, so it's more beneficial to have all of them compacted into one, single and final.
<del>
<del>So let's assume you have following commit log in the branch you'd like to merge as part of pull request:
<del>```shell
<del>$ git log --pretty=oneline --abbrev-commit
<del>30374054 Add Jupyter Notebook stub to Data Science Tools
<del>8490f5fc Minor formatting and Punctuation changes
<del>3233cb21 Prototype for Notebook page
<del>```
<del>
<del>Clearly we would prefer to have only one commit here, since there is no benefit in knowing what we started on writing and which typos we fixed there later, only final result is of importance.
<del>
<del>So what we do is starting interactive rebase session from current **HEAD** (commit **30374054**) to commit **3233cb21**, with intention to combine **3** latest commits into one:
<del>
<del>```shell
<del>$ git rebase -i HEAD~3
<del>```
<del>
<del>That will open an editor with something like following:
<del>
<del>
<del>```shell
<del>pick 3233cb21 Prototype for Notebook page
<del>pick 8490f5fc Minor formatting and Punctuation changes
<del>pick 30374054 Add Jupyter Notebook to Data Science Tools
<del># Rebase
<del>#
<del># Commands:
<del># p, pick = use commit
<del># r, reword = use commit, but edit the commit message
<del># e, edit = use commit, but stop for amending
<del># s, squash = use commit, but meld into previous commit
<del># f, fixup = like "squash", but discard this commit's log message
<del># x, exec = run command (the rest of the line) using shell
<del>#
<del># These lines can be re-ordered; they are executed from top to bottom.
<del>#
<del># If you remove a line here THAT COMMIT WILL BE LOST.
<del>#
<del># However, if you remove everything, the rebase will be aborted.
<del>#
<del># Note that empty commits are commented out
<del>```
<del>
<del>As always, Git gives us very nice help message where you can see this `squash` option we are looking for.
<del>
<del>Currently the instructions for interactive rebase say to `pick` every specified commit **and** preserve corresponding commit message. That is - don't change anything. But we want to have only one commit in the end. Simply edit the text in you editor replacing `pick` with `squash` (or just `s`) next yo every commit we want to get rid of and save/exit the editor. That might look like this:
<del>
<del>```shell
<del>s 3233cb21 Prototype for Notebook page
<del>s 8490f5fc Minor formatting and Punctuation changes
<del>pick 30374054 Add Jupyter Notebook to Data Science Tools
<del>```
<del>
<del>When you close your editor saving this changes it will be reopened right away suggesting to choose and reword commit messages. Something like
<del>```shell
<del># This is a combination of 3 commits.
<del># The first commit's message is:
<del>Prototype for Notebook page
<del>
<del># This is the 2nd commit message:
<del>
<del>Minor formatting and Punctuation changes
<del>
<del># This is the 3rd commit message:
<del>
<del>Add Jupyter Notebook to Data Science Tools
<del>
<del># Please enter the commit message for your changes. Lines starting
<del># with '#' will be ignored, and an empty message aborts the commit.
<del>```
<del>
<del>At this point you can delete all the messages you don't want to be included in the final commit version, reword them or just write commit message from scratch. Just remember that new version will include all the lines that are not starting with `#` character. Once again, save and exit your editor.
<del>
<del>Your terminal now should show a success message including `Successfully rebased and updated <branch name>` and the git log should show nice and compacted history with only one commit. All intermediary commits are gone and we are ready to merge!
<del>
<del>### Warning about local and remote commit history mismatch
<del>
<del>This operation is slightly dangerous if you have your branch already published in a remote repository - you are modifying commit history after all. So it's best to do squash operation on local branch before you do **push**. Sometimes, it will be already pushed - how would you create pull request after all? In this case you'll have to **force** the changes on remote branch after doing the squashing, since your local history and branch history in the remote repository are different:
<del>
<del>``` shell
<del>$ git push origin +my-branch-name
<del>```
<del>
<del>Do your best to make sure you are the only one using this remote branch at this point, or you'll make their life harder having history mismatch. But since **squashing** is usually done as the final operation on a branch before getting rid of it, it's usually not so big of a concern.
<ide><path>mock-guide/english/git/git-stash/index.md
<del>---
<del>title: Git Stash
<del>---
<del>## Git Stash
<del>
<del>Git has an area called the stash where you can temporarily store a snapshot of your changes without committing them to the repository. It's separate from the working directory, the staging area, or the repository.
<del>
<del>This functionality is useful when you've made changes to a branch that you aren't ready to commit, but you need to switch to another branch.
<del>
<del>### Stash Changes
<del>To save your changes in the stash, run the command:
<del>
<del>```shell
<del>git stash save "optional message for yourself"
<del>```
<del>
<del>This saves your changes and reverts the working directory to what it looked like for the latest commit. Stashed changes are available from any branch in that repository.
<del>
<del>Note that changes you want to stash need to be on tracked files. If you created a new file and try to stash your changes, you may get the error `No local changes to save`.
<del>
<del>### View Stashed Changes
<del>To see what is in your stash, run the command:
<del>
<del>```shell
<del>git stash list
<del>```
<del>This returns a list of your saved snapshots in the format `stash@{0}: BRANCH-STASHED-CHANGES-ARE-FOR: MESSAGE`. The `stash@{0}` part is the name of the stash, and the number in the curly braces (`{ }`) is the index of that stash. If you have multiple change sets stashed, each one will have a different index.
<del>
<del>If you forgot what changes were made in the stash, you can see a summary of them with `git stash show NAME-OF-STASH`. If you want to see the typical diff-style patch layout (with the +'s and -'s for line-by-line changes), you can include the `-p` (for patch) option. Here's an example:
<del>
<del>```shell
<del>git stash show -p stash@{0}
<del>
<del># Example result:
<del>diff --git a/PathToFile/fileA b/PathToFile/fileA
<del>index 2417dd9..b2c9092 100644
<del>--- a/PathToFile/fileA
<del>+++ b/PathToFile/fileA
<del>
<del>-What this line looks like on branch
<del>+What this line looks like with stashed changes
<del>```
<del>
<del>### Retrieve Stashed Changes
<del>To retrieve changes out of the stash and apply them to the current branch you're on, you have two options:
<del>
<del>1. `git stash apply STASH-NAME` applies the changes and leaves a copy in the stash
<del>2. `git stash pop STASH-NAME` applies the changes and removes the files from the stash
<del>
<del>There may be conflicts when you apply changes. You can resolve the conflicts similar to a merge (<a href='https://guide.freecodecamp.org/git/git-merge/' target='_blank' rel='nofollow'>see Git merge for details</a>).
<del>
<del>### Delete Stashed Changes
<del>If you want to remove stashed changes without applying them, run the command:
<del>```shell
<del>git stash drop STASH-NAME
<del>```
<del>
<del>To clear the entire stash, run the command:
<del>```shell
<del>git stash clear
<del>```
<del>
<del>### More Information:
<del>- The `git merge` command: <a href='https://guide.freecodecamp.org/git/git-merge/' target='_blank' rel='nofollow'>fCC Guide</a>
<del>- Git documentation: <a href='https://git-scm.com/docs/git-stash' target='_blank' rel='nofollow'>stash</a>
<ide><path>mock-guide/english/git/git-status/index.md
<del>---
<del>title: Git Status
<del>---
<del>## Git Status
<del>
<del>The `git status` commands displays the state of the working directory and the staging area. It displays paths that have differences between the `index` file and the current `HEAD` commit, paths that have differences between the working tree and the `index` file, and paths in the working tree that are not tracked by Git (and are not ignored by [gitignore](https://git-scm.com/docs/gitignore)
<del>
<del>`git status` command output does not show you any information regarding the committed project history. For this, you need to use `git log`.
<del>
<del>### Usage
<del>```shell
<del>git status
<del>```
<del>
<del>List which files are staged, unstaged, and untracked.
<ide><path>mock-guide/english/git/git-verifying-commits/index.md
<del>---
<del>title: Git Verifying Commits
<del>---
<del>## Git Verifying Commits
<del>
<del>When you’re building software with people from around the world, sometimes it’s important to validate that commits and tags are coming from an identified source. Git supports signing commits and tags with GPG. GitHub shows when commits and tags are signed.
<del>
<del>
<del>
<del>When you view a signed commit or tag, you will see a badge indicating if the signature could be verified using any of the contributor’s GPG keys uploaded to GitHub. You can upload your GPG keys by visiting the keys settings page.
<del>
<del>Many open source projects and companies want to be sure that a commit is from a verified source. GPG signature verification on commits and tags makes it easy to see when a commit or tag is signed by a verified key that GitHub knows about.
<del>
<del>
<del>
<del>### More Information:
<del>- [Signing Your Work](https://git-scm.com/book/en/v2/Git-Tools-Signing-Your-Work)
<ide>\ No newline at end of file
<ide><path>mock-guide/english/git/gitignore/index.md
<del>---
<del>title: Gitignore
<del>---
<del>## Gitignore
<del>
<del>The `.gitignore` file is a text file that tells Git which files or folders to ignore in a project.
<del>
<del>A local `.gitignore` file is usually placed in the root directory of a project. You can also create a global `.gitignore` file and any entries in that file will be ignored in all of your Git repositories.
<del>
<del>To create a local `.gitignore` file, create a text file and name it `.gitignore` (remember to include the `.` at the beginning). Then edit this file as needed. Each new line should list an additional file or folder that you want Git to ignore.
<del>
<del>The entries in this file can also follow a matching pattern.
<del>
<del>* `*` is used as a wildcard match
<del>* `/` is used to ignore pathnames relative to the `.gitignore` file
<del>* `#` is used to add comments to a `.gitignore` file
<del>
<del>This is an example of what the `.gitignore` file could look like:
<del>
<del>```
<del># Ignore Mac system files
<del>.DS_store
<del>
<del># Ignore node_modules folder
<del>node_modules
<del>
<del># Ignore all text files
<del>*.txt
<del>
<del># Ignore files related to API keys
<del>.env
<del>
<del># Ignore SASS config files
<del>.sass-cache
<del>```
<del>
<del>To add or change your global .gitignore file, run the following command:
<del>```bash
<del>git config --global core.excludesfile ~/.gitignore_global
<del>```
<del>This will create the file `~/.gitignore_global`. Now you can edit that file the same way as a local `.gitignore` file. All of your Git repositories will ignore the files and folders listed in the global `.gitignore` file.
<del>
<del>### More Information:
<del>- Git documentation: <a href='https://git-scm.com/docs/gitignore' target='_blank' rel='nofollow'>gitignore</a>
<del>- Ignoring files: <a href='https://help.github.com/articles/ignoring-files/' target='_blank' rel='nofollow'>GitHub</a>
<del>- Useful `.gitignore` templates: <a href='https://github.com/github/gitignore' target='_blank' rel='nofollow'>GitHub</a>
<ide><path>mock-guide/english/git/gui-options/index.md
<del>---
<del>title: GUI Options
<del>---
<del>
<del>## GUI Options for Git
<del>
<del>Most people prefer to use Git as a [CLI (command-line interface)](https://en.wikipedia.org/wiki/Command-line_interface) tool, but there are plenty of [GUI (graphical user interface)](https://en.wikipedia.org/wiki/Graphical_user_interface) tools allowing you to use Git in a graphical way. GUI tools can useful to get a better view of the state of your Git repository, and some might find them easier to use than the CLI. However, knowing how to use the CLI is highly recommended because it will be the same interface on every platform, because it is generally considered to be more efficient, and because it is required as soon as you want to do something even a little bit complex.
<del>
<del>## List of Git GUI Based Solutions
<del>* [GitKraken](https://www.gitkraken.com) is a popular Git GUI for Windows, Mac and Linux. It is proprietary but free for non-commercial use.
<del>* [GitHub Desktop](https://desktop.github.com/) is the Git client application provided by GitHub, allowing better integration with GitHub than other solutions. It is available for Windows and Mac, but not yet for Linux. It is free and open source.
<del>* [SourceTree](https://www.sourcetreeapp.com/) is another Git GUI for Windows and Mac by Atlassian. It has many features such as interactive rebase, designed to make using Git easier for beginners.
<del>* [Git Tower](https://www.git-tower.com/mac/) is available for Mac and Windows.
<del>* [TortoiseGit](https://tortoisegit.org/) is a Windows Shell Interface to Git based on TortoiseSVN. It's open source and can be built with freely available software.
<del>* [SmartGit](https://www.syntevo.com/smartgit/) is a Git client free for a non-commercial use for Windows, Mac and Linux.
<ide><path>mock-guide/english/git/index.md
<del>---
<del>title: Git
<del>---
<del>## Git
<del>
<del>
<del>Git is an open source distributed version control system created in 2005 by Linus Torvalds and others from the Linux development community. Git can work with many types of projects, but it's most commonly used for software source code.
<del>
<del>Version control is a system that keeps track of changes to a file or group of files over time. When you have a history of these changes, it lets you find specific versions later, compare changes between versions, recover files you may have deleted, or revert files to previous versions.
<del>
<del>A *distributed* version control system means that different users maintain their own repositories of a project, instead of working from one central repository. Users automatically have full file tracking abilities and the project's complete version history without needing access to a central server or network.
<del>
<del>When Git is initialized in a project directory, it begins tracking file changes and stores them as "change sets" or "patches." Users working together on a project submit their change sets which are then included (or rejected) in the project.
<del>
<del>**Table of Contents**
<del>- [Understand the Three Sections of a Git Project](#understand-the-three-sections-of-a-git-project)
<del>- [Install Git](#install-git)
<del>- [Configure the Git Environment](#configure-the-git-environment)
<del>- [Initialize Git in a Project](#initialize-git-in-a-project)
<del>- [Get Help in Git](#get-help-in-git)
<del>- [Sources](#sources)
<del>- [More Information](#more-information)
<del>
<del>### Understand the Three Sections of a Git Project <a name="understand-the-three-sections-of-a-git-project"></a>
<del>A Git project will have the following three main sections:
<del>1. Git directory
<del>2. Working directory (or working tree)
<del>3. Staging area
<del>
<del>The **Git directory** (located in `YOUR-PROJECT-PATH/.git/`) is where Git stores everything it needs to accurately track the project. This includes metadata and an object database which includes compressed versions of the project files.
<del>
<del>The **working directory** is where a user makes local changes to a project. The working directory pulls the project's files from the Git directory's object database and places them on the user's local machine.
<del>
<del>The **staging area** is a file (also called the "index", "stage", or "cache") that stores information about what will go into your next commit. A commit is when you tell Git to save these staged changes. Git takes a snapshot of the files as they are and permanently stores that snapshot in the Git directory.
<del>
<del>With three sections, there are three main states that a file can be in at any given time: committed, modified, or staged. You *modify* a file any time you make changes to it in your working directory. Next, it's *staged* when you move it to the staging area. Finally, it's *committed* after a commit.
<del>
<del>### Install Git <a name="install-git"></a>
<del>- Ubuntu: `sudo apt-get install git`
<del>- Windows: <a href="https://git-scm.com/download/win" target="_blank">Download</a>
<del>- Mac: <a href="https://git-scm.com/download/mac" target="_blank">Download</a>
<del>
<del>### Configure the Git Environment <a name="configure-the-git-environment"></a>
<del>Git has a `git config` tool that allows you to customize your Git environment. You can change the way Git looks and functions by setting certain configuration variables. Run these commands from a command line interface on your machine (Terminal in Mac, Command Prompt or Powershell in Windows).
<del>
<del>There are three levels of where these configuration variables are stored:
<del>1. System: located in `/etc/gitconfig`, applies default settings to every user of the computer. To make changes to this file, use the `--system` option with the `git config` command.
<del>2. User: located in `~/.gitconfig` or `~/.config/git/config`, applies settings to a single user. To make changes to this file, use the `--global` option with the `git config` command.
<del>3. Project: located in `YOUR-PROJECT-PATH/.git/config`, applies settings to the project only. To make changes to this file, use the `git config` command.
<del>
<del>If there are settings that conflict with each other, the project-level configurations will override the user-level ones, and the user-level configurations will override the system-level ones.
<del>
<del>Note for Windows users: Git looks for the user-level configuration file (`.gitconfig`) in your `$HOME` directory (`C:\Users\$USER`). Git also looks for `/etc/gitconfig`, although it's relative to the MSys root, which is wherever you decide to install Git on your Windows system when you run the installer. If you are using version 2.x or later of Git for Windows, there is also a system-level config file at `C:\Documents and Settings\All Users\Application Data\Git\config` on Windows XP, and in `C:\ProgramData\Git\config` on Windows Vista and newer. This config file can only be changed by `git config -f FILE` as an admin.
<del>
<del>#### Add Your Name and Email
<del>Git includes the user name and email as part of the information in a commit. You'll want to set this up under your user-level configuration file with these commands:
<del>```shell
<del>git config --global user.name "My Name"
<del>git config --global user.email "myemail@example.com"
<del>```
<del>
<del>#### Change Your Text Editor
<del>Git automatically uses your default text editor, but you can change this. Here's an example to use the Atom editor instead (the `--wait` option tells the shell to wait for the text editor so you can do your work in it before the program moves on):
<del>```shell
<del>git config --global core.editor "atom --wait"
<del>```
<del>
<del>#### Add Color to Git Output
<del>You can configure your shell to add color to Git output with this command:
<del>```shell
<del>git config --global color.ui true
<del>```
<del>
<del>To see all your configuration settings, use the command `git config --list`.
<del>
<del>### Initialize Git in a Project <a name="initialize-git-in-a-project"></a>
<del>Once Git is installed and configured on your computer, you need to initialize it in your project to start using its version control powers. In the command line, use the `cd` command to navigate to the top-level (or root) folder for your project. Next, run the command `git init`. This installs a Git directory folder with all the files and objects Git needs to track your project.
<del>
<del>It's important that the Git directory is installed in the project root folder. Git can track files in subfolders, but it won't track files located in a parent folder relative to the Git directory.
<del>
<del>### Get Help in Git <a name="get-help-in-git"></a>
<del>If you forget how any command works in Git, you can access Git help from the command line several ways:
<del>```shell
<del>git help COMMAND
<del>git COMMAND --help
<del>man git-COMMAND
<del>```
<del>This displays the manual page for the command in your shell window. To navigate, scroll with the up and down arrow keys or use the following keyboard shortcuts: <!-- Need to confirm these work in Windows -->
<del>- `f` or `spacebar` to page forward
<del>- `b` to page back
<del>- `q` to quit
<del>
<del>### Sources <a name="sources"></a>
<del>This article uses information from the <a href='https://github.com/progit/progit2' target='_blank' rel='nofollow'>Pro Git</a> book, written by Scott Chacon and Ben Straub and published by Apress. The book is displayed in full in the <a href='https://git-scm.com/book/en/v2' target='_blank' rel='nofollow'>Git documentation</a>.
<del>
<del>### More Information: <a name="more-information"></a>
<del>- For downloads, documentation, and a browser-based tutorial: <a href='https://git-scm.com/' target='_blank' rel='nofollow'>Git official website</a>
<del>- Most useful commands when you're in bad GIT situation: <a href='http://ohshitgit.com/' target='_blank' rel='nofollow'>Oh shit, git!</a>
<ide><path>mock-guide/english/git/tagging-in-git/index.md
<del>---
<del>title: Tagging in Git
<del>---
<del>
<del>Tagging lets developers mark important checkpoints in the course of their projects development. For instance, software release versions can be tagged. (Ex: v1.3.2) It essentially allows you to give a commit a special name(tag).
<del>
<del>To view all the created tags in alphabetical order:
<del>```bash
<del>git tag
<del>```
<del>To get more information on a tag:
<del>```bash
<del>git show v1.4
<del>```
<del>
<del>There are two types of tags:
<del>1. Annotated
<del>```bash
<del>git tag -a v1.2 -m "my version 1.4"
<del>```
<del>2. Lightweight
<del>```bash
<del>git tag v1.2
<del>```
<del>They differ in the way that they are stored.
<del>These create tags on your current commit.
<del>
<del>Incase, you'd like to tag a previous commit specify the commit ID you'd like to tag:
<del>```bash
<del>git tag -a v1.2 9fceb02
<del>```
<del>
<del>The tags names may be used instead of commit IDs while checking out and pushing commits to a remote repo.
<del>
<del>#### More Information:
<del>- Git documentation: <a href='https://git-scm.com/docs/git-tag' target='_blank' rel='nofollow'>Documentation</a>
<del>- Git Tagging Chapter: <a href='https://git-scm.com/book/en/v2/Git-Basics-Tagging' target='_blank' rel='nofollow'>Book</a>
<del>
<del>You can list all available tags in a project with the ```git tag``` command (nate that they will appear in alphabetical order):
<del>
<del>```
<del>$ git tag
<del>v1.0
<del>v2.0
<del>v3.0
<del>```
<del>
<del>This way of listing tags is great for small projects, but greater projects can have hundreds of tags, so you may need to filter them when searching for an important point in the history. You can find tags containing specific characters adding an ```-l``` to the ```git tag``` command:
<del>
<del>```
<del>$ git tag -l "v2.0*"
<del>v2.0.1
<del>v2.0.2
<del>v2.0.3
<del>v2.0.4
<del>```
<del>
<del>## Create a tag
<del>
<del>You can create two type of tags: annotated and lightweight. They first ones are compete objects in GIT database: they are checksummed, requiere a message (like commits) and store other important data such as name, email and date. On the other hand, lightweight tags don require a mesage or store other data, working just as a pointer to a specific point in the project.
<del>
<del>### Create an annotated tag
<del>
<del>To create an anotated tag, add ```-a tagname -m "tag message"``` to the ```git tag``` command:
<del>
<del>```
<del>$ git tag -a v4.0 -m "release version 4.0"
<del>$ git tag
<del>v1.0
<del>v2.0
<del>v3.0
<del>v4.0
<del>```
<del>
<del>As you can see, the ```-a``` specifies that you are creating an annotated tag, after comes the tag name and finally, the ```-m``` followed by the tag message to store in the Git database.
<del>
<del>### Create a lightweight tag
<del>
<del>Lightweight tags contain only the commit checksum (no other information is stored). To create one, just run the ```git tag``` command without any other options (the -lw characters at the end of the name are used to indicate lightweight tags, but you can mark them as you like):
<del>
<del>```
<del>$ git tag v4.1-lw
<del>$ git tag
<del>v1.0
<del>v2.0
<del>v3.0
<del>v4.0
<del>v4.1-lw
<del>```
<del>
<del>This time you didn't specify a message or other relevant data, so the tag contains only the refered commit's checksum.
<del>
<del>## View tag's data
<del>
<del>You can run the ```git show``` command to view the data stored in a tag. In the case of annotated tags, you'll see the tag data and the commit data:
<del>
<del>```
<del>$ git show v4.0
<del>tag v4.0
<del>Tagger: John Cash <john@cash.com>
<del>Date: Mon Sat 28 15:00:25 2017 -0700
<del>
<del>release version 4.0
<del>
<del>commit da43a5fss745av88d47839247990022a98419093
<del>Author: John Cash <john@cash.com>
<del>Date: Fri Feb 20 20:30:05 2015 -0700
<del>
<del> finished details
<del>```
<del>
<del>If the tag you are watching is a lightweight tag, you'll only see the refered commit data:
<del>
<del>```
<del>$ git show v1.4-lw
<del>commit da43a5f7389adcb9201ab0a289c389ed022a910b
<del>Author: John Cash <john@cash.com>
<del>Date: Fri Feb 20 20:30:05 2015 -0700
<del>
<del> finished details
<del>```
<del>
<del>## Tagging old commits
<del>
<del>You can also tag past commits using the git tag commit. In order to do this, you'll need to specify the commit's checksum (or at least a part of it) in the command's line.
<del>
<del>First, run git log to find out the required commit's checksum:
<del>
<del>```
<del>$ git log --pretty=oneline
<del>ac2998acf289102dba00823821bee04276aad9ca added products section
<del>d09034bdea0097726fd8383c0393faa0072829a7 refactorization
<del>a029ac120245ab012bed1ca771349eb9cca01c0b modified styles
<del>da43a5f7389adcb9201ab0a289c389ed022a910b finished details
<del>0adb03ca013901c1e02174924486a08cea9293a2 small fix in search textarea styles
<del>```
<del>
<del>When you have the checksum needed, add it at the end of the tag creation line:
<del>
<del>```
<del>$ git tag -a v3.5 a029ac
<del>```
<del>
<del>You'll see the tag was correctly added running ```git tag```:
<del>
<del>```
<del>$ git tag
<del>v1.0
<del>v2.0
<del>v3.0
<del>v3.5
<del>v4.0
<del>v4.1-lw
<del>```
<del>
<del>## Push tags
<del>
<del>Git does't push tags by default when you run the git push command. So, to succesfully push a tag to a server you'll have to ```git push origin``` command:
<del>
<del>```
<del>$ git push origin v4.0
<del>Counting objects: 14, done.
<del>Delta compression using up to 8 threads.
<del>Compressing objects: 100% (16/16), done.
<del>Writing objects: 100% (18/18), 3.15 KiB | 0 bytes/s, done.
<del>Total 18 (delta 4), reused 0 (delta 0)
<del>To git@github.com:jcash/gitmanual.git
<del> * [new tag] v4.0 -> v4.0
<del> ```
<del>
<del>You can also use the ```--tags``` option to add multiple tags at once with the ```git push origin``` command:
<del>
<del>```
<del>$ git push origin --tags
<del>Counting objects: 1, done.
<del>Writing objects: 100% (1/1), 160 bytes | 0 bytes/s, done.
<del>Total 1 (delta 0), reused 0 (delta 0)
<del>To git@github.com:jcash/gitmanual.git
<del> * [new tag] v4.0 -> v4.0
<del> * [new tag] v4.1-lw -> v4.1-lw
<del>```
<del>
<del>## Checking out Tags
<del>
<del>You can use ```git checkout``` to checkout to a tag like you would normally do. But you need to keep in mind that this would result a *detached HEAD* state.
<del>
<del>```
<del>$ git checkout v0.0.3
<del>Note: checking out 'v0.0.3'.
<del>
<del>You are in 'detached HEAD' state. You can look around, make experimental
<del>changes and commit them, and you can discard any commits you make in this
<del>state without impacting any branches by performing another checkout.
<del>```
<del>
<del>## Deleting a Tag
<del>
<del>You may find a situation were you want to delete a certain tag. There's a very useful command for this situations:
<del>
<del>```
<del>$ git tag --delete v0.0.2
<del>$ git tag
<del>v0.0.1
<del>v0.0.3
<del>v0.0.4
<del>```
<del>
<del>### More Information
<del>
<del>* [Git Pro - Tagging Basics](https://git-scm.com/book/en/v2/Git-Basics-Tagging)
<del>* [Git Pro - Documentation](https://git-scm.com/docs/git-tag)
<del>* [Git HowTo](https://githowto.com/tagging_versions)
<del>* [Git tip: Tags](http://alblue.bandlem.com/2011/04/git-tip-of-week-tags.html)
<del>* [Creating a tag](https://www.drupal.org/node/1066342)
<del>
<del>### Sources
<del>
<del>Git documentation: [tags](https://git-scm.com/book/en/v2/Git-Basics-Tagging)
<ide><path>mock-guide/english/go/index.md
<del>---
<del>title: Go
<del>---
<del>## Go
<del>
<del>
<del>**Go** (or **golang**) is a programming language created at Google in 2007 by Robert Griesemer, Rob Pike, and Ken Thompson. It is a compiled, statically-typed language in the tradition of Algol and C. It has garbage collection, limited structural typing, memory safety, and CSP-style concurrent programming features added. The compiler and other language tools originally developed by Google are all free and open source. Its popularity is increasing fast. It is a great choice for building web applications.
<del>
<del>For more information head to [Go's Homepage](https://golang.org/)
<del>
<del>Want a quick [Tour of Go?](https://tour.golang.org/welcome/1)
<del>
<del>## Pre-Installations:
<del>-----------
<del>
<del>#### Install Golang with Homebrew:
<del>
<del>```bash
<del>$ brew update
<del>$ brew install golang
<del>```
<del>#### When installed, try to run go version to see the installed version of Go.
<del>
<del>### Setup the workspace:
<del>------
<del>
<del>##### Add Environment variables:
<del>
<del>First, you'll need to tell Go the location of your workspace.
<del>
<del>We'll add some environment variables into shell config. One of does files located at your home directory bash_profile, bashrc or .zshrc (for Oh My Zsh Army)
<del>
<del>```bash
<del>$ vi .bashrc
<del>````
<del>
<del>then add those lines to export the required variables
<del>
<del>#### This is actually your .bashrc file
<del>
<del>```bash
<del>export GOPATH=$HOME/go-workspace # don't forget to change your path correctly!
<del>export GOROOT=/usr/local/opt/go/libexec
<del>export PATH=$PATH:$GOPATH/bin
<del>export PATH=$PATH:$GOROOT/bin
<del>```
<del>
<del>#### Create your workspace:
<del>--------
<del>##### Create the workspace directories tree:
<del>```bash
<del>$ mkdir -p $GOPATH $GOPATH/src $GOPATH/pkg $GOPATH/bin
<del>$GOPATH/src : Where your Go projects / programs are located
<del>$GOPATH/pkg : contains every package objects
<del>$GOPATH/bin : The compiled binaries home
<del>```
<del>
<del>### Quickstart
<del>For a quickstart and boilerplate Go project, try <a href='https://www.growthmetrics.io/open-source/alloy' target='_blank' rel='nofollow'>Alloy</a>
<del>
<del>1. Clone Alloy repository
<del>```
<del>git clone https://github.com/olliecoleman/alloy
<del>cd alloy
<del>```
<del>2. Install the dependencies
<del>```
<del>glide install
<del>npm install
<del>```
<del>3. Start the development server
<del>```
<del>go install
<del>alloy dev
<del>```
<del>4. Visit website at `http://localhost:1212`
<del>
<del>*Alloy uses Node, NPM, and Webpack*
<del>
<del>### Go Playground
<del>
<del> [Go Playground](https://play.golang.org/)
<del>
<del>Learning how to install go on your local machine is important, but if want to start playing with go right in your browser, then Go Playground is the perfect sandbox to get started right away! To learn more about the Go Playground see their article titled [Inside the Go Playground](https://blog.golang.org/playground)
<ide><path>mock-guide/english/groovy/index.md
<del>---
<del>title: Groovy
<del>---
<del>## Groovy
<del>Apache Groovy or Groovy is a powerful and dynamic language with static compilation and typing capabilities for the Java platform and was designed to increase productivity with its concise and familiar syntax. It integrates with any Java program with ease.
<del>
<del>#### More Information:
<del>For documentation and more information, visit [Groovy's Official Website](http://groovy-lang.org)
<ide><path>mock-guide/english/html/attributes/a-href-attribute/index.md
<del>---
<del>title: A Href Attribute
<del>---
<del>
<del>## A Href Attribute
<del>
<del>The `<a href>` attribute refers to a destination provided by a link. The `a` (anchor) tag is dead without the `<href>` attribute. Sometimes in your workflow, you don't want a live link or you won't know the link destination yet. In this case, it's useful to set the `href` attribute to `"#"` to create a dead link. The `href` attribute can be used to link to local files or files on the internet.
<del>
<del>For instance:
<del>
<del>```html
<del><html>
<del> <head>
<del> <title>Href Attribute Example</title>
<del> </head>
<del> <body>
<del> <h1>Href Attribute Example</h1>
<del> <p>
<del> <a href="https://www.freecodecamp.org/contribute/">The freeCodeCamp Contribution Page</a> shows you how and where you can contribute to freeCodeCamp's community and growth.
<del> </p>
<del> </h1>
<del> </body>
<del></html>
<del>```
<del>The `<a href>` attribute is supported by all browsers.
<del>
<del>#### More attributes:
<del> `hreflang` : Specifies the language of the linked resource.
<del> `target` : Specifies the context in which the linked resource will open.
<del> `title` : Defines the title of a link, which appears to the user as a tooltip.
<del>
<del>### Examples
<del>```html
<del><a href="#">This is a dead link</a>
<del><a href="https://www.freecodecamp.org">This is a live link to freeCodeCamp</a>
<del><a href="https://html.com/attributes/a-href/">more with a href attribute</a>
<del>
<del>```
<del>### In-page anchors
<del>
<del>It's also possible to set an anchor to certain place of the page. To do this you should first place a tab at location on the page with tag <a> and necessary attribute "name" with any keyword description in it, like this:
<del>
<del>```html
<del><a name="top"></a>
<del>```
<del>
<del>Any description between tags is not required. After that you can place a link leading to this anchor at any place on the same page. To do this you should use tag <a> with necessary attribute "href" with symbol # (sharp) and key-word description of the anchor, like this:
<del>
<del>```html
<del><a href="#top">Go to Top</a>
<del>```
<del>
<del>### Image Links
<del>
<del>The `<a href="#">` may also be applied to images and other HTML elements.
<del>
<del>### Example
<del>
<del>```html
<del><a href="#"><img itemprop="image" style="height: 90px;" src="http://www.chatbot.chat/assets/images/header-bg_y.jpg" alt="picture"> </a>
<del>
<del>```
<del>### Example
<del><a href="#"><img itemprop="image" style="height: 90px;" src="http://www.chatbot.chat/assets/images/header-bg_y.jpg" alt="picture"> </a>
<del>### Some more examples of href
<del>```html
<del><base href="https://www.freecodecamp.org/a-href/">This gives a base url for all further urls on the page</a>
<del><link href="style.css">This is a live link to an external stylesheet</a>
<del>```
<ide><path>mock-guide/english/html/attributes/a-target-attribute/index.md
<del>---
<del>title: A Target Attribute
<del>---
<del>## A Target Attribute
<del>
<del>The `<a target>` attribute specifies where to open the linked document in an `a` (anchor) tag.
<del><br>
<del>
<del>#### Examples:
<del>
<del>
<del>A target attribute with the value of “_blank” opens the linked document in a new window or tab.
<del>
<del>
<del>```html
<del> <a href="https://www.freecodecamp.org" target="_blank">freeCodeCamp</a>
<del>```
<del>
<del>A target attribute with the value of “_self” opens the linked document in the same frame as it was clicked (this is the default and usually does not need to be specified).
<del>
<del>```html
<del> <a href="https://www.freecodecamp.org" target="_self">freeCodeCamp</a>
<del>```
<del>
<del>
<del>```html
<del> <a href="https://www.freecodecamp.org">freeCodeCamp</a>
<del>```
<del>
<del>A target attribute with the value of “_parent” opens the linked document in the parent frame.
<del>
<del>```html
<del> <a href="https://www.freecodecamp.org" target="_parent">freeCodeCamp</a>
<del>```
<del>
<del>A target attribute with the value of “_top” opens the linked document in the full body of the window.
<del>
<del>```html
<del> <a href="https://www.freecodecamp.org" target="_top">freeCodeCamp</a>
<del>```
<del>
<del>A target attribute with the value of _"framename"_ Opens the linked document in a specified named frame.
<del>
<del>```html
<del> <a href="https://www.freecodecamp.org" target="framename">freeCodeCamp</a>
<del>```
<del>
<del>
<del>#### More Information:
<del>
<del>Target Attribute: <a href="https://www.w3schools.com/tags/att_a_target.asp" target="_blank">w3schools</a>
<ide><path>mock-guide/english/html/attributes/autofocus-attribute/index.md
<del>---
<del>title: Autofocus Attribute
<del>---
<del>## Autofocus Attribute | HTML5
<del>
<del>The **autofocus** attribute is a boolean attribute.
<del>
<del>When present, it specifies that the element should automatically get input focus when the page loads.
<del>
<del>Only one form element in a document can have the **autofocus** attribute. It cannot be applied to `<input type="hidden">`.
<del>
<del>### Applies to
<del>
<del>| Element | Attribute |
<del>| :-- | :-- |
<del>| `<button>` | autofocus |
<del>| `<input>` | autofocus |
<del>| `<select>` | autofocus |
<del>| `<textarea>` | autofocus |
<del>
<del>### Example
<del>
<del>```html
<del><form>
<del> <input type="text" name="fname" autofocus>
<del> <input type="text" name="lname">
<del></form>
<del>```
<del>
<del>### Compatibility
<del>
<del>This is an HTML5 attribute.
<del>
<del>#### More Information:
<del>
<del>[HTML autofocus Attribute](https://www.w3schools.com/tags/att_autofocus.asp) on w3schools.com
<del>
<del>[<input> autofocus attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input) on MDN web docs
<ide>\ No newline at end of file
<ide><path>mock-guide/english/html/attributes/body-background-attribute/index.md
<del>---
<del>title: Body Background Attribute
<del>---
<del>## Body Background Attribute
<del>
<del>If you want to add a background image instead of a color, one solution is the `<body background>` attribute. It specifies a background image for an HTML document.
<del>
<del>
<del>Syntax:
<del>
<del>`<body background="URL">`
<del>
<del>
<del>Attribute:
<del>
<del>`background - URL for background image`
<del>
<del>
<del>Example:
<del>```html
<del><html>
<del> <body background="https://assets.digitalocean.com/blog/static/hacktoberfest-is-back/hero.png">
<del> </body>
<del></html>
<del>```
<del>
<del>
<del>## body-background attribute is depreciated
<del>the body-background attribute been deprecated in HTML5. The correct way to style the ```<body>``` tag is with CSS.
<del>
<del>
<del>There are several CSS properties used for setting the background of an element. These can be used on <body> to set the background of an entire page.
<del>
<del>## Check it Out:
<del>* [CSS background proprety](https://github.com/freeCodeCamp/guides/blob/master/src/pages/css/background/index.md)
<del>
<del>
<ide><path>mock-guide/english/html/attributes/body-bgcolor-attribute/index.md
<del>---
<del>title: Body Bgcolor Attribute
<del>---
<del>## Body Bgcolor Attribute
<del>The `<body bgcolor>` attribute assigns a background color for an HTML document.
<del>
<del>**Syntax**:
<del>
<del>`<body bgcolor="color">`
<del>The color value can be either a color name (like, `purple`) or a hex value (like, `#af0000`).
<del>
<del>To add a background color to a webpage you can use the `<body bgcolor="######">` attribute. It specifies a color for the HTML document to display.
<del>
<del>**For example:**
<del>
<del>```html
<del><html>
<del> <head>
<del> <title>Body bgcolor Attribute example</title>
<del> </head>
<del> <body bgcolor="#afafaf">
<del> <h1>This webpage has colored background.</h1>
<del> </body>
<del></html>
<del>```
<del>You can change the color by replacing ###### with a hexadecimal value. For simple colors you can also use the word, such as "red" or "black".
<del>
<del>All major browsers support the `<body bgcolor>` attribute.
<del>
<del>*Note:*
<del>* HTML 5 does not support the `<body bgcolor>` attribute. Use CSS for this purpose. How? By using the following code:
<del>`<body style="background-color: color">`
<del>Of course, you can also do it in a separate document instead of an inline method.
<del>
<del>* Do not use RGB value in `<body bgcolor>` attribute because `rgb()` is for CSS only, that is, it will not work in HTML.
<del>
<del>**See it in action:**
<del>https://repl.it/Mwht/2
<del>
<del>**Other resources:**
<del>* HTML color names: https://www.w3schools.com/colors/colors_names.asp
<del>* CSS background-color property: https://www.w3schools.com/cssref/pr_background-color.asp
<ide><path>mock-guide/english/html/attributes/div-align-attribute/index.md
<del>---
<del>title: Div Align Attribute
<del>---
<del>## Div Align Attribute
<del>
<del>The `<div align="">` attribute is used for aligning the text in a div tag to The Left, Right, center or justify.
<del>
<del>For instance:
<del>
<del>```html
<del><html>
<del><head>
<del><title> Div Align Attribbute </title>
<del></head>
<del><body>
<del><div align="left">
<del>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
<del></div>
<del><div align="right">
<del>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
<del></div>
<del><div align="center">
<del>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
<del></div>
<del><div align="justify">
<del>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
<del></div>
<del></body>
<del></html>
<del>```
<del>## Important!
<del>This attribute is no longer supported in html5. css is the way to go.
<del>
<del>The Div Align attribute can be used to horizontally align the contents within a div. In the below example, the text will be centered within the div.
<del>
<del>```html
<del><div align="center">
<del> This Text Will Be Centered
<del></div>
<del>```
<del>
<del>**This attribute is not supported in HTML5 and [CSS Text Align](https://github.com/freeCodeCamp/guides/blob/f50b7370be514b2a03ee707cd0f0febe2bb713ae/src/pages/css/text-align/index.md) should be used instead
<del>
<ide><path>mock-guide/english/html/attributes/font-color-attribute/index.md
<del>---
<del>title: Font Color Attribute
<del>---
<del>
<del>## Font Color Attribute
<del>This attribute is used to set a color to the text enclosed in a ```<font>``` tag.
<del>
<del>### Syntax:
<del> ```html
<del> <font color= "color">
<del> ```
<del>
<del>### Important:
<del>This attribute is not supported in HTML5. Instead, this [freeCodeCamp article](https://guide.freecodecamp.org/css/colors) specifies a CSS method, which can be used.
<del>
<del>### Note:
<del>A color can also be specified using a 'hex code' or an 'rgb code', instead of using a name.
<del>
<del>### Example:
<del>1. Color name attribute
<del>```html
<del><html>
<del> <body>
<del> <font color="green">Font color example using color attribute</font>
<del> </body>
<del></html>
<del>```
<del>2. Hex code attribute
<del>```html
<del><html>
<del> <body>
<del> <font color="#00FF00">Font color example using color attribute</font>
<del> </body>
<del></html>
<del>```
<del>3. RGB attribute
<del>```html
<del><html>
<del> <body>
<del> <font color="rgb(0,255,0)">Font color example using color attribute</font>
<del> </body>
<del></html>
<del>```
<ide><path>mock-guide/english/html/attributes/font-size-attribute/index.md
<del>---
<del>title: Font Size Attribute
<del>---
<del>## Font Size Attribute
<del>
<del>This attribute specifies the font size as either a numeric or relative value. Numeric values range from `1` to `7` with `1` being the smallest and `3` the default. It can also be defined using a relative value, like `+2` or `-3`, which set it relative to the value of the size attribute of the `<basefont>` element, or relative to `3`, the default value, if none does exist.
<del>
<del>Syntax:
<del>
<del>`<font size="number">
<del>`
<del>
<del>Example:
<del>```html
<del><html>
<del> <body>
<del> <font size="6">This is some text!</font>
<del> </body>
<del></html>
<del>```
<del>
<del>Note : `The size attribute of <font> is not supported in HTML5. Use CSS instead.`
<ide><path>mock-guide/english/html/attributes/href-attribute/index.md
<del>---
<del>title: Href Attribute
<del>---
<del>## Href Attribute
<del>
<del>Href is short for "Hypertext Reference" and is an HTML attribute. The href attribute is mainly used for `<a>` tags to specify the URL for a webpage the link leads to (whether it be on a different section of the same page, or on a completely different webpage).
<del>
<del>#### How to use
<del>`<a href="URL"></a>`
<del>
<del>#### Examples
<del>```html
<del><a href="https://www.freecodecamp.org">This is an absolute URL</a>
<del>
<del><a href="index.html">This is a relative URL</a>
<del>```
<del>
<del>#### More Information:
<del>[W3Schools](https://www.w3schools.com/tags/att_href.asp)
<del>
<del>[HTMLElementReference](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a)
<ide><path>mock-guide/english/html/attributes/href/index.md
<del>---
<del>title: Href
<del>---
<del>## Href
<del>
<del>Hypertext Reference (HREF) is an HTML attribute that you use to specify a link destination or Uniform Resource Locator (URL). Most commonly you will see the HREF attribute paired with an anchor tag `<a>`.
<del>
<del>The HREF attribute gets the exact meaning of a link depending on the element that is using it. For instance when using with the `<a>` tag, it is referencing the location of an object express as a URL. When using the HREF attribute with the `<image>` tag, the HREF attribute is referencing the URL of the image to render.
<del>
<del>### Examples:
<del>Link to Google's Homepage:
<del>
<del> -> The text "Visit Google's Homepage acts like the link to the Homepage
<del>
<del>```html
<del><a href="https://www.google.com">Visit Google’s Homepage</a>
<del>```
<del>
<del>Image as an Link:
<del>
<del> -> Google Logo that refers to Google's Homepage
<del>
<del>```html
<del><a href="https://www.google.com">
<del><img border="0" alt="Google" src="https://www.google.com/logos/doodles/2015/googles-new-logo-5078286822539264.3-hp2x.gif" width="100" height="100">
<del>```
<del>
<del>Tags that use HREF:
<del>```html
<del><a>
<del><area>
<del><base>
<del><cursor>
<del><discard>
<del><feImage>
<del><hatch>
<del><image>
<del><link>
<del><mesh>
<del><meshgradient>
<del><mpath>
<del><pattern>
<del><script>
<del><textPath>
<del><use>
<del>```
<del>
<del>#### More Information:
<del><!-- Please add any articles you think might be helpful to read before writing the article -->
<del><a href='https://tomayko.com/blog/2008/wtf-is-an-href-anyway' target='_blank' rel='nofollow'>WTF is a href anyway</a>
<del><a href='https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/href' target='_blank' rel='nofollow'>MDN</a>
<ide><path>mock-guide/english/html/attributes/img-align-attribute/index.md
<del>---
<del>title: Img Align Attribute
<del>---
<del>## Img Align Attribute
<del>
<del>The align attribute of an image specifies where the image should be aligned according to the surrounding element.
<del>
<del>Attribute Values:
<del>right - Align image to the right
<del>left - Align image to the left
<del>top - Align image to the top
<del>bottom - Align image to the bottom
<del>middle - Align image to the middle
<del>
<del>For example:
<del>```html
<del><!DOCTYPE html>
<del><html lang="en">
<del> <head>
<del> <title>Img Align Attribute</title>
<del> </head>
<del><body>
<del> <p>This is an example. <img src="image.png" alt="Image" align="middle"> More text right here
<del> <img src="image.png" alt="Image" width="100"/>
<del> </body>
<del></html>
<del>```
<del>We can also align in right if we want:
<del>```html
<del><p>This is another example<img src="image.png" alt="Image" align="right"></p>
<del>```
<del>**Please note the align attribute is not supported in HTML5, and you should use CSS instead. However, it is still supported by all the major browsers.**
<del>
<del>
<del>#### More Information:
<del><a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img" target="_blank">MDN article on the img tag and its attributes<a>
<ide><path>mock-guide/english/html/attributes/img-src-attribute/index.md
<del>---
<del>title: Img Src Attribute
<del>---
<del>## Img Src Attribute
<del>The `<img src>` attribute refers to the source of the image you want to display. The `img` tag will not display an image without the `src` attribute. However, if you set the source to the location of the image, you can display any image.
<del>
<del>There is an image of the freeCodeCamp Logo located at `https://avatars0.githubusercontent.com/u/9892522?v=4&s=400`
<del>
<del>You can set that as the image using the `src` attribute.
<del>
<del>```html
<del><html>
<del> <head>
<del> <title>Img Src Attribute Example</title>
<del> </head>
<del> <body>
<del> <img src="https://avatars0.githubusercontent.com/u/9892522?v=4&s=400">
<del> </body>
<del></html>
<del>```
<del>
<del>The above code displays like this:
<del>
<del>
<del>
<del>The `src` attribute is supported by all browsers.
<del>
<del>You can also have a locally hosted file as your image.
<del>
<del>For example, `<img src="images/freeCodeCamp.jpeg>` would work if you had a folder called `images` which had the `freeCodeCamp.jpeg` inside, as long as the 'images' folder was in the same location as the `index.html` file.
<del>
<del>`../files/index.html`
<del>
<del>`..files/images/freeCodeCamp.jpeg`
<del>
<del>
<del>### More Information:
<del>
<del>- [HTML.com](https://html.com/attributes/img-src/)
<del>- [W3 Schools](https://www.w3schools.com/tags/att_img_src.asp)
<ide>\ No newline at end of file
<ide><path>mock-guide/english/html/attributes/img-width-attribute/index.md
<del>---
<del>title: Img Width Attribute
<del>---
<del>## Img Width Attribute
<del>
<del>The HTML 'width' attribute refers to the width of an image. The value in the quotations is the amount of pixels.
<del>
<del>For example, if you already have a link to an image set up via the `src` attribute you can add the width attribute like so:
<del>```html
<del><!DOCTYPE html>
<del><html lang="en">
<del> <head>
<del> <title>Img Width Attribute</title>
<del> </head>
<del> <body>
<del> <img src="image.png" alt="Image" width="100"/>
<del> </body>
<del></html>
<del>```
<del>
<del>In the code snippet above there is an image tag and the image is set to a width of 100 pixels. `width="100"`
<del>
<del>#### More Information:
<del><a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img" target="_blank">MDN article on the img tag<a>
<ide><path>mock-guide/english/html/attributes/index.md
<del>---
<del>title: Attributes
<del>---
<del># HTML Attributes
<del>
<del>HTML elements can have attributes, which contain additional information about the element.
<del>
<del>HTML attributes generally come in name-value pairs, and always go in the opening tag of an element. The attribute name says what type of information you're providing about the element, and the attribute value is the actual information.
<del>
<del>For example, an anchor (`<a>`) element in an HTML document creates links to other pages, or other parts of the page. You use the `href` attribute in the opening `<a>` tag to tell the browser where the link sends a user.
<del>
<del>Here's an example of a link that sends users to freeCodeCamp's home page:
<del>
<del>```html
<del><a href="www.freecodecamp.org">Click here to go to freeCodeCamp!</a>
<del>```
<del>
<del>Notice that the attribute name (`href`) and value ("www.freeCodeCamp.org") are separated with an equals sign, and quotes surround the value.
<del>
<del>There are many different HTML attributes, but most of them only work on certain HTML elements. For example, the `href` attribute won't work if it's placed in an opening `<h1>` tag.
<del>
<del>In the example above, the value supplied to the `href` attribute could be any valid link. However, some attributes only have a set of valid options you can use, or values need to be in a specific format. The `lang` attribute tells the browser the default language of the contents in an HTML element. The values for the `lang` attribute should use standard language or country codes, such as `en` for English, or `it` for Italian.
<del>
<del>## Boolean Attributes
<del>
<del>Some HTML attributes don't need a value because they only have one option. These are called Boolean attributes. The presence of the attribute in a tag will apply it to that HTML element. However, it's okay to write out the attribute name and set it equal to the one option of the value. In this case, the value is usually the same as the attribute name.
<del>
<del>For example, the `<input>` element in a form can have a `required` attribute. This requires users to fill out that item before they can submit the form.
<del>
<del>Here are examples that do the same thing:
<del>
<del>```html
<del><input type="text" required >
<del><input type="text" required="required" >
<del>```
<del>
<del>## Other Resources
<del>
<del>[HTML links](#)
<del>[Href Attribute](#)
<del>[Lang Attribute](#)
<del>[HTML Input Element](#)
<del>[Required Attribute](#)
<ide>\ No newline at end of file
<ide><path>mock-guide/english/html/attributes/input-checked-attribute/index.md
<del>---
<del>title: Input Checked Attribute
<del>---
<del>## Input Checked Attribute
<del>
<del>The checked attribute is a boolean attribute.
<del>
<del>When present, it specifies that an <input> element should be pre-selected (checked) when the page loads.
<del>
<del>The checked attribute can be used with <input type="checkbox"> and <input type="radio">.
<del>
<del>The checked attribute can also be set after the page load, through JavaScript.
<del>
<del>## Take a look at the following example:
<del>```html
<del><form action="/action_page.php">
<del> <input type="checkbox" name="vehicle" value="Bike"> I have a bike<br>
<del> <input type="checkbox" name="vehicle" value="Car" checked> I have a car<br>
<del> <input type="submit" value="Submit">
<del></form>
<del>```
<del>
<del>In the example above when the web page is loaded by default the first checkbox will come automatically selected due to the checked attribute.
<ide><path>mock-guide/english/html/attributes/input-type-attribute/index.md
<del>---
<del>title: Input Type Attribute
<del>---
<del>## Input Type Attribute
<del>
<del>The input type attribute specifies the type of the input the user should put in your form.
<del>
<del>### text
<del>One line of a text.
<del>```html
<del> <form>
<del> <label for="login">Login:</label>
<del> <input type="text" name="login">
<del> </form>
<del>```
<del>
<del>### password
<del>One line of a text. Text is automatically displayed as a series of dots or asterisks (depends on the browser and OS).
<del>```html
<del> <form>
<del> <label for="password">Password:</label>
<del> <input type="password" name="password">
<del> </form>
<del>```
<del>
<del>### email
<del>The HTML checks if the input matches the e-mail address format (something@something).
<del>```html
<del> <form>
<del> <label for="email">E-mail address:</label>
<del> <input type="email" name="email">
<del> </form>
<del>```
<del>
<del>### number
<del>Allow only numeric input. You can also specify the min and max value allowed. The example below check that the input is number between 1 and 120.
<del>```html
<del> <form>
<del> <label for="age">Age:</label>
<del> <input type="number" name="age" min="1" max="120">
<del> </form>
<del>```
<del>
<del>### radio
<del>Only one option can be selected by the user. The group of radio buttons need to have the same name attribute. You can select automatically one option by using `checked` property (in example below the value Blue is selected).
<del>```html
<del> <form>
<del> <label><input type="radio" name="color" value="red">Red</label>
<del> <label><input type="radio" name="color" value="green">Green</label>
<del> <label><input type="radio" name="color" value="blue" checked>Blue</label>
<del> </form>
<del>```
<del>### checkbox
<del>User can select zero or more options from the group of checkboxes. You can use `checked` property here too for one or more options.
<del>```html
<del> <form>
<del> <label><input type="checkbox" name="lang" value="english">english</label>
<del> <label><input type="checkbox" name="lang" value="spanish">spanish</label>
<del> <label><input type="checkbox" name="lang" value="french">french</label>
<del> </form>
<del>```
<del>### button
<del>The input is displayed as button, the text which should be displayed in the button is in value attribute.
<del>```html
<del> <form>
<del> <input type="button" value="click here">
<del> </form>
<del>```
<del>### submit
<del>Displays the submit button. The text which should be displayed in the button is in value attribute. After clicking on the button, the HTML do the validation and if it passes, the form is submitted.
<del>```html
<del> <form>
<del> <input type="submit" value="SUBMIT">
<del> </form>
<del>```
<del>
<del>### reset
<del>Displays the reset button. The text which should be displayed in the button is in value attribute. After clicking on the button, all values from the form are deleted.
<del>```html
<del> <form>
<del> <input type="reset" value="CANCEL">
<del> </form>
<del>```
<del>
<del>There are more types elements. For more information visit [MSDN]("https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input") or [w3schools]("https://www.w3schools.com/Html/html_form_input_types.asp").
<del>
<ide><path>mock-guide/english/html/attributes/input/index.md
<del>---
<del>title: Input
<del>---
<del>## Input
<del>The HTML `<input>` tag is used within a form to declare an input element.
<del>It allows the user to enter data.
<del>
<del>## Example
<del>```html
<del><!DOCTYPE html>
<del><html>
<del>
<del> <head>
<del> <title>HTML input Tag</title>
<del> </head>
<del>
<del> <body>
<del> <form action = "/cgi-bin/hello_get.cgi" method = "get">
<del> First name:
<del> <input type = "text" name = "first_name" value = "" maxlength = "100" />
<del> <br />
<del>
<del> Last name:
<del> <input type = "text" name = "last_name" value = "" maxlength = "100" />
<del> <input type = "submit" value = "Submit" />
<del> </form>
<del> </body>
<del>
<del></html>
<del>```
<del>
<del>In the above example, there are two input fields which ask the user to enter their first and last names according to the labels specified. The submit `<button type="submit">` is another type of input which is used to take the data entered by the user into the form and send it to some other location specified in the code.
<del>
<del>#### More Information:
<del><a href="https://www.youtube.com/watch?v=qJ9ZkxmVf5s">Youtube</a>
<del>
<del>
<del>## Input
<del>The HTML `<input>` tag is of many types to enter data. Some of them are:
<del>Type:Text(This is the most common type which is used to create general textboxes)
<del>Type:Password(This type is used for creation of password feilds)
<del>Type:Hidden(This is a special type of Input that is not shown to the user but it is used for passing information from one page to another while using <a href> tag)
<ide><path>mock-guide/english/html/attributes/lang/index.md
<del>---
<del>title: Lang
<del>---
<del>## Lang
<del>
<del>In HTML, Lang tag is used to declare the language of the whole or a part of a web page.
<del>
<del>### Examples
<del>
<del>```html
<del><html lang="en">
<del></html>
<del>```
<del>
<del>The lang attribute can also be used to specify the language of a specific element:
<del>
<del>```html
<del><p lang="hi">
<del> फ्री कोड कैंप
<del></p>
<del>```
<del>
<del>In the above example, "hi" denotes the Hindi language. Similarly, you can use "en" for English, "es" for Spanish, "fr" for French and so on.
<del>
<del>Refer to [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) for the appropriate two-digit Language code.
<ide>\ No newline at end of file
<ide><path>mock-guide/english/html/attributes/links/index.md
<del>---
<del>title: Links
<del>---
<del>## Links
<del>
<del>This is a stub. <a href='https://github.com/freeCodeCamp/guides/tree/master/src/pages/html/attributes/links/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>.
<del>
<del><a href='https://github.com/freeCodeCamp/freeCodeCamp/blob/master/docs/style-guide-for-guide-articles.md' target='_blank' rel='nofollow'>This quick style guide will help ensure your pull request gets accepted</a>.
<del>
<del><!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
<del>Links are used everywhere on the web, with the purpose if directing users to various content items. They're usually indicated by your cursor turning into a hand icon. Links can be text, images or other elements contained within your HTML or webpage.
<del>
<del>You use an ```code <a>``` tag or anchor element to define your link, which also also needs a destination address that you'll access with the ```code href``` attribute. Here's a snippet that makes the phrase 'the freeCodeCamp Guide' a link:
<del>
<del>```html
<del><a href="https://guide.freecodecamp.org">the freeCodeCamp Guide</a>
<del>```
<del>
<del>If you'd like your link to open in a new tab, you'll use the ```code target``` attribute along with the ```code "_blank"``` value inside your opening ```code <a>``` tag. That looks like this:
<del>
<del>```html
<del><a href="https://guide.freecodecamp.org" target="_blank">the freeCodeCamp Guide</a>
<del>```
<del>
<del>When you need to guide users to a specific part of your webpage, let's assume the very bottom, you first need to assign the hash ```code #``` symbol to the ```code href``` attribute, like this
<del>
<del>```html
<del><a href="#footer>More about us<a/>
<del>```
<del>
<del>you'll then need to use an ```code id``` attribute in the element you want to direct your user to - in this case the ```code <footer>``` at the bottom of the webpage.
<del>
<del>```html
<del><footer id="footer">Powered by freeCodeCamp</footer>
<del>```
<del>
<del>#### More Information:
<del><!-- Please add any articles you think might be helpful to read before writing the article -->
<del><a href="https://www.w3schools.com/html/html_links.asp" target="_blank">w3sschools - HTML Links</a>
<del>
<del>
<del>
<del>
<del>
<del>
<del>
<del>
<del>
<ide><path>mock-guide/english/html/attributes/onclick-event-attribute/index.md
<del>---
<del>title: Onclick Event Attribute
<del>---
<del>
<del>## Onclick Event Attribute
<del>
<del>When the element is clicked fires a event.
<del>
<del>It works just like the *onclick method* or `addEventListener('click')` to the element.
<del>
<del>```html
<del><element onclick="event"></element>
<del>```
<del>> `event` can be a JavaScript function or you can write raw JavaScript
<del>
<del>### Examples
<del>
<del>Changing the color of a ```<p>``` element when clicked
<del>
<del>```html
<del><p id="text" onclick="redify()">Change my color</p>
<del>
<del><script>
<del>function redify(){
<del> let text = document.querySelector('#text');
<del> text.style.color = "red";
<del>}
<del></script>
<del>```
<del>
<del>Using raw JavaScript onclick attribute:
<del>
<del>```html
<del><button onclick="alert('Hello')">Hello World</button>
<del>```
<del>
<del>#### More Information:
<del>
<del>- [MDN](https://developer.mozilla.org/pt-BR/docs/Web/API/GlobalEventHandlers/onclick)
<ide><path>mock-guide/english/html/attributes/p-align-attribute/index.md
<del>---
<del>title: P Align Attribute
<del>---
<del>## P Align Attribute
<del>
<del>### Important
<del>This attribute is not supported in HTML5. It is recommended to use the [`text-align` CSS property](https://guide.freecodecamp.org/css/text-align).
<del>
<del>To align the text inside a `<p>` tag, this attribute will help.
<del>
<del>### Syntax
<del>```html
<del><p align="position">Lorem Ipsum...</p>
<del>```
<del>
<del>### Attributes
<del>
<del>- **left** - Text aligns to the left
<del>- **right** - Text aligns to the right
<del>- **center** - Text aligns to the center
<del>- **justify** - All lines of text have equal width
<del>
<del>### Example
<del>
<del>```html
<del><html>
<del><body>
<del><p align="center">Paragraph align attribute example</p>
<del></body>
<del></html>
<del>```
<del>
<del>#### More Information:
<del>* [CSS `text-align`](https://guide.freecodecamp.org/css/text-align)
<del>* [W3 - HTML 4.01 Specification](https://www.w3.org/TR/html401/struct/text.html#h-9.3.1)
<del>* [MDN - CSS Text Align](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align)
<ide><path>mock-guide/english/html/attributes/placeholder-attribute/index.md
<del>---
<del>title: Placeholder Attribute
<del>---
<del>## Placeholder Attribute | HTML5
<del>
<del>Specifies a short hint that describes the expected value of an `<input>` or `<textarea>` form control.
<del>
<del>The placeholder attribute must not contain carriage returns or line-feeds.
<del>
<del>NOTE: Do not use the placeholder attribute instead of a <label> element, their purposes are different. The <label> attribute describes the role of the form element (i.e. it indicates what kind of information is expected), and the placeholder attribute is a hint about the format that the content should take.
<del>
<del>### Example
<del>
<del>Input Example
<del>
<del>```html
<del><form>
<del> <input type="text" name="fname" placeholder="First Name">
<del> <input type="text" name="lname" placeholder="Last Name">
<del></form>
<del>```
<del>
<del>Textarea Example
<del>
<del>```html
<del><textarea placeholder="Describe yourself here..."></textarea>
<del>```
<del>
<del>### Compatibility
<del>
<del>This is an HTML5 Attribute.
<del>
<del>#### More Information:
<del>
<del>[HTML placeholder Attribute](https://www.w3schools.com/tags/att_placeholder.asp) on w3schools.com
<ide>\ No newline at end of file
<ide><path>mock-guide/english/html/attributes/required/index.md
<del>---
<del>title: Required
<del>---
<del>## Required
<del>
<del>
<del>The HTML required attribute is used in an input element to make the input field in a form required to submit the form.
<del>If the user does not fill in the input field the form will not submit and it will give a message asking the user to fill out the field.
<del>The `required` attribute is applicable to `<input>`, `<select>`, `<textarea>`.
<del>
<del>For example:
<del>```html
<del><!DOCTYPE html>
<del><html>
<del> <head>
<del> <title>HTML Required Attribute</title>
<del> </head>
<del> <body>
<del> <form action="/">
<del> Text Field: <input type="text" name="textfield" required>
<del> <input type="submit" value="Submit">
<del> </form>
<del> </body>
<del></html>
<del>```
<del>
<del>Select Example:
<del>```html
<del><form action="/action.php">
<del><select required>
<del> <option value="">None</option>
<del> <option value="volvo">Volvo</option>
<del> <option value="saab">Saab</option>
<del> <option value="mercedes">Mercedes</option>
<del> <option value="audi">Audi</option>
<del></select>
<del></form>
<del>```
<del>Text Area Example:
<del>```html
<del><form action="/action.php">
<del> <textarea name="comment" required></textarea>
<del> <input type="submit">
<del></form>
<del>```
<del>
<del>Simply add `required` to an input element
<del>
<del>#### More Information:
<del><a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input" target="_blank">MDN article on the input element</a>
<del>
<ide><path>mock-guide/english/html/attributes/role-attribute/index.md
<del>---
<del>title: Role Attribute
<del>---
<del>## Role Attribute
<del>
<del>The `role` attribute, describes the role of an element to programs that can make use of it, such as screen readers or magnifiers.
<del>
<del>Usage Example:
<del>```html
<del><a href="#" role="button">Button Link</a>
<del>```
<del>Screen Readers will read this element as "button" instead of "link".
<del>
<del>There are four categories of roles:
<del>- Abstract Roles
<del>- Widget Roles
<del>- Document Structure Roles
<del>- Landmark Roles
<del>
<del>For full list of existing roles, refer to [aria roles documentation](https://www.w3.org/TR/wai-aria/roles).
<ide><path>mock-guide/english/html/attributes/script-src-attribute/index.md
<del>---
<del>title: Script Src Attribute
<del>---
<del>## Script Src Attribute
<del>
<del>The 'src' attribute in a <script></script> tag is the path to an external file or resource that you want to link to your HTML document.
<del>
<del>For example, if you had your own custom JavaScript file named 'script.js' and wanted to add its functionality to your HTML page, you would add it like this:
<del>
<del>```html
<del><!DOCTYPE html>
<del><html lang="en">
<del> <head>
<del> <title>Script Src Attribute Example</title>
<del> </head>
<del> <body>
<del>
<del> <script src="./script.js"></script>
<del> </body>
<del></html>
<del>```
<del>
<del>This would point to a file named 'script.js' that is in the same directory as the .html file. You can also link to other directories by using '..' in the file path.
<del>
<del>```html
<del><script src="../public/js/script.js"></script>
<del>```
<del>
<del>This jumps up one directory level then into a 'public' directory then to a 'js' directory and then to the 'script.js' file.
<del>
<del>You can also use the 'src' attribute to link to external .js files hosted by a third party. This is used if you don't want to download a local copy of the file. Just note that if the link changes or network access is down, then the external file you are linking to won't work.
<del>
<del>This example links to a jQuery file.
<del>
<del>```html
<del><script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script>
<del>```
<del>
<del>#### More Information:
<del>
<del><a href='https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#attr-src' target='_blank' rel='nofollow'>MDN Article on the HTML <script> tag</a>
<del>
<ide><path>mock-guide/english/html/attributes/table-border-attribute/index.md
<del>---
<del>title: Table Border Attribute
<del>---
<del>## Table Border Attribute
<del>
<del>The `<table>` tag border attribute is a way to order a border to a HTML Table. The supported values are `0` (no border) and `1` (border). The border attribute is not supported in HTML 5 the latest version of HTML. It's recommended to use CSS to add a border to a table in HTML 5.
<del>
<del>#### More Information:
<del>* [MDN - HTML Attribute Reference](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes)
<del>* [MDN - CSS Border](https://developer.mozilla.org/en-US/docs/Web/CSS/border)
<ide><path>mock-guide/english/html/block-and-inline-elements/index.md
<del>---
<del>title: Block and Inline Elements
<del>---
<del>## Block and Inline Elements
<del>
<del>Let us understand them using below examples :
<del>
<del>#### Code Sample with Output :
<del>
<del>
<del>#### Block-Level Element :
<del>A Block-level element occupies the entire space of the parent(container) such as `<div>` and `<p>` in the example .
<del>
<del>Note that both `<div>` and `<p>` start from a new line each time, forming a **block-like** structure. Block-level elements begin on new lines.
<del>
<del>
<del>Common **block-level elements** are `<div>`,`<p>`,`<article>`,`<section>`,`<figure>`,`<footer>` etc.
<del>
<del>
<del>
<del>#### Inline Element :
<del>Inline as the name says "included as a part of the main text and not as a separate section". Inline elements occupy the space as needed within the space defined by the main element. Unlike block-level elements, they do not begin on new lines.
<del>
<del>Some of the **inline elements** are `<a>`,`<span>`,`<img>`,`<code>`,`<cite>`,`<button>`,`<input>` etc.
<del>
<del>#### Code Sample with Output :
<del>
<del>
<del>***Note*** : Block-level elements may contain other block-level elements or inline elements. Inline elements **cannot** contain block-level elements.
<del>
<del>#### Changes In HTML5
<del>
<del>While an understanding of block and inline elements is still relevant, you should be aware that these terms were defined in prior versions of the HTML specification. In HTML5, a more complex set of "content categories" replaces block-level and inline elements. Block-level elements are largely placed in the "flow content" category in HTML5, while inline elements correspond to the "phrasing content" catagory. For more information on the new content categories in HTML5, including flow content and phrasing content, refer to the <a href = "https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories">Content categories page on the Mozilla Developer Network.</a>
<del>
<del>#### More Information:
<del>Please refer <a href='https://developer.mozilla.org/en-US/docs/Web/HTML/Block-level_elements#Block-level_vs._inline' target='_blank' rel='nofollow'>Mozilla Docs</a>
<del>
<ide><path>mock-guide/english/html/comments-in-html/index.md
<del>---
<del>title: Comments in HTML
<del>---
<del>## Comments in HTML
<del>
<del>The comment tag is an element used to leave notes, mostly related to the project or the website. This tag is frequently used to explain something in the code or leave some recommendations about the project. The comment tag also makes it easier for the developer to come back and understand the code he's written at a later stage. Comments can also used for commenting out lines of code for debugging purposes.
<del>
<del>It is good practice to add comments to your code, especially when working with a team or at a company.
<del>
<del>Comments are started with `<!--` and ended with `-->`, and can span multiple lines. They can contain code or text, and won't appear on the front-end of the website when a user visits a page. You can view comments through the Inspector Console, or by viewing Page Source.
<del>
<del>### Example
<del>```html
<del>
<del><!-- You can comment out a large number of lines like this.
<del>Author: xyz
<del>Date: xx/xx/xxxx
<del>Purpose: abc
<del>-->
<del>Read more: https://html.com/tags/comment-tag/#ixzz4vtZHu5uR
<del><!DOCTYPE html>
<del><html>
<del> <body>
<del> <h1>FreeCodeCamp web</h1>
<del> <!-- Leave some space between the h1 and the p in order to understand what are we talking about-->
<del> <p>FreeCodeCamp is an open-source project that needs your help</p>
<del> <!-- For readability of code use proper indentation -->
<del> </body>
<del></html>
<del>```
<del>## Conditional Comments
<del>Conditional Comments defines some HTML tags to be excuted when a certain codition is fullfilled.
<del>
<del>Conditional Comments are only recognised by Internet Explorer Version 5 through to Version 9 (IE5 - IE9).
<del>
<del>### Example
<del>```html
<del><!DOCTYPE html>
<del><html>
<del> <body>
<del> <!--[if IE 9]>
<del> <h1>FreeCodeCamp web</h1>
<del> <p>FreeCodeCamp is an open-source project that needs your help</p>
<del> <![endif]-->
<del> </body>
<del></html>
<del>```
<del>
<del>### IE Conditional Comments
<del>
<del>These comments are only available in Internet Explorer and can be used up to IE9. In the current times, there is a good change you will never see them, but it is good to know about their existance. Conditional Comments are a way to serve a different experience for different client browsers. For example:
<del>
<del>```html
<del><!--[if lt IE 9]> <p>Your browser is lower then IE9</p> <![endif]-->
<del><!--[if IE 9]> <p>Your browser is IE9</p> <![endif]-->
<del><!--[if gt IE 9]> <p>Your browser is greater then IE9</p> <![endif]-->
<del>```
<del>
<del>[About conditional comments](https://msdn.microsoft.com/en-us/library/ms537512(v=vs.85).aspx)
<ide><path>mock-guide/english/html/css-classes/index.md
<del>---
<del>title: CSS Classes
<del>---
<del>## CSS Classes
<del>
<del>Classes are an efficient way of grouping HTML elements so that they can share the same styles. CSS (Cascading Style Sheets) classes can be used to arrange and decorate web page elements.
<del>
<del>When writing HTML, you can add classes to an element. Just add the attribute `class="myclass"` to the element. Multiple elements can have the same class, and one element can have multiple classes. You can assign multiple classes to an element by adding all the desired class names separated by a space to the `class` attribute in HTML.
<del>
<del>```html
<del><h1 class="super-man other-class third-class">"Here I come to save the day!"</h1>
<del><p>is a popular catchphrase that <span class="super-man">Super Man</span> often said.</p>
<del>```
<del>
<del>You can then style these elements with CSS. Classes are referenced with period (.) before them in CSS, but you should not put periods in your HTML.
<del>
<del>```css
<del>.super-man {
<del> color: red;
<del> background-color: blue;
<del>}
<del>```
<del>
<del>This code will give s blue background and red text color to all the elements which have the `super-man` class.
<del>[View this example on CodePen](https://codepen.io/Tlandis/pen/RLvomV).
<del>
<del>You can also declare more than one class to your element, like:
<del>
<del>```html
<del>
<del><div class="ironMan alfred">
<del> We're going to save you.
<del></div>
<del>
<del>```
<del>
<del>Then in your css file:
<del>
<del>```css
<del>
<del>.ironMan{
<del> color:red;
<del>}
<del>
<del>.alfred{
<del> background-color: black;
<del>}
<del>
<del>```
<del>
<del>**Note:** Class names are traditionally all lowercase, with each word in a multi-word class name separated by hyphens (e.g. "super-man").
<del>
<del>You can also combine classes in the same line:
<del>```css
<del>.superMan .spiderMan {
<del> color: red;
<del> background-color: blue;
<del>}
<del>```
<del>
<del>You can see the result of the above code [here](https://codepen.io/Tlandis/pen/RLvomV). Learn how to combine css classes using selectors [here](https://www.w3schools.com/css/css_combinators.asp).
<del>
<del>#### More Information:
<del>
<del><!-- Please add any articles you think might be helpful to read before writing the article -->
<del>
<del>- [CSS Class Selector, w3 schools](https://www.w3schools.com/cssref/sel_class.asp)
<del>- [HTML Classes, w3 Schools](https://www.w3schools.com/html/html_classes.asp)
<del>- [css-tricks](https://css-tricks.com/how-css-selectors-work/)
<del>- [How to Code in HTML5 and CSS3](http://howtocodeinhtml.com/chapter7.html)
<del>- [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/class)
<ide><path>mock-guide/english/html/doctype-declaration/index.md
<del>---
<del>title: Doctype Declaration
<del>---
<del>## Doctype Declaration
<del>
<del>The HTML document type declaration, also known as `DOCTYPE`, is the first line of code required in every HTML or XHTML document. The `DOCTYPE` declaration is an instruction to the web browser about what version of HTML the page is written in. This ensures that the web page is parsed the same way by different web browsers.
<del>
<del>In HTML 4.01, the `DOCTYPE` declaration refers to a document type definition (DTD). A DTD defines the structure and the legal elements of an XML document. Because HTML 4.01 was based on the Standard Generalised Markup Language (SGML), referring to a DTD in the `DOCTYPE` declaration was necessary.
<del>
<del>Additionally, doctypes for HTML 4.01 required the declaration of either `strict`, `transitional`, or `frameset` DTD, each with a different use case as outlined below.
<del>
<del>- **Strict DTD**: Used for web pages that *exclude* attributes and elements that W3C expects to phase out as CSS support grows
<del>- **Transitional DTD**: Used for web pages that *include* attributes and elements that W3C expects to phase out as CSS support grows
<del>- **Frameset DTD**: Used for web pages with frames
<del>
<del>In contrast, the declaration of HTML5 `DOCTYPE` is much simpler: it no longer requires a reference to DTDs as it is no longer based on SGML. See the examples below for a comparison between HTML 4.01 and HTML5 `DOCTYPE`s.
<del>
<del>### Examples
<del>
<del>Doctype syntax for HTML5 and beyond:
<del>```html
<del><!DOCTYPE html>
<del>```
<del>
<del>Doctype syntax for strict HTML 4.01:
<del>```html
<del><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<del>```
<del>
<del>Doctype syntax for transitional HTML 4.01:
<del>```html
<del><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<del>```
<del>
<del>
<del>Doctype syntax for frameset HTML 4.01:
<del>```html
<del><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<del>```
<del>
<del>## History
<del>
<del>During the formative years of HTML, web standards were not agreed upon yet. Browser vendors would build new features in whatever way they wanted. There was little concern for competing browsers. The result was that web developers had to choose a browser to develop their sites for. This meant that sites would not render well in unsupported browsers. This situation could not continue.
<del>
<del>The W3C (World Wide Web Consortium) wrote a set of web standards to handle this situation. All browser vendors and web developers should adhere to these standards. This would ensure that websites would render well across browsers. The changes required by the standards were quite different from some existing practices. Adhering to them would break existing non standards compliant websites.
<del>
<del>To handle this problem, vendors began programming rendering modes in to their browsers. Web developers would need to add a doctype declaration to the top of an HTML document. The doctype declaration would tell the browser which rendering mode to use for that document. Three separate rendering modes were generally available across browsers. **Full standards mode** renders pages according to the W3C web standards. **Quirks mode** renders pages in a non standards compliant way. **Almost standards mode** is close to full standards mode, but features support for a small number of quirks.
<del>
<del>In the modern age of HTML5, web standards are fully implemented in all major browsers. Web sites are generally developed in a standards compliant way. Because of this the HTML5 doctype declaration only exists to tell the browser to render the document in full standards mode.
<del>
<del>## Usage
<del>
<del>The Doctype Declaration must be the very first line of code in an HTML document, aside from comments, which can go before it if needed. For modern HTML5 documents the doctype declaration should be as follows:
<del>
<del>`<!DOCTYPE html>`
<del>
<del>#### More Information:
<del>
<del>While no longer in general use, there are several other doctype declaration types from previous versions of HTML. There are also specific versions for XML documents. To read more about these, and to see code examples for each, take a look at the [Wikipedia article](https://en.wikipedia.org/wiki/Document_type_declaration).
<del>
<del>[A note from the W3](https://www.w3.org/QA/Tips/Doctype)
<del>
<del>[MDN Glossary entry](https://developer.mozilla.org/en-US/docs/Glossary/Doctype)
<del>
<del>[W3Schools](https://www.w3schools.com/tags/tag_doctype.asp)
<del>
<del>[A quick explanation of "Quirks Mode" and "Standards Mode"](https://developer.mozilla.org/en-US/docs/Quirks_Mode_and_Standards_Mode)
<ide><path>mock-guide/english/html/elements/a-tag/index.md
<del>---
<del>title: A Tag
<del>---
<del>## A Tag
<del>
<del>The `<a>` tag or _anchor_ element creates a hyperlink to another page or file. In order to link to a different page or file the `<a>` tag must also contain a `href` attribute, which indicates the link's destination.
<del>
<del>The text between the opening and closing `<a>` tags becomes the link.
<del>
<del>By default, a linked page is displayed in the current browser window unless another target is specified.
<del>
<del>#### Example:
<del>
<del>```html
<del> <a href= "https://guide.freecodecamp.org/">freeCodeCamp</a>
<del>```
<del>
<del>An image can also be turned into a link by enclosing the `<img>` tag in an `<a>` tag.
<del>
<del>#### Example:
<del>
<del>```html
<del> <a href= "https://guide.freecodecamp.org/"><img src="logo.svg"></a>
<del>```
<del>
<del>It is also possible to determine the target of the `<a>` tag. This is done using the `target` attribute. The `target` attribute has the following values available `_blank|_self|_parent|_top|framename`.
<del>
<del>`_blank`: Opens the link in a new tab or a new window depending on the user's preferences.
<del>`_self`: Opens the link in same frame (default behaviour).
<del>`_parent`: Opens the link in the parent frame, for example when the user clicks a link in an iframe.
<del>`_top`: Opens the link in the full body of the window.
<del>`framename`: Opens the link in the specified frame.
<del>
<del>#### Example:
<del>
<del>```html
<del> <a href= "https://guide.freecodecamp.org/" target="_blank">freeCodeCamp</a>
<del>```
<del><a href= "https://guide.freecodecamp.org/" target="_blank">freeCodeCamp</a><br>
<del>This link is created in the same way as the example code block suggests. Click it to see how it works.
<del>#### More Information:
<del>
<del>- <a href='https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a' target='_blank' rel='nofollow'>The HTML <a> element: MDN</a>
<del>- <a href='https://www.w3schools.com/tags/tag_a.asp' target='_blank' rel='nofollow'>A tag: w3schools</a>
<del>- <a href='http://htmlreference.io/element/a/' target='_blank' rel='nofollow'>A tag: htmlreference.io</a>
<del>
<ide><path>mock-guide/english/html/elements/abbr-tag/index.md
<del>---
<del>title: Abbr Tag
<del>---
<del>## Abbr Tag
<del>
<del>The `<abbr>` tag stands for 'abbreviation'. It can take `title` attribute, to explain the abbreviation.
<del>
<del>Example usage:
<del>```html
<del><abbr title="Free Code Camp">FCC</abbr>
<del>```
<del>
<del>#### More Information:
<del>
<del>- <a href='https://developer.mozilla.org/en-US/docs/Web/HTML/Element/abbr' target='_blank' rel='nofollow'>The HTML <abbr> element: MDN</a>
<del>- <a href='https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML/Advanced_text_formatting#Abbreviations' target='_blank' rel='nofollow'>Advanced Text Formatting: Abbreviations</a>
<ide><path>mock-guide/english/html/elements/address-tag/index.md
<del>---
<del>title: Address Tag
<del>---
<del>## Address Tag
<del>
<del>Bootstrap’s form controls expand on our Rebooted form styles with classes. Use these classes to opt into their customized displays for a more consistent rendering across browsers and devices.
<del>
<del>Be sure to use an appropriate type attribute on all inputs (e.g., email for email address or number for numerical information) to take advantage of newer input controls like email verification, number selection, and more.
<del>
<del>Here’s a quick example to demonstrate Bootstrap’s form styles. Keep reading for documentation on required classes, form layout, and more.
<del>
<del>#### Usage
<del>
<del>```html
<del><form>
<del> <div class="form-group">
<del> <label for="exampleInputEmail1">Email address</label>
<del> <input type="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" placeholder="Enter email">
<del> <small id="emailHelp" class="form-text text-muted">We'll never share your email with anyone else.</small>
<del> </div>
<del> <div class="form-group">
<del> <label for="exampleInputPassword1">Password</label>
<del> <input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password">
<del> </div>
<del> <div class="form-check">
<del> <label class="form-check-label">
<del> <input type="checkbox" class="form-check-input">
<del> Check me out
<del> </label>
<del> </div>
<del> <button type="submit" class="btn btn-primary">Submit</button>
<del></form>
<del>```
<ide><path>mock-guide/english/html/elements/area-tag/index.md
<del>---
<del>title: Area Tag
<del>---
<del>## Area Tag
<del>
<del>This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/html/elements/area-tag/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>.
<del>
<del><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>.
<del>
<del><!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
<del>
<del>#### More Information:
<del><!-- Please add any articles you think might be helpful to read before writing the article -->
<del>
<del>
<ide><path>mock-guide/english/html/elements/article-tag/index.md
<del>---
<del>title: Article Tag
<del>---
<del>## Article Tag
<del>
<del>The `<article>` tag represents self-contained content in a document. The article should be independent from the rest of page, intended to be distributable and reusable.
<del>
<del>The `<article>` tag was added in HTML5 and is supported by major browsers.
<del>
<del>### Example
<del>Here is an example of how to use article tag in webpage:
<del>
<del>```html
<del><article>
<del> <h1>FreeCodeCamp</h1>
<del> <p>
<del> Learn to code with a community of programmers and contribute to open source projects.
<del> </p>
<del></article>
<del>```
<del>
<del>#### More Information:
<del>
<del>[MDN](https://developer.mozilla.org/tr/docs/Web/HTML/Element/article)
<ide><path>mock-guide/english/html/elements/aside-tag/index.md
<del>---
<del>title: Aside Tag
<del>---
<del>## Aside Tag
<del>
<del>This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/html/elements/aside-tag/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>.
<del>
<del><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>.
<del>
<del><!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
<del>
<del>#### More Information:
<del><!-- Please add any articles you think might be helpful to read before writing the article -->
<ide><path>mock-guide/english/html/elements/audio-tag/index.md
<del>---
<del>title: Audio Tag
<del>---
<del>## Audio Tag
<del>
<del>The <***audio***> tag defines an audio element, that can be used to add audio media resource to an HTML document that will be played by native support for audio playback built into the browser rather than a browser plugin.
<del>
<del>The audio tag currently supports three file formats OGG, MP3 and WAV which can be added to your html as follows.
<del>##### Adding an OGG
<del>```
<del><audio controls>
<del> <source src="file.ogg" type="audio/ogg">
<del></audio>
<del>```
<del>##### Adding an MP3
<del>```
<del><audio controls>
<del> <source src="file.mp3" type="audio/mpeg">
<del></audio>
<del>```
<del>
<del>##### Adding a WAV
<del>```
<del><audio controls>
<del> <source src="file.wav" type="audio/wav">
<del></audio>
<del>```
<del>
<del>
<del>It may contain one or more audio sources, represented using the src attribute or the source element.
<del>
<del>##### Adding Multiple Audio Files
<del>```
<del><audio controls>
<del> <source src="file-1.wav" type="audio/wav">
<del> <source src="file-2.ogg" type="audio/ogg">
<del> <source src="file-3.mp3" type="audio/mpeg">
<del></audio>
<del>```
<del>#### Browser Support for different filetypes is as follows
<del>
<del>
<del>| Browser | Mp3 | Wav | Ogg|
<del>|:-------:|:---:|:---:|:---:|
<del>|Internet Explorer| Yes | No | No |
<del>|Google Chrome| Yes | Yes | Yes |
<del>|Mozilla Firefox | Yes | Yes | Yes |
<del>|Safari| Yes | Yes | No|
<del>|Opera | Yes | Yes | Yes
<del>
<del>### Supported Attributes
<del>
<del>| Attribute | Value | Description |
<del>|:-------:|:---:|:---:|
<del>|autoplay|autoplay|The audio will start playing as soon as it is ready|
<del>|controls|controls|audio will be displayed (such as a play/pause button etc)|
<del>|loop|loop|audio will start over again, every time it is finished|
<del>|muted|muted|audio output will be muted|
<del>|src|URL|Specifies the URL of the audio file|
<del>
<del>#### More Information:
<del>[https://www.w3schools.com/tags/tag_audio.asp](https://www.w3schools.com/tags/tag_audio.asp)
<del>[https://html.com/tags/audio/](https://html.com/tags/audio/)
<del>[https://html.com/tags/audio/#ixzz5Sg4QbtH8](https://html.com/tags/audio/#ixzz5Sg4QbtH8)
<ide><path>mock-guide/english/html/elements/b-tag/index.md
<del>---
<del>title: B Tag
<del>---
<del>
<del>## B Tag
<del>
<del>Formerly used to bold text the `<b>` tag is now known as the 'Bring Attention To element' tag. It should be used only to draw attention to the contents of the element.
<del>
<del>Most browsers will display text in bold type but you should not use it for this purpose, instead use CSS `font-weight` property for purely visual display reasons. If you wish to signify the elements content are of special importance use the `<strong>` tag instead.
<del>
<del>An appropriate use case is drawing attention to keywords in a text.
<del>
<del>### Example:
<del>```html
<del>Examples of extinct <b>fauna</b>include ...
<del>```
<del>This would appear as:
<del>
<del>Examples of extinct **fauna** include ...
<del>
<del>#### More Information:
<del><!-- Please add any articles you think might be helpful to read before writing the article -->
<del>
<del>1. [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/b)
<ide><path>mock-guide/english/html/elements/base-tag/index.md
<del>---
<del>title: Base Tag
<del>---
<del>## Base Tag
<del>
<del>This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/html/elements/base-tag/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>.
<del>
<del><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>.
<del>
<del><!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
<del>
<del>#### More Information:
<del><!-- Please add any articles you think might be helpful to read before writing the article -->
<ide><path>mock-guide/english/html/elements/blockquote-tag/index.md
<del>---
<del>title: Blockquote Tag
<del>---
<del>## Blockquote Tag
<del>
<del>### Purpose
<del>The HTML `<blockquote>` element breaks out a quote from the surrounding content. This allows the reader to clearly see the quotation as material attributed to it's original author.
<del>
<del>### Usage
<del>Just like the "H" tags send signals to a reader that the informaiton is important, the blockquote alerts a reader that the information they're reading is from an outside source. The `<blockquote>` tag can include A URL for the source of the quotation may be given using the cite attribute, while a text representation of the source can be given using the `<cite>` element.
<del>
<del>### Example
<del>```html
<del><blockquote cite="https://www.cnet.com/news/tim-cook-maintains-steve-jobs-beatles-business-model/">
<del> “My model for business is The Beatles. They were four guys who kept each other’s kind of negative tendencies in check.
<del> They balanced each other and the total was greater than the sum of the parts.
<del> That’s how I see business: great things in business are never done by one person, they’re done by a team of people.”
<del></blockquote>
<del><cite>Steve Jobs</cite>
<del>```
<del>
<del>#### More Information:
<del>
<del>[blockquote MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/blockquote)
<ide><path>mock-guide/english/html/elements/body-tag/index.md
<del>---
<del>title: Body Tag
<del>---
<del>
<del>## Body Tag
<del>
<del>The `<body>` tag contains the content for a webpage. Along with `<head>`, it is one of the two required elements of an HTML document. `<body>` must be the second child of an `<html>` element. There can only be one `<body>` element on a page.
<del>
<del>The `<body>` element should contain all of a page's content, including all display elements. The `<body>` element can also contain `<script>` tags, generally scripts that must be run after a page's content has been loaded.
<del>
<del>
<del>```html
<del><html>
<del> <head>
<del> <title>Document Titles Belong in the Head</title>
<del> </head>
<del> <body>
<del> <p>This paragraph is content. It goes in the body!</p>
<del> </body>
<del></html>
<del>```
<del>
<del>
<del>#### More Information:
<del><a href='https://developer.mozilla.org/en-US/docs/Web/HTML/Element/body' target='_blank' rel='nofollow'>MDN</a>
<ide><path>mock-guide/english/html/elements/br-tag/index.md
<del>---
<del>title: Br Tag
<del>---
<del>## Br Tag
<del>
<del>The `<br>` tag produces a line break in a text. This is useful for poems and addresses.
<del>
<del>### Example
<del>```html
<del><!DOCTYPE html>
<del><html>
<del> <body>
<del> Mozilla Foundation<br>
<del> 1981 Landings Drive<br>
<del> Building K<br>
<del> Mountain View, CA 94043-0801<br>
<del> USA
<del> </body>
<del></html>
<del>```
<del>
<del>#### More Information:
<del>
<del>[MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/br)
<del>
<del>[br tag: w3schools](https://www.w3schools.com/tags/tag_br.asp)
<ide><path>mock-guide/english/html/elements/button-tag/index.md
<del>---
<del>title: Button Tag
<del>---
<del>## Button Tag
<del>
<del>A `<button>` tag specifies a clickable button on the HTML document.
<del>Between the `<button>` tags, you can put content, like text or images. This is different from the button created using `<input>` tag, which only takes text as content.
<del>
<del>**Syntax:**
<del>
<del>`<button type="submit">Click Here!</button>`
<del>
<del>**Atributes:**
<del>
<del>Following are the associated attribute supported by HTML 4:
<del>
<del>| **Attributes** | **Value** | **What it does** |
<del>|---|---|---|
<del>| disabled | disabled | Disables the button |
<del>| name | name | Specifies a name for the button. The name is for referencing the button in HTML form, JS, etc. |
<del>| type | button or reset or submit | Sets the type of the button. A button with `button` type is a simple clickable button, with `submit` type it submits form-data, and with `reset` type it resets form-data. |
<del>| value | text | Sets an initial value for the button. This value is sent along with the form-data. |
<del>
<del>HTML 5 supports the following extra attributes:
<del>
<del>| **Attributes** | **Value** | **What it does** |
<del>|---|---|---|
<del>| autofocus | autofocus | Should the button automatically get focus when the page loads. For example, see Google. As the page gets loaded completely, the text-box get focus automatically. |
<del>| form | form_id | Specifies one or more forms the button belongs to. |
<del>| formaction | URL | Specifies where to send the form-data once the `submit` type button is pressed. |
<del>| formmethod | get or post | Specifies how to send the form-data. Only for `submit` type button. |
<del>| formtarget | `_blank` or `_self` or `_parent` or `_top` or framename | Specifies the location where the result is to be displayed after submitting form-data. |
<del>
<del>**Example:**
<del>
<del>```html
<del><html>
<del> <head>
<del> <title>Button Tag example</title>
<del> </head>
<del> <body>
<del> <form>
<del> First name:<br>
<del> <input type="text" name="firstname" value="Free">
<del> <br>
<del> Last name:<br>
<del> <input type="text" name="lastname" value="CodeCamp">
<del> <br><br>
<del> <input type="submit" value="Submit" formtarget="_self">
<del> </form>
<del> </body>
<del></html>
<del>```
<del>
<del>All major browsers support the `<button>` tag. `<button>` tag also supports event attributes in HTML.
<del>**Note:** Different browsers may send different values if you use `<button>` element. It is advised to either specify the button value or use the `<input>` tag to create button in an HTML form.
<del>
<del>**Other resources:**
<del>* Other attributes:
<del>
<del>| **Attributes** | **Link** |
<del>|---|---|
<del>| formenctype | https://www.w3schools.com/TAgs/att_button_formenctype.asp |
<del>| formnovalidate | https://www.w3schools.com/TAgs/att_button_formnovalidate.asp |
<del>
<del>* `<input>` tag: https://www.w3schools.com/TAgs/tag_input.asp
<del>* Event Attributes: https://www.w3schools.com/TAgs/ref_eventattributes.asp
<del>* `formtarget` attribute values: https://www.w3schools.com/TAgs/att_button_formtarget.asp
<del>* HTML Form:
<ide><path>mock-guide/english/html/elements/canvas-tag/index.md
<del>---
<del>title: Canvas Tag
<del>---
<del>## Canvas Tag
<del>
<del>This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/html/elements/canvas-tag/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>.
<del>
<del><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>.
<del>
<del><!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
<del>
<del>#### More Information:
<del><!-- Please add any articles you think might be helpful to read before writing the article -->
<del>
<del>
<ide><path>mock-guide/english/html/elements/center-tag/index.md
<del>---
<del>title: Center Tag
<del>---
<del>## Center Tag
<del>
<del>In HTML the `<center>` tag is used to center text on a page. You can write a `<center>` tag as `<center>My Text Here</center>` The feature is obsolute not recommended to use. The `<center>` tag was deprecated in HTML 4, the feature could be removed from web browsers at anytime. It is recommended to use CSS `text-align` to center text.
<del>
<del>#### More Information:
<del>* [MDN - HTML Center Tag](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/center)
<del>* [MDN - CSS Text Align](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align)
<ide><path>mock-guide/english/html/elements/code-tag/index.md
<del>---
<del>title: Code Tag
<del>---
<del>## Code Tag
<del>
<del>The `<code>` tag contains the piece of computer code for webpage. By default, the `<code>` tag displayed in the browser's default monospace font.
<del>
<del>```html
<del><code>A piece of computer code</code>
<del>```
<del>
<del>
<del>#### More Information:
<del>[MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/code)
<ide><path>mock-guide/english/html/elements/comment-tag/index.md
<del>---
<del>title: Comment Tag
<del>---
<del>## Comment Tag
<del>
<del>Comments are tags used to leave notes in the document. Only the developer have access to the comments, the final user don't see unless they check with the browser's Inspector Element.
<del>
<del>When you're working in some code, it's helpful to leave tips to others developers in order to understand what the work is about.
<del>
<del>### Example
<del>
<del>```html
<del><!-- This is a comment -->
<del>```
<del>Comments can also be used to make code inactive without having to delete it entirely.
<del>
<del>### Example
<del>
<del>```html
<del><!--
<del><h1>Hello Campers</h1>
<del>-->
<del><h2>Hello Friends</h2>
<del><!--
<del><p>Hello Paragraph</p>
<del>-->
<del>```
<del>
<ide><path>mock-guide/english/html/elements/div-tag/index.md
<del>---
<del>title: Div Tag
<del>---
<del>## Div Tag
<del>
<del>The `<div>` tag is a generic container that defines a section in your HTML document. A `<div>` element is used to group sections of HTML elements together and format them with CSS. A `<div>` is a block-level element. This means that it takes up its own line on the screen. Elements right after the `<div>` will be pushed down to the line below. For similar grouping and styling that is not block-level, but inline, you would use the `<span>` tag instead. The <span> tag is used to group inline-elements in a document.
<del>
<del>### Example
<del>Here is an example of how to display a section in the same color:
<del>
<del>```html
<del><div style="color:#ff0000">
<del> <h3>my heading</h3>
<del> <p>my paragraph</p>
<del></div>
<del>```
<del>
<del>#### More Information:
<del><a href='https://www.tutorialspoint.com/html/html_div_tag.htm' target='_blank' rel='nofollow'>Tutorialspoint</a>
<del>
<del><a href='https://developer.mozilla.org/en-US/docs/Web/HTML/Element/div' target='_blank' rel='nofollow'>MDN</a>
<del>
<del>
<ide><path>mock-guide/english/html/elements/doctype-tag/index.md
<del>---
<del>title: Doctype Tag
<del>---
<del>## Doctype Tag
<del>
<del>HTML code is always accompanied by its "boilerplate" of tags. The very first tag found on any HTML file must be a Doctype declaration.
<del>The html5 doctype `<!DOCTYPE html>` is a required preamble used to inform the browser which [rendering mode](https://developer.mozilla.org/en-US/docs/Quirks_Mode_and_Standards_Mode) to use (HTML5 vs. XHTML). Be sure to place the doctype at the very top of the document.
<del>
<del>```html
<del><!DOCTYPE html>
<del><html>
<del> <head>
<del> <meta charset=UTF-8>
<del> <title>Document Title</title>
<del> </head>
<del> <body>
<del> <p>Document content.</p>
<del> </body>
<del></html>
<del>```
<del>
<del>#### More Information:
<del>
<del>- [Doctype: MDN](https://developer.mozilla.org/en-US/docs/Glossary/Doctype)
<del>- [Introduction to HTML5: MDN](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Introduction_to_HTML5)
<del>- [Quirks Mode and Standards Mode: MDN](https://developer.mozilla.org/en-US/docs/Quirks_Mode_and_Standards_Mode)
<ide><path>mock-guide/english/html/elements/em-tag/index.md
<del>---
<del>title: Em Tag
<del>---
<del>## Em Tag
<del>
<del>The `<em>` tag is used to emphasize text in an HTML document. This can be done by wrapping the text you would like to be emphasized in an `<em>` tag. Most browsers will render text wrapped in an `<em>` tag as italicized.
<del>
<del>Note: The `<em>` tag should not be used to stylistically italicize text. The `<em>` tag is used to stress emphasis on text.
<del>
<del>### Example:
<del>```
<del><body>
<del> <p>
<del> Text that requires emphasis should go <em>here</em>.
<del> </p>
<del></body>
<del>```
<del>
<del>#### More Information:
<del>- [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/em)
<del>- [em tag: w3schools](https://www.w3schools.com/tags/tag_em.asp)
<del>- [em tag: htmlreference.io](http://htmlreference.io/element/em/)
<ide><path>mock-guide/english/html/elements/fieldsets-and-legends/index.md
<del>---
<del>title: Fieldsets and Legends
<del>---
<del>#### Suggested Reading:
<del><!-- Please add any articles you think might be helpful to read before writing the article -->
<del>See the <a href='http://webaim.org/techniques/forms/controls' target='_blank' rel='nofollow'>WebAIM site</a> for accessible form examples - specifically the part about radio buttons
<del>#### Draft of Article:
<del><!-- Please add your working draft below in GitHub-flavored Markdown -->
<del>Explanation and examples to group related elements in a form with the `fieldset` and `legend` elements
<ide>\ No newline at end of file
<ide><path>mock-guide/english/html/elements/font-tag/index.md
<del>---
<del>title: Font Tag
<del>---
<del>## Font Tag
<del>
<del>*This feature was deprecated in HTML 4.01 and removed in HTML 5.*
<del>
<del>The HTML Font Element `<font>` defines the font size, color and face for its content. It was normalized in HTML 3.2 but was then deprecated in HTML 4.01 and is now obsolete in HTML5. Although it still may work in some browsers, it is advised to stop using it as it could be removed at anytime. Styling fonts can be achieved and far better controlled through CSS, in fact all styling should be written using CSS only.
<del>
<del>The **former** behavior of the `<font>` element:
<del>
<del>* **Color:** This attribute lets you set the textcolor to either a named color like ‘blue’, or a hexadecimal color in the format of #RRGGBB.
<del>* **Face:** This attribute lets you set the font family and will contain a comma-separated list of one or more font names. If the first font in the list is not supported by the browser, then it will move onto the second font. If no font is supported or listed then the browser typically defaults a font for that system.
<del>* **Size:** This attribute lets you specify the size of the font. There are two ways to do this, either setting a numeric value or a relative value. Numeric values range from 1 to 7, 1 being the smallest and 3 being the default. Relative values, like -2 or +2, set the value relative to the size of the `<basefont>` element or ‘3’ the default value.
<del>
<del>An example:
<del>```html
<del><font face="fontNameHere" size="7" color="blue">My Text Here</font>
<del>```
<del>
<del>#### More Information:
<del>* [MDN - HTML font tag](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/font)
<del>* [MDN - CSS Font](https://developer.mozilla.org/en-US/docs/Web/CSS/font)
<ide><path>mock-guide/english/html/elements/footer-tag/index.md
<del>---
<del>title: Footer Tag
<del>---
<del>## Footer Tag
<del>
<del>The `<footer>` tag denotes the footer of an HTML document or section. Typically, the footer contains information about the author, copyright information, contact information, and a sitemap. Any contact information inside of a `<footer>` tag should go inside an `<address>` tag.
<del>
<del>### Example
<del>```html
<del><html>
<del><head>
<del> <title>Paragraph example</title>
<del></head>
<del><body>
<del> <footer>
<del> <p>© 2017 Joe Smith</p>
<del> </footer>
<del></body>
<del></html>
<del>```
<del>
<del>#### More Information:
<del>[MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/footer)
<ide><path>mock-guide/english/html/elements/form-tag/index.md
<del>---
<del>title: Form Tag
<del>---
<del>## Form Tag
<del>
<del>The `<form>` tag is used to create forms in HTML that are for user input. Once a user inputs data and submits it, the data is sent to the server to be processed.
<del>
<del>Here's a basic example of how to use the `<form>` tag:
<del>```html
<del><form action="/example.php" method="get">
<del>Name: <input type="text"><br>
<del>Email Address: <input type="text"><br>
<del><input type="submit" value="Submit">
<del></form>
<del>```
<del>
<del>###Action Attribute
<del>Every `<form>` element needs an action attribute. The value of the action attribute is the URL on the server that will receive the data in the form when submitted.
<del>
<del>Here's an example using the action attribute:
<del>```html
<del><form action="http://www.google.com/form.php" method="get">
<del><p>Controls will appear inside here.</p>
<del></form>
<del>```
<del>As you can see, the form is submitting its data to the URL [http://www.google.com/from.php](http://www.google.com/from.php).
<del>
<del>###Method
<del>Forms can be submitted using either the GET or POST method.
<del>
<del>- The GET method is ideal for shorter forms since it attaches data to the end of the URL specified inside of the action attribute.
<del>
<del>- The POST method is ideal for forms that are longer, or when you are adding or deleting information from a database. With the POST method, the values of the form are being sent in HTTP headers.
<del>
<del>###Elements
<del>The `<form>` element will have at least have one of the following elements nested inside of it:
<del>
<del>- [`<input>`](https://guide.freecodecamp.org/html/elements/input "Input")
<del>- [`<button>`](https://guide.freecodecamp.org/html/elements/button-tag "Button")
<del>- [`<label>`](https://guide.freecodecamp.org/html/elements/label-tag "Label")
<del>- [`<select>`](https://guide.freecodecamp.org/html/elements/select-tag "Select")
<del>- [`<textarea>`](https://guide.freecodecamp.org/html/elements/textarea-tag "Textarea")
<del>- [`<fieldset>`](https://guide.freecodecamp.org/html/elements/fieldsets-and-legends "Fieldset")
<del>
<del>### Resources
<del>- [W3 Schools Form Resource](https://www.w3schools.com/tags/tag_form.asp "W3 Schools")
<del>- [Mozilla Form Resource](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form "Mozilla Form")
<ide>\ No newline at end of file
<ide><path>mock-guide/english/html/elements/head-tag/index.md
<del>---
<del>title: Head Tag
<del>---
<del>## Head Tag
<del>
<del>The `<head>` tag contains information about a webpage. Along with `<body>`, it is one of the two required elements of an HTML document. `<head>` must be the first child of an `<html>` element. There can only be one `<head>` element on a page.
<del>
<del>The `<head>` element contains information about how a webpage should be displayed, also known as metadata. The document title, links to stylesheets, and `<script>` tags linking to JavaScript files should all be placed in the `<head>`. The `<head>` should not contain any page content.
<del>
<del> ```html
<del> <html>
<del> <head>
<del> <title>Document Titles Belong in the Head</title>
<del> </head>
<del> <body>
<del> <p>This paragraph is content. It goes in the body!</p>
<del> </body>
<del></html>
<del> ```
<del>#### More Information:
<del>
<del>- [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/head)
<del>
<del>
<ide><path>mock-guide/english/html/elements/header-tag/index.md
<del>---
<del>title: Header Tag
<del>---
<del>## Header Tag
<del>
<del>The `<header>` tag is a container which is used for navigational links or introductory content.
<del>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>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.
<del>
<del>Here's an example using the `<header>` tag:
<del>
<del>```html
<del><article>
<del> <header>
<del> <h1>Heading of Page</h1>
<del> </header>
<del> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
<del></article>
<del>```
<del>
<del>#### More Information:
<del>- [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/header)
<del>- [W3 Schools](https://www.w3schools.com/tags/tag_header.asp)
<del>
<del>
<del>
<ide><path>mock-guide/english/html/elements/hr-tag/index.md
<del>---
<del>title: Hr Tag
<del>---
<del>## Hr Tag
<del>
<del>The horizontal rule or `<hr>` is a tag that allows to insert a divisory line, defining the content of your document.
<del>It's very important to clarify that this tag is a thematic break; in previous versions of .html is a horizontal rule.
<del>
<del>### Example
<del>```
<del><!DOCTYPE html>
<del><html>
<del> <body>
<del> <h2>FreeCodeCamp</h2>
<del> <p>FreeCodeCamp is a place where you can learn to code from scratch to professional</p>
<del>
<del> <hr>
<del>
<del> <h3>How to start</h3>
<del> <p>Just go to <a href="www.freecodecamp.com">FreeCodeCamp website and start learning!</a></p>
<del>
<del> <hr>
<del> </body
<del></html>
<del>```
<ide><path>mock-guide/english/html/elements/i-tag/index.md
<del>---
<del>title: I Tag
<del>---
<del>## I Tag
<del>
<del>The `<i>` element is used to denote text that is set apart from its surrounding text in some way. By default, text surrounded by `<i>` tags will be displayed in italic type.
<del>
<del>In previous HTML specifications, the `<i>` tag was solely used to denote text to be italicized. In modern semantic HTML, however, tags such as `<em>` and `<strong>` should be used where appropriate. You can use the "class" attribute of the `<i>` element to state why the text in the tags is different from the surrounding text. You may want to show that the text or phrase is from a different language, as in the example below.
<del>
<del>```HTML
<del><p>The French phrase <i class="french">esprit de corps</i> is often
<del>used to describe a feeling of group cohesion and fellowship.</p>
<del>```
<del>
<del>#### More Information:
<del>
<del><!-- Please add any articles you think might be helpful to read before writing the article -->
<del>- <a href='https://developer.mozilla.org/en-US/docs/Web/HTML/Element/i' target='_blank' rel='nofollow'>The HTML <i> element: MDN</a>
<del>- <a href='https://www.w3schools.com/tags/tag_i.asp' target='_blank' rel='nofollow'>I tag: w3schools</a>
<del>- <a href='http://htmlreference.io/element/i/' target='_blank' rel='nofollow'>I tag: htmlreference.io</a>
<del>
<ide><path>mock-guide/english/html/elements/iframe-tag/index.md
<del>---
<del>title: Iframe Tag
<del>---
<del>## Iframe Tag
<del>
<del>Iframe tags are used to add an existing web page or app to your website within a set space.
<del>
<del>When using the iframe tags the src attribute should be used to indicate the location of the web page or app to use within the frame.
<del>
<del>```html
<del><iframe src="framesite/index.html"></iframe>
<del>
<del>```
<del>You can set the width and height attributes to limit the size of the frame.
<del>
<del>```html
<del><iframe src="framesite/index.html" height="500" width="200"></iframe>
<del>
<del>```
<del>Iframes have a border by default, if you wish to remove this you can do so by using the style attribute and setting CSS border properties to none.
<del>
<del>```html
<del><iframe src="framesite/index.html" height="500" width="200" style="border:none;"></iframe>
<del>
<del>```
<del><!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
<del>
<del>#### More Information:
<del>* [MDN - HTML iframe tag](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe)
<del>* [W3 - HTML 5.2 iframe specification](https://www.w3.org/TR/html5/semantics-embedded-content.html#the-iframe-element)
<ide><path>mock-guide/english/html/elements/img-tag/index.md
<del>---
<del>title: Img Tag
<del>---
<del>## Img Tag
<del>
<del><!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
<del>A simple HTML Image element can be included in an HTML document like this:
<del>
<del>```html
<del><img src="path/to/image/file" alt="this is a cool picture">
<del>```
<del>
<del>`alt` tags provide alternate text for an image. One use of the `alt` tag is for visually impaired people using a screen reader; they can be read the `alt` tag of the image in order to understand the image's meaning.
<del>
<del>Note that the path to the image file can be either relative or absolute. Also, remember that the `img` element is self-closing, meaning that it does not close with the `<img />` tag and instead closes with just a single `>`.
<del>
<del>Example:
<del>
<del>```html
<del><img src="https://example.com/image.png" alt="my picture">
<del>```
<del>
<del>(This is assuming that the html file is at https://example.com/index.html, so it's in the same folder as the image file)
<del>
<del>is the same as:
<del>
<del>```html
<del><img src="image.png" alt="my picture">
<del>```
<del>
<del>
<del>#### More Information:
<del><!-- Please add any articles you think might be helpful to read before writing the article -->
<del>
<del><a href='https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img' target='_blank' rel='nofollow'>MDN</a>
<del><a href="https://www.w3schools.com/TAGs/tag_img.asp">W3Schools</a>
<ide><path>mock-guide/english/html/elements/index.md
<del>---
<del>title: Elements
<del>---
<del># HTML Elements
<del>
<del>Elements are the building blocks of HTML that describe the structure and content of a web page. They are the "Markup" part of HyperText Markup Language (HTML).
<del>
<del>HTML syntax uses the angle brackets ("<" and ">") to hold the name of an HTML element. Elements usually have an opening tag and a closing tag, and give information about the content they contain. The difference between the two is that the closing tag has a forward slash.
<del>
<del>Here's an example using the [p element](#) (`<p>`) to tell the browser that a group of text is a paragraph:
<del>
<del>```html
<del><p>This is a paragraph.</p>
<del>```
<del>
<del>Opening and closing tags should match, otherwise the browser may display content in an unexpected way.
<del>
<del>
<del>
<del>## Self-closing Elements
<del>
<del>Some HTML elements are self-closing, meaning they don't have a separate closing tag. Self-closing elements typically insert something into your document.
<del>
<del>An example is the [br element](#) (`<br>`), which inserts a line break in text. Formerly, self-closing tags had the forward slash inside them (`<br />`), however, HTML5 specification no longer requires this.
<del>
<del>## HTML Element Functionality
<del>
<del>There are many available HTML elements. Here's a list of some of the functions they perform:
<del>
<del> - give information about the web page itself (the metadata)
<del> - structure the content of the page into sections
<del> - embed images, videos, audio clips, or other multimedia
<del> - create lists, tables, and forms
<del> - give more information about certain text content
<del> - link to stylesheets which have rules about how the browser should display the page
<del> - add scripts to make a page more interactive and dynamic
<del>
<del>## Nesting HTML Elements
<del>
<del>You can nest elements within other elements in an HTML document. This helps define the structure of the page. Just make sure the tags close from the inside-most element first.
<del>
<del>Correct:
<del>`<p>This is a paragraph that contains a <span>span element.</span></p>`
<del>
<del>Incorrect:
<del>`<p>This is a paragraph that contains a <span>span element.</p></span>`
<del>
<del>
<del>## Block-level and Inline Elements
<del>
<del>Elements come in two general categories, known as block-level and inline. Block-level elements automatically start on a new line while inline elements sit within surrounding content.
<del>
<del>Elements that help structure the page into sections, such as a navigation bar, headings, and paragraphs, are typically block-level elements. Elements that insert or give more information about content are generally inline, such as [links](#) or [images](#).
<del>
<del>## The HTML Element
<del>
<del>There's an `<html>` element that's used to contain the other markup for an HTML document. It's also known as the "root" element because it's the parent of the other HTML elements and the content of a page.
<del>
<del>Here's an example of a page with a [head element](#the-head-element), a [body element](#the-body-element), and one [paragraph](#the-p-element):
<del>
<del>```html
<del><!DOCTYPE html>
<del><html>
<del> <head>
<del> </head>
<del> <body>
<del> <p>I'm a paragraph</p>
<del> </body>
<del></html>
<del>```
<del>
<del>## The HEAD Element
<del>
<del>This is the container for processing information and metadata for an HTML document.
<del>
<del>```html
<del><head>
<del> <meta charset="utf-8">
<del></head>
<del>```
<del>
<del>## The BODY Element
<del>
<del>This is container for the displayable content of an HTML document.
<del>
<del>```html
<del><body>...</body>
<del>```
<del>
<del>## The P Element
<del>
<del>Creates a paragraph, perhaps the most common block level element.
<del>
<del>```html
<del><p>...</p>
<del>```
<del>
<del>## The A(Link) Element
<del>
<del>Creates a hyperlink to direct visitors to another page or resource.
<del>
<del>```html
<del><a href="#">...</a>
<del>```
<del>
<del>## Other Resources
<del>
<del>- [HTML Paragraphs](#)
<del>- [HTML br](#)
<del>- [HTML Links](#)
<del>- [HTML Images](#)
<del>- [HTML Head](#)
<del>- [HTML Body](#)
<del>- [HTML DOCTYPE](#)
<ide><path>mock-guide/english/html/elements/input-tag/index.md
<del>---
<del>title: Input Tag
<del>---
<del>## Input
<del>HTML input tag can be included in HTML document like this:
<del>
<del>```html
<del><input type="text">
<del>```
<del>
<del>This creates an area within which a user can easily enter information. This information is then sent to a back end database and stored or used further down within the website or application.
<del>
<del>An input with "type='text'" will produce a single line field where any information can be entered. Other common types of inputs include but are not limited to: button, checkbox, color, email and password.
<del>
<del>### The most common types used
<del>
<del>* `text`: A single-line text field.
<del>
<del>* `button`: A button with no default behavior.
<del>
<del>* `submit`: A button that submits the form.
<del>
<del>* `checkbox`: A check box allowing values to be selected/deselected.
<del>
<del>* `date`: For entering a date (year, month, and day).
<del>
<del>* `email`: For editing an e-mail address.
<del>
<del>* `file`: Lets the user select a file.
<del>
<del>* `hidden`: Not displayed but its value is submitted to the server.
<del>
<del>* `number`: For entering a number.
<del>
<del>* `password`: A single-line text field whose value is obscured.
<del>
<del>* `radio`: A radio button, allowing a single value to be selected out of multiple choices.
<del>
<del>* `range`: A control for entering a number.
<del>
<del>* `url`: For entering a URL.
<del>
<del>Example:
<del>```html
<del><input type="button">
<del><input type="checkbox">
<del><input type="color">
<del><input type="email">
<del><input type="password">
<del>```
<del>
<del>Inputs come with a lot of predetermined attributes.
<del>
<del>Some commonly found attributes include autocomplete, checked and placeholder.
<del>
<del>```html
<del><input type="text" placeholder="This is a placeholder">
<del>```
<del>
<del>In the above instance, an area within which input can be entered is rendered, with the placeholder stating "This is a placeholder". Once the input line is clicked and a key is pressed, the placeholder disappears and is replaced by your own input.
<del>
<del>```html
<del><input type="checkbox" checked>
<del>```
<del>
<del>In this instance, a checkbox appears and it is checked by default due to the attribute 'checked'.
<del>
<del>There are many different types of inputs and associated attributes that can all be found on the link found below.
<del>
<del>#### More Information:
<del>https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input
<del>
<del>https://www.w3schools.com/tags/tag_input.asp
<ide><path>mock-guide/english/html/elements/input-types/index.md
<del>---
<del>title: Input Types
<del>---
<del>## Input Types
<del>
<del>Input HTML elements can be assigned an attribute called a "type." The type of an input element determines what type of data the user can input. The default input is text, but other options incude Checkboxes, simple buttons, or Color (utilizing hex codes).
<del>
<del>#### More Information:
<del>[W3 Schools: Input Type](https://www.w3schools.com/tags/att_input_type.asp)
<del>
<del>[MDN: <input>](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input)
<del>
<del>
<ide><path>mock-guide/english/html/elements/label-tag/index.md
<del>---
<del>title: Label Tag
<del>---
<del>
<del># Label Tag
<del><***label***> defines a label for an <input> type element/tag.
<del>
<del>### Usage
<del>```
<del><label for="id">Label</label>
<del><input type="text" name="text" id="id" value="yourvalue"><br>
<del>```
<del>As you can see, the *for* attribute of the <label> tag should be equal to the id attribute of the related element to bind them together.
<del>
<del>### Platform Support
<del>|Browser|Element Support|
<del>|:-----:|:-------------:|
<del>|Internet Explorer|:white_check_mark:|
<del>|Mozilla Firefox|:white_check_mark:|
<del>|Google Chrome|:white_check_mark:|
<del>|Opera|:white_check_mark:|
<del>|Safari|:white_check_mark:|
<del>
<del>### Attributes
<del>|Attribute| Value|Description|
<del>|:-------:|:----:|:---------:|
<del>|for| element_id| Specifies which form element a label is bound to|
<del>|form|form_id |Specifies one or more forms the label belongs to|
<del>
<del>
<del>### Global Attribute
<del>The <**label**> tag supports the Global Attributes in HTML.
<del>
<del>### Event Attribute
<del>The <**label**> tag supports the Event Attributes in HTML.
<del>
<del>> The <**label**> element does not render as anything special for the user. However, it provides a usability improvement for mouse users, because if the user clicks on the text within the <label> element, it toggles the control.
<del>
<del>
<del>
<del>#### More Information:
<del>[https://www.w3schools.com/jsref/dom_obj_label.asp](https://www.w3schools.com/jsref/dom_obj_label.asp)
<del>=======
<del>
<del>## Label
<del>The `<label>` tag defines a label for an `<input>` element.
<del>
<del>A label can be bound to an element either by using the "for" attribute, or by placing the element inside the <label> element.
<del>```html
<del><label for="peas">Do you like peas?
<del> <input type="checkbox" name="peas" id="peas">
<del></label>
<del>```
<del>
<del>```html
<del><label>Do you like peas?
<del> <input type="checkbox" name="peas">
<del></label>
<del>```
<del>
<del>#### More Information:
<del>
<del>
<del><a href='https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label' target='_blank' rel='nofollow'>MDN - Tabel Tag</a>
<del><a href='https://www.w3schools.com/tags/tag_label.asp' target='_blank' rel='nofollow'>W3School - Label Tag</a>
<ide>\ No newline at end of file
<ide><path>mock-guide/english/html/elements/li-tag/index.md
<del>---
<del>title: Li Tag
<del>---
<del>## Li Tag
<del>
<del>The `<li>` tag defines a list item in a list. The `<li>` tag can be used with unordered lists (`<ul>`), ordered lists (`<ol>`), and menus (`<menu>`).
<del>
<del>To define a list item, wrap the desired elements in an `<li>` tag. `<li>` elements must be contained inside a parent element that is a list.
<del>
<del>### Example
<del>
<del>```html
<del><body>
<del> <ul>
<del> <li>
<del> <p>I'm a list item</p>
<del> </li>
<del> <li>
<del> <p>I'm a list item too</p>
<del> </li>
<del> <li>
<del> <p>Me three/p>
<del> </li>
<del> </ul>
<del></body>
<del>
<del>```
<del>In an ordered list, `<li>` appears as an item with a bullet point.
<del>
<del>* First item
<del>* Second item
<del>* Third item
<del>
<del>In an unordered list, `<li>` appears as a numbered item.
<del>
<del>1. First item
<del>2. Second item
<del>3. Third item
<del>
<del>This numeric display counter can be customized using the _list-style-type_ CSS property.
<del>
<del>Examples:
<del>
<del>```html
<del><!-- In a simple unordered list -->
<del><ul>
<del> <li>First item</li>
<del> <li>Second item</li>
<del> <li>Third item</li>
<del></ul>
<del>
<del><!-- In a simple ordered list -->
<del><ol>
<del> <li>First item</li>
<del> <li>Second item</li>
<del> <li>Third item</li>
<del></ol>
<del>
<del><!-- In a menu list -->
<del><menu>
<del> <li>Menu item one</li>
<del> <li>Menu item two</li>
<del> <li>Menu item three</li>
<del></menu>
<del>```
<del>
<del>### Attributes
<del>
<del>The `<li>` element has the following elements:
<del>
<del>#### Type
<del>
<del>The `type` attribute defines the numbering type that will be used in the list. The following values are used to determine which numbering style will be used:
<del>
<del>* `1`: numbers
<del>* `a`: lowercase letters
<del>* `A`: uppercase letters
<del>* `i`: lowercase numerals
<del>* `I`: uppercase numerals
<del>
<del>#### Example
<del>
<del>```html
<del><body>
<del> <ol type="I">
<del> <li>list item</li>
<del> <li>list item</li>
<del> <li>list item</li>
<del> </ol>
<del></body>
<del>```
<del>The above HTMl will output:
<del>
<del><ol type="I">
<del> <li>list item</li>
<del> <li>list item</li>
<del> <li>list item</li>
<del></ol>
<del>
<del>#### Value
<del>
<del>The `value` attribute specifies the numeric order of the current `<li>`. This attribute only accepts a numeric value and can only be used with an ordered list. Any list items that follow will be ordered numerically based on the numeric input of the `value` attribute.
<del>
<del>#### Example
<del>
<del>```html
<del><body>
<del> <ol>
<del> <li value="4">list item</li>
<del> <li>list item</li>
<del> <li>list item</li>
<del> </ol>
<del></body>
<del>```
<del>
<del>The above HTML will output:
<del>
<del>4. list item
<del>5. list item
<del>6. list item
<del>
<del>### Nesting another list as an item
<del>
<del>Besides creating individual items, you can also use `<li>` tags to create a nested list, ordered or unordered. To do this, you nest a `<ol>` or `<ul>` _within_ a `<li>` tag.
<del>
<del>Here is an unordered list with a nested, ordered list.
<del>
<del>* First item
<del>* Second item
<del> 1. First sub-item
<del> 2. Second sub-item
<del>* Third item
<del>
<del>And here is an ordered list with a nested, unordered list.
<del>
<del>1. First item
<del>2. Second item
<del> * First sub-item
<del> * Second sub-item
<del>3. Third item
<del>
<del>```html
<del><!-- An unordered list with a nested, ordered list. -->
<del><ul>
<del> <li>First item</li>
<del> <li>Second item <!-- No closing </li> tag before the nested list -->
<del> <ol>
<del> <li>First sub-item</li>
<del> <li>Second sub-item</li>
<del> </ol>
<del> </li> <!-- The closing </li> tag comes after the nested list -->
<del> <li>Third item</li>
<del></ul>
<del>
<del><!-- An ordered list with a nested, unordered list. -->
<del><ol>
<del> <li>First item</li>
<del> <li>Second item <!-- No closing </li> tag before the nested list -->
<del> <ul>
<del> <li>First sub-item</li>
<del> <li>Second sub-item</li>
<del> </ul>
<del> </li> <!-- The closing </li> tag comes after the nested list -->
<del> <li>Third item</li>
<del></ol>
<del>```
<del>
<del>#### More Information:
<del>- [The HTML <li> element: MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/li)
<del>- [HTML <li> tag: w3schools](https://www.w3schools.com/cssref/pr_list-style-type.asp)
<del>- [CSS list-style Property: CSS-Tricks](https://css-tricks.com/almanac/properties/l/list-style/)
<ide><path>mock-guide/english/html/elements/link-tag/index.md
<del>---
<del>title: Link Tag
<del>---
<del>## Link Tag
<del>The link element can be used to tether relevant content from another webpage or document. Link tags commonly involve implementation of CSS to an HTML document.
<del>
<del>#### More Information:
<del>[MDN: Link Tag](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link)
<del>
<del>
<ide><path>mock-guide/english/html/elements/lists/index.md
<del>---
<del>title: Lists
<del>---
<del>## Lists
<del>
<del>There are three types of lists in HTML. All lists must contain one or more list elements.
<del>
<del>### Unordered HTML List
<del>The unordered list starts with `<ul>` tag and list items start with the `<li>` tag. In unordered lists all the list items marked with bullets by default.
<del>
<del> ```
<del> <ul>
<del> <li>Item</li>
<del> <li>Item</li>
<del> <li>Item</li>
<del> </ul>
<del> ```
<del> Output:
<del> <html>
<del> <ul>
<del> <li>Item</li>
<del> <li>Item</li>
<del> <li>Item</li>
<del> </ul>
<del> </html>
<del>
<del>### Ordered HTML List
<del>The ordered list starts with `<ol>` tag and list items start with the `<li>` tag. In ordered lists all the list items are marked with numbers.
<del>
<del> ```
<del> <ol>
<del> <li>First Item</li>
<del> <li>Second Item</li>
<del> <li>Third Item</li>
<del> </ol>
<del> ```
<del> Output:
<del> <html>
<del> <ol>
<del> <li>First Item</li>
<del> <li>Second Item</li>
<del> <li>Third Item</li>
<del> </ol>
<del></html>
<del>
<del>### HTML Description List
<del>The description list contains list items with their definitons. We use `<dl>` tag to start list, `<dt>` tag to define a term and `<dd>` tag to describe each term.
<del>
<del> ```
<del> <dl>
<del> <dt>freeCodeCamp</dt>
<del> <dd>Learn to code with free online courses, programming projects, and interview preparation for developer jobs.</dd>
<del> <dt>GitHub</dt>
<del> <dd>GitHub is a web-based Git or version control repository and Internet hosting service. It is mostly used for code.</dd>
<del> </dl>
<del> ```
<del> Output:
<del> <html>
<del> <dl>
<del> <dt>freeCodeCamp</dt>
<del> <dd>Learn to code with free online courses, programming projects, and interview preparation for developer jobs.</dd>
<del> <dt>GitHub</dt>
<del> <dd>GitHub is a web-based Git or version control repository and Internet hosting service. It is mostly used for code.</dd>
<del> </dl>
<del> </hhtml>
<del>
<del>#### More Information:
<del><a href='https://html.com/lists/' target='_blank' rel='nofollow'>HTML</a>
<del>
<del><a href='https://www.w3schools.com/html/html_lists.asp' target='_blank' rel='nofollow'>w3schools</a>
<del>
<del>
<ide><path>mock-guide/english/html/elements/main-tag/index.md
<del>---
<del>title: Main Tag
<del>---
<del>## Main Tag
<del>
<del>The `<main>` tag works similar to the `<div>` tag but semantically represents the main content of the document or portion of the document. Multiple `<main>` tags may be used, e.g. for the main content of various articles, and thus its contents should be unique to the document and not repeated elsewhere.
<del>
<del>### Example
<del>The following example illustrates the use of the `<main>` tag:
<del>
<del>```html
<del><!-- other content -->
<del>
<del><main>
<del> <h1>Diary Entry 31</h1>
<del> <p>Oct 23 2017</p>
<del>
<del> <article>
<del> <h2>Today Is Unique</h2>
<del> <p>This information will be unique among other articles.</p>
<del> </article>
<del></main>
<del>
<del><!-- other content -->
<del>```
<ide><path>mock-guide/english/html/elements/meta-tag/index.md
<del>---
<del>title: Meta Tag
<del>---
<del>## Meta Tag
<del>
<del>
<del>The `<meta>` tag provides the metadata about the HTML document.
<del>
<del>This metadata is used to specify a page's charset, description, keywords, the author, and the viewport of the page.
<del>
<del>This metadata will not appear on the website itself, but it will be used by the browers and search engines to determine how the page will display content and assess search engine optimization (SEO).
<del>
<del>The metadata is assigned to the <head></head> of the HTML document:
<del>```html
<del><head>
<del> <meta charset="UTF-8">
<del> <meta name="description" content="Short description of website content here">
<del> <meta name="keywords" content="HTML,CSS,XML,JavaScript">
<del> <meta name="author" content="Jane Smith">
<del> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<del><!-- HTML5 introduced a method to let web designers take control over the viewport, through the <meta> tag. The viewport is the user's visible area of a web page. A <meta> viewport element gives the browser instructions on how to control the page's dimensions and scaling. -->
<del></head>
<del>```
<del>#### More Information:
<del>For additional information on the <meta> tag, please visit the following:
<del>(https://www.w3schools.com/TAgs/tag_meta.asp "w3schools.com <meta> tag")
<del>(https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta "MDN <meta> tag")
<del>
<del>
<del>
<ide><path>mock-guide/english/html/elements/nav-tag/index.md
<del>---
<del>title: Nav Tag
<del>---
<del>## Nav Tag
<del>
<del>The `<nav>` tag is intended for major block of navigation links. NOT all links of a document should be inside a `<nav>` element.
<del>
<del>Browsers, such as screen readers for disabled users, can use this element to determine whether to omit the initial rendering of this content.
<del>
<del>
<del>#### Example
<del>``` html
<del>
<del><nav class="menu">
<del> <ul>
<del> <li><a href="#">Home</a></li>
<del> <li><a href="#">About</a></li>
<del> <li><a href="#">Contact</a></li>
<del> </ul>
<del></nav>
<del>
<del>```
<del>
<del>#### More Information:
<del>- <a href='https://developer.mozilla.org/en-US/docs/Web/HTML/Element/nav' target='_blank' rel='nofollow'>MDN</a>
<ide><path>mock-guide/english/html/elements/ol-tag/index.md
<del>---
<del>title: ol Tag
<del>---
<del>## ol Tag
<del>
<del><!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
<del>The `<ol>` tag creates an ordered list element in HTML. An ordered list is one of two list structures in HTML, the other is the unordered list, created by the `<ul>` tag. Ordered lists are used to display lists with meaningful order. By default, list items in an ordered list are displayed as a numbered list, starting with 1. This behavior can be changed with the "type" attribute or by using CSS styles. List elements can be nested.
<del>
<del>```html
<del><ol>
<del> <li>First Item</li>
<del> <li>Second Item <!-- No closing </li> tag before the nested list -->
<del> <ol>
<del> <li>First Subitem</li>
<del> <li>Second Subitem</li>
<del> </ol>
<del> </li> <!-- The closing </li> tag comes after the nested list -->
<del> <li>Third Item</li>
<del></ol>
<del>```
<del>
<del>### Ordered vs. Unordered Lists
<del>
<del>In HTML, ordered and unordered lists are similar in both usage and styling. Use ordered lists in places where changing the order of the items would change the meaning of the list. For example, an ordered list could be used for a recipe, where changing the order of the steps would matter. Use unordered lists for groups of items without meaningful order. A list of animals on a farm could go in an unordered list.
<del>
<del>#### More Information:
<del><!-- Please add any articles you think might be helpful to read before writing the article -->
<del>
<del>
<del>## Other Resources
<del>* [The unordered list `<ul>`](https://github.com/freeCodeCamp/guides/blob/master/src/pages/html/elements/ul-tag/index.md)
<del>* [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ol)
<del>
<ide><path>mock-guide/english/html/elements/p-tag/index.md
<del>---
<del>title: P Tag
<del>---
<del>## P Tag
<del>
<del>The `<p>` tag stands for paragraph, which is the most common tag used to create lines of words inside the `<html>` document. Using `<p>` will be very useful to add the margin automatically between elements. The `<p>`attribute can also be helpful for CSS styling.
<del>
<del>### P tag with other tags
<del>The use of the `<p>` is compatible with other tags, allowing to add hyperlinks (`<a>`), bold (`<strong>`), italics(`<i>`) among others.
<del>
<del>### Example
<del>```html
<del><html>
<del> <head>
<del> <title>Paragraph example</title>
<del> </head>
<del> <body>
<del> <p>
<del> This <strong>sentence</strong> was created to show how the paragraph works.
<del> </p>
<del> </body>
<del></html>
<del>```
<del>
<del>You can also nest an anchor element `<a>` within a paragraph.
<del>
<del>### Example
<del>```html
<del><p>Here's a
<del> <a href="http://freecodecamp.com">link to Free Code Camp.com</a>
<del> for you to follow.</p>
<del>```
<del>
<del>
<del>#### More Information:
<del>
<del><!-- Please add any articles you think might be helpful to read before writing the article -->
<del>- <a href='https://developer.mozilla.org/en-US/docs/Web/HTML/Element/p' target='_blank' rel='nofollow'>MDN: <p> The Paragraph element</a>
<del>- <a href='https://www.w3schools.com/tags/tag_i.asp' target='_blank' rel='nofollow'>w3schools: HTML <p> Tag</a>
<ide><path>mock-guide/english/html/elements/paragraph/index.md
<del>---
<del>title: Paragraph Tag
<del>---
<del>## Paragraph
<del>
<del>The HTML <p> element represents a paragraph of text. <p> usually represents a block of text that it separated from other blocks by vertical blank space.
<del>
<del>### Example
<del>
<del>``` html
<del> <p>
<del> This is a paragraph
<del> </p>
<del> <p>
<del> This is another paragraph
<del> </p>
<del>```
<del>
<del>#### More Information:
<del><!-- Please add any articles you think might be helpful to read before writing the article -->
<del>https://developer.mozilla.org/en-US/docs/Web/HTML/Element/p
<ide><path>mock-guide/english/html/elements/paragraphs/index.md
<del>---
<del>title: Paragraphs
<del>---
<del>## Paragraphs
<del>
<del>This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/html/elements/paragraphs/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>.
<del>
<del><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>.
<del>
<del><!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
<del>
<del>#### More Information:
<del><!-- Please add any articles you think might be helpful to read before writing the article -->
<del>
<del>
<ide><path>mock-guide/english/html/elements/s-tag/index.md
<del>---
<del>title: S Tag
<del>---
<del>## S Tag
<del>
<del>In HTML the `<s>` tag is used to strikethrough text. For instance:
<del>
<del>```html
<del><p><s>This year is the year of the monkey.</s></p>
<del><p>This year is the year of the Rooster.</p>
<del>```
<del>
<del>#### More Information:
<del>* [MDN - HTML s tag](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/s)
<del>* [W3 - HTML 5.2 s tag specification](https://www.w3.org/TR/html5/textlevel-semantics.html#the-s-element)
<ide><path>mock-guide/english/html/elements/script-tag/index.md
<del>---
<del>title: Script Tag
<del>---
<del>## Script Tag
<del>
<del>The HTML Script tag is used to either contain client side JavaScript or reference an external JavaScript file using the script “src” attribute.
<del>
<del>The `<script>` tag/element is used to incorporate client-side JavaScript into your HTML file which can be used to add interactivity and logic to your website
<del>
<del>```
<del><script>
<del> //JavaScript code is written here
<del></script>
<del>
<del><script src="js/app.js">
<del>```
<del>
<del>The tag can be used to encompass actual JavaScript code right in the HTML itself like this
<del>```
<del><script>
<del> alert('hello this is my JavaScript doing things!');
<del></script>
<del>```
<del>
<del>Or you can use it as a way to reference an external javascript file like this
<del>```
<del><script src="main.js" />
<del>```
<del>Here the `src` attribute of the element takes in a path to a JavaScript file
<del>
<del>Script tags are loaded into your HTML in-order and syncronously so it is usually best practice to add your scripts right before the ending of your `<body>` tag in your HTML like so
<del>```
<del> <script src="main.js" />
<del> <script>
<del> alert('hello this is my JavaScript doing things!');
<del> </script>
<del></body>
<del>```
<del>
<del>You can see the official documentation for the script element on the [MDN Docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script)
<ide><path>mock-guide/english/html/elements/section-tag/index.md
<del>---
<del>title: Section Tag
<del>---
<del>## Section
<del>
<del>The HTML ```<section>``` element defines a section within an HTML page that is used when there is not a more specific semantic HTML element to represent it. Typically, a ```<section>``` element will include a heading element (```<h1>``` - ```<h6>```) as child element.
<del>
<del>For example, a web page could be divided into various sections such as welcome, content and contact sections.
<del>
<del>A ```<section>``` element should not be used in place of a ```<div>``` element if a generic container is needed. It should be used to define sections within an HTML page.
<del>
<del>```html
<del><html>
<del><head>
<del> <title>Section Example</title>
<del></head>
<del><body>
<del> <section>
<del> <h1>Heading</h1>
<del> <p>Bunch of awesome content</p>
<del> </section>
<del></body>
<del></html>
<del>```
<del>
<del>#### More Information:
<del>* [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/section)
<del>* [W3 Schools](https://www.w3schools.com/tags/tag_section.asp)
<ide><path>mock-guide/english/html/elements/select-tag/index.md
<del>---
<del>title: Select Tag
<del>---
<del>## Select Tag
<del>
<del>This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/html/elements/select-tag/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>.
<del>
<del><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>.
<del>
<del><!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
<del>
<del>#### More Information:
<del><!-- Please add any articles you think might be helpful to read before writing the article -->
<del>
<del>
<ide><path>mock-guide/english/html/elements/span-tag/index.md
<del>---
<del>title: Span Tag
<del>---
<del>## Span Tag
<del>
<del>The `<span>` tag is a general purpose container element similar to `<div>`. Browsers do not make any visual changes to `<span>`s by default, but you can style them with CSS or manipulate them with JavaScript.
<del>
<del>### Example
<del>```html
<del><html>
<del> <head>
<del> <title>The Span Tag</title>
<del> </head>
<del> <body>
<del> <div>
<del> <p>This is a normal paragraph without any changes.</p>
<del> <p>This paragraph has <span style="color:red">red span styling</span> inside it without affecting the rest of the document.</p>
<del> </div>
<del> </body>
<del></html>
<del>```
<del>
<del>The code for the paragraph with red text looks like this:
<del>```html
<del><p>This paragraph has <span style="color:red">red span styling</span> inside it without affecting the rest of the document.</p>
<del>```
<del>
<del>#### Differences between `<span>` and `<div>`
<del>The main difference is that `<span>` is an inline element, while `<div>` is a block element. This means that a `<span>` can appear within a sentence or paragraph (as in the example above), while a `<div>` will start a new line of content. Note that the CSS `display` property can change this default behavior, but that's way beyond the scope of this article!
<del>
<del>#### More Information:
<del>* [MDN HTML Element Reference](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/span)
<ide>\ No newline at end of file
<ide><path>mock-guide/english/html/elements/strong-tag/index.md
<del>---
<del>title: Strong Tag
<del>---
<del># Strong Tag
<del>
<del>The HTML < ***strong***> tag is a text emphasis tag which when used, results in, bold display of text, placed within the tags.
<del>
<del>### Usage
<del>```
<del><strong> Hello World! </strong>
<del>```
<del>The above code results in
<del>
<del>**Hello World!**
<del>
<del>This tag is also commonly referred to as the **strong element** . When it comes to attributes, only the Global Attributes apply to **strong**
<del>tag ie., there are no specific attributes for <**strong**> tag.
<del>
<del>### Browser Support
<del>| Name of the Browser | Support |
<del>|:-------------------:|:-------:|
<del>|Chrome|Yes|
<del>|Android|Yes|
<del>|Firefox|Yes|
<del>|Internet Explorer|Yes|
<del>|Opera|Yes|
<del>|Safari|Yes|
<del>
<del>#### More Information:
<del>[https://www.techonthenet.com/html/elements/strong_tag.php](https://www.techonthenet.com/html/elements/strong_tag.php)<br>
<del>[https://www.w3schools.com/tags/tag_strong.asp](https://www.w3schools.com/tags/tag_strong.asp)
<del>=======
<del>The `<strong>` tag is used to give importance to text in an HTML document. This can be done by wrapping the text you would like to be emphasized in an `<strong>` tag. Most browsers will render text wrapped in an `<strong>` tag as bold.
<del>
<del>Note: The `<strong>` tag should not be used to stylistically bold text.
<del>
<del>### Example:
<del>```
<del><body>
<del> <p>
<del> <strong> This </strong> is important.
<del> </p>
<del></body>
<del>```
<del>
<del>
<del>#### More Information:
<del>- [em tag: w3schools](https://www.w3schools.com/tags/tag_strong.asp)
<del>
<del>
<ide><path>mock-guide/english/html/elements/style-tag/index.md
<del>---
<del>title: Style Tag
<del>---
<del>## Style Tag
<del>
<del>The style tag is used sort of like a css file except inside of an HTML, like so:
<del>
<del>```
<del> <head>
<del> <title>Your Title</title>
<del> <style>
<del> p {
<del> color:red;
<del> }
<del> </style>
<del> </head>
<del>```
<del>
<del>That would make the paragraph tag's color red. It is kind of useful if you just want to put a little bit of code, but if you want a really long stylesheet, then I recommend just using `<link />`.
<del>
<del>#### More Information:
<del><!-- Please add any articles you think might be helpful to read before writing the article -->
<del>
<del>[W3C schools](https://www.w3schools.com/tags/tag_style.asp)
<del>
<del>More Info:
<del>
<del>Style tag is used to set any CSS-styles for web-page inside a document. Style tag should be nested within head section of html-document:
<del>
<del>```html
<del><head>
<del> <style>
<del> h1 {
<del> text-align: center;
<del> font-family: sans-serif;
<del> }
<del> </style>
<del></head>
<del>```
<del>
<del>You can write any CSS-code inside style tag according to its syntax.
<del>
<ide><path>mock-guide/english/html/elements/table-tag/index.md
<del>---
<del>title: Table Tag
<del>---
<del>## Table Tag
<del><!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
<del>The `<table>` tag allows you to display a table on your webpage.
<del>
<del>### Example
<del>```html
<del><table>
<del> <tr>
<del> <td>Row 1, Cell 1</td>
<del> <td>Row 1, Cell 2</td>
<del> </tr>
<del> <tr>
<del> <td>Row 2, Cell 1</td>
<del> <td>Row 2, Cell 2</td>
<del> </tr>
<del></table>
<del>```
<del>This code block would produce the following output:
<del>
<del><table>
<del> <tr>
<del> <td>Row 1, Cell 1</td>
<del> <td>Row 1, Cell 2</td>
<del> </tr>
<del> <tr>
<del> <td>Row 2, Cell 1</td>
<del> <td>Row 2, Cell 2</td>
<del> </tr>
<del></table>
<del>
<del>
<del>#### More Information:
<del><!-- Please add any articles you think might be helpful to read before writing the article -->
<del>[MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table)
<del>
<ide><path>mock-guide/english/html/elements/td-tag/index.md
<del>---
<del>title: Td Tag
<del>---
<del>## Td Tag
<del>
<del>The `<td>` tag defines a standard cell in an HTML table.
<del>
<del>An HTML table has two kinds of cells:
<del>* Header cells - contains header information (created with the `<th>` element)
<del>* Standard cells - contains data (created with the `<td>` element)
<del>
<del>The text in `<th>` elements are bold and centered by default.
<del>The text in `<td>` elements are regular and left-aligned by default.
<del>
<del>### Example
<del>```html
<del><html>
<del><head>
<del><title>Td Tag Example</title>
<del></head>
<del><body>
<del><table>
<del> <tr>
<del> <th>Header1</th>
<del> <th>Header2</th>
<del> </tr>
<del> <tr>
<del> <td>Cell A</td>
<del> <td>Cell B</td>
<del> </tr>
<del></table>
<del></body>
<del></html>
<del>```
<ide><path>mock-guide/english/html/elements/textarea-tag/index.md
<del>---
<del>title: Textarea Tag
<del>---
<del>## Textarea Tag
<del>The HTML textarea tag allows you to enter a box that will contain text for user feedback or interaction. In most cases, it is common to see the textarea used as part of a form.
<del>
<del>Programmers use textarea tag to create multiline field for user input (useful especially in case when user should be able to put on the form longer text). Programmers may specify different attributes for textarea tags.
<del>
<del>Sample code:
<del>
<del>```html
<del> <form>
<del> <textarea name="comment" rows="8" cols="80" maxlength="500" placeholder="Enter your comment here..." required></textarea>
<del> </form>
<del>```
<del>
<del>Most common attributes:
<del>`row` and `cols` attributes determine the height and width of the textarea
<del>`placeholder` attribute specifies the text which is visible to the user, it helps the user to understand what data should be typed in
<del>`maxlength` attribute determines the maximum length of the text which can be typed in the textarea, user cannot submit more characters
<del>`required` attribute means that this field must be filled in before the form submission
<del>
<del>For more information about textarea tag and its attributes visit [MDN]("https://developer.mozilla.org/en-US/docs/Web/HTML/Element/textarea") or [w3schools]("https://www.w3schools.com/tags/tag_textarea.asp").
<ide><path>mock-guide/english/html/elements/th-tag/index.md
<del>---
<del>title: Th Tag
<del>---
<del>## Th Tag
<del><!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
<del>The `<th>` tag allows you to define a header cell in HTML tables. By default, most browsers will bold and center data in these tags.
<del>
<del>### Example
<del>```html
<del><table>
<del> <tr>
<del> <th>Movie</th>
<del> <th>Rating</th>
<del> </tr>
<del> <tr>
<del> <td>Die Hard</td>
<del> <td>5 Stars</td>
<del> </tr>
<del></table>
<del>```
<del>This markup will create the following output:
<del>
<del><table>
<del> <tr>
<del> <th>Movie</th>
<del> <th>Rating</th>
<del> </tr>
<del> <tr>
<del> <td>Die Hard</td>
<del> <td>5 Stars</td>
<del> </tr>
<del></table>
<del>
<del>
<del>#### More Information:
<del><!-- Please add any articles you think might be helpful to read before writing the article -->
<del>[MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th)
<del>
<ide><path>mock-guide/english/html/elements/tr-tag/index.md
<del>---
<del>title: Tr Tag
<del>---
<del><p>The <code class="language-text"><tr></code> tag defines a standard row in an HTML table on a web page.</p>
<del><p>The <code class="language-text"><tr></code> tag houses the <code class="language-text"><th></code> and <code class="language-text"><td></code> tags, also known as Table Header and Table Data respectively.</p>
<del><p><code class="language-text"><tr></code> tag is a close-ended tag meaning that every <code class="language-text"><tr></code> tag opened must be closed with their sub-sequent closing tag denoted by <code class="language-text"></tr></code></p>
<del><p><code class="language-text"><tr></code> tag defines a row in a table. </p>
<del>
<del><h3>Example</h3>
<del><p> </p>
<del>
<del>```html
<del>
<del><html>
<del><head>
<del><title>Tr Tag Example</title>
<del></head>
<del><body>
<del><table>
<del> <tr>
<del> <th>Header One</th>
<del> </tr>
<del> <tr>
<del> <td>The usual table data/column cell.</td>
<del> </tr>
<del><tr>
<del> <td>The usual table data/column cell.</td>
<del> </tr>
<del><tr>
<del> <td>The usual table data/column cell.</td>
<del> </tr>
<del></table>
<del></body>
<del></html>
<ide><path>mock-guide/english/html/elements/u-tag/index.md
<del>---
<del>title: U Tag
<del>---
<del>## U Tag
<del>
<del>The HTML `<u>` tag renders text with an underline.
<del>
<del>The `<u>` element was deprecated in HTML 4.01. In HTML5, the `<u>` tag was redefined to represent text that should be stylistically different form normal text. This includes misspelled words or proper nouns in Chinese.
<del>
<del>Instead, to underline text, it is recommended that the `<span>` tag is used in place of `<u>`. Style your `<span>` tags with the CSS `text-decoration` property with the value `underline`.
<del>
<del>### Examples:
<del>``` html
<del><html>
<del><body>
<del><p>This parragraph has a <u>underline</u>.</p>
<del></body>
<del></html>
<del>```
<del>Underlining text with the `<span>` tag:
<del>```html
<del><span style="text-decoration: underline">Everyone</span> has been talking about <span style="text-decoration: underline">freeCodeCamp</span> lately.
<del>```
<del>
<del>
<del>### More Information:
<del>[MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/u)
<del>
<ide><path>mock-guide/english/html/elements/ul-tag/index.md
<del>---
<del>title: Ul Tag
<del>---
<del>## Ul Tag
<del>
<del>The unordered list `<ul>` is a tag used to create bulleted lists. To create a list inside the `<ul>`, use the `<li>` tag. To style lists, go to the CSS style lists and make the changes.
<del>
<del>The `<ul>` can be nested inside other lists and is compatible with others tag such as `<a>`,`<p>`,`<button>`, the html styling tags (`<strong>`,`<em>`, etc).
<del>
<del>### Example
<del>To create the following:
<del>```html
<del> <ul>
<del> <li>This is the bulleted list #1</li>
<del> <li>This is the bulleted list #2</li>
<del> <li>This is the bulleted list #3</li>
<del> <li>
<del> <ul>
<del> <li>This is the bulleted nested list #1</li>
<del> </ul>
<del> </li>
<del> </ul>
<del>```
<del>
<del>You would use this HTML code:
<del>``` html
<del><html>
<del> <head>
<del> <title></title>
<del> </head>
<del> <body>
<del> <ul>
<del> <li>This is the bulleted list #1</li>
<del> <li>This is the bulleted list #2</li>
<del> <li>This is the bulleted list #3</li>
<del> <li>
<del> <ul>
<del> <li>This is the bulleted nested list #1</li>
<del> </ul>
<del> </li>
<del> </ul>
<del> </body>
<del></html>
<del>```
<del>
<del>## Other Resources
<del>- [The ordered list `<ol>`](https://github.com/freeCodeCamp/guides/blob/master/src/pages/html/elements/ol-tag/index.md)
<del>
<ide><path>mock-guide/english/html/html-entities/index.md
<del>---
<del>title: HTML Entities
<del>---
<del>
<del># HTML Entities
<del>
<del>## Overview
<del>
<del>### What are HTML Entities?
<del>
<del>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.
<del>
<del>### What are they used for?
<del>
<del>As mentioned about HTML entities are used in order to replace reserved characters that are reserved by HTML.
<del>
<del>### How do you use them?
<del>
<del>A character entity looks similar to this:
<del>```html
<del><!-- format &[entity_name]; -->
<del><!-- example for a less-than sign (<) -->
<del><
<del>```
<del>Or
<del>```html
<del><!-- &#[entity_number]; -->
<del><!-- example for a less-than sign (<) -->
<del><
<del>```
<del>
<del>## Reference Guide
<del>
<del>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:
<del>
<del>
<del>| Character | Entity Name | Entity Number | Description |
<del>|-------|-----------|-----------|-------|
<del>| | | ` ` | Space |
<del>| ! | | `!` | Exclamation mark |
<del>| " | | `"` | Quotation mark |
<del>| # | | `#` | Number sign |
<del>| $ | | `$` | Dollar sign |
<del>| ¢ | `¢` | `¢` | Cent sign |
<del>| € | `€` | `€` | Euro sign |
<del>| £ | `£` | `£` | GBP sign |
<del>| ¥ | `¥` | `¥` | Yen sign |
<del>| % | | `%` | Percent sign |
<del>| & | `&` | `&` | Ampersand |
<del>| ' | | `'` | Apostrophe |
<del>| ( | | `(` | Opening/Left Parenthesis |
<del>| ) | | `)` | Closing/Right Parenthesis |
<del>| * | | `*` | Asterisk |
<del>| + | | `+` | Plus sign|
<del>| , | | `,` | Comma |
<del>| - | | `-` | Hyphen |
<del>| . | | `.` | Period |
<del>| / | | `/` | Slash |
<del>| © | `©` | `©` | Copyright |
<del>| ® | `®` | `®` | Registered Trademark |
<del>| " | `"` | `"` | double quotation mark |
<del>| `>` | `>` | `>` | Greater-than sign |
<del>| `<` | `<` | `<` | Less-than sign |
<del>| `•` | `•` | `•` | Bullet point |
<del>
<del>
<del>#### More Information:
<del>There are plenty of HTML entites references out there; some examples are:
<del>* [Table of Entities - W3](https://dev.w3.org/html5/html-author/charref)
<del>* [W3 Schools](https://www.w3schools.com/html/html_entities.asp)
<del>* [Freeformatter](https://www.freeformatter.com/html-entities.html)
<ide><path>mock-guide/english/html/html-forms/index.md
<del>---
<del>title: HTML Forms
<del>---
<del>## HTML Forms
<del>
<del>Basically, forms are used to collect data entered by a user, which are then sent to the server for further processing. They can be used for different kinds of user inputs, such as name, email etc.
<del>
<del>Form contains control elements which are wrapped around ```<form></form>``` tags, like ```input```, which can have types like:
<del>
<del>- ```text```
<del>- ```email```
<del>- ```password```
<del>- ```checkbox```
<del>- ```radio```
<del>- ```submit```
<del>- ```range```
<del>- ```search```
<del>- ```date```
<del>- ```time```
<del>- ```week```
<del>- ```color```
<del>- ```datalist```
<del>
<del>Code example:
<del>```html
<del><form>
<del> <label for="username">Username:</label>
<del> <input type="text" name="username" id="username">
<del> <label for="password">Password:</label>
<del> <input type="password" name="password" id="password">
<del> <input type="radio" name="gender" value="male">Male<br>
<del> <input type="radio" name="gender" value="female">Female<br>
<del> <input type="radio" name="gender" value="other">Other
<del> <input list="Options">
<del> <datalist id="Options">
<del> <option value="Option1">
<del> <option value="Option2">
<del> <option value="Option3">
<del> </datalist>
<del> <input type="submit" value="Submit">
<del> <input type="color">
<del> <input type="checkbox" name="correct" value="correct">Correct
<del></form>
<del>```
<del>
<del>Other elements that form can contain:
<del>
<del>- ```textarea``` - is a multiline box which is most often used for adding some text eg. comment. Size of textarea is defined by number of rows and columns.
<del>- ```select``` - together with ```<option></option>``` tag creates drop-down select menu.
<del>- ```button``` - The button element can be used to define a clickable button.
<del>
<del>MORE INFORMATION ON HTML FORMS.
<del>
<del>HTML Forms are required when you want to collect some data from the site visitor. For example, during user registration you would like to collect information such as name, email address, credit card, etc.
<del>
<del>A form will take input from the site visitor and then will post it to a back-end application such as CGI, ASP Script or PHP script etc. The back-end application will perform required processing on the passed data based on defined business logic inside the application.
<del>
<del>There are various form elements available like text fields, textarea fields, drop-down menus, radio buttons, checkboxes, etc.
<del>
<del>The HTML `<form>` tag is used to create an HTML form and it has following syntax −
<del>
<del>``` html
<del> <form action = "Script URL" method = "GET|POST">
<del> form elements like input, textarea etc.
<del> </form>
<del>```
<del>
<del>If the form method is not defined then it will default to "GET".
<del>
<del>The form tag can also have an attribute named "target" which specifies where the link will open. It can open in the browser tab, a frame, or in the current window.
<del>
<del>The action attribute defines the action to be performed when the form is submitted.
<del>Normally, the form data is sent to a web page at the Script URL when the user clicks on the submit button. If the action attribute is omitted, the action is set to the current page.
<ide><path>mock-guide/english/html/html5-audio/index.md
<del>---
<del>title: HTML5 Audio
<del>---
<del>## HTML5 Audio
<del>
<del>Before HTML5, audio files had to be played in a browser using a plug-in like Adobe Flash.
<del>The HTML <audio> element is used to embed sound content in documents. It may contain one or more audio sources, represented using the src attribute or the [source](<source>) element
<del>
<del>The following code snippet adds an audio file with the filename `tutorial.ogg` or `tutorial.mp3`. The <source> element indicates alternative audio files which the browser may choose from. The browser will utilize the first recognized format.
<del>
<del>#### Example 1
<del>```html
<del><audio controls>
<del> <source src="tutorial.ogg" type="audio/ogg">
<del> <source src="tutorial.mp3" type="audio/mpeg">
<del>Your browser does not support the audio element.
<del></audio>
<del>```
<del>
<del>#### Example 2
<del>```html
<del><audio src="https://s3.amazonaws.com/freecodecamp/simonSound1.mp3" controls loop autoplay>
<del></audio>
<del>```
<del>
<del>The `controls` attribute includes audio controls like play, pause, and volume. If you don't use this attribute, then no controls will be shown.
<del>
<del>The `<source>` element enables you to indicate alternative audio files which the browser may choose from. The browser will utilize the first recognize format.
<del>The text between the `<audio>` and `</audio>` tags may be shown in browser that does not support the HTML5 `<audio>` element.
<del>
<del>The autoplay attribute will automatically play your audio file in the background. It is considered better practice to let visitors choose to play audio.
<del>
<del>The preload attribute indicates what the browser should do if the player is not set to autoplay.
<del>
<del>The loop attribute will play your audio file in a continous loop if mentioned
<del>
<del>Since this is html5, some browser do not support it. You can check it at https://caniuse.com/#search=audio
<del>
<del>#### More Information:
<del>https://caniuse.com/#search=audio
<del>
<del>https://www.w3schools.com/html/html5_audio.asp
<del>
<del>https://msdn.microsoft.com/en-us/library/gg589529(v=vs.85).aspx
<del>
<del>
<ide><path>mock-guide/english/html/html5-semantic-elements/index.md
<del>---
<del>title: HTML5 Semantic Elements
<del>---
<del>## HTML5 Semantic Elements
<del>Semantic HTML elements clearly describe it's meaning in a human and machine readable way. Elements such as `<header>`, `<footer>` and `<article>` are all considered semantic because they accurately describe the purpose of the element and the type of content that is inside them.
<del>
<del>
<del>### A Quick History
<del>HTML was originally created as a markup language to describe documents on the early internet. As the internet grew and was adopted by more people, it's needs changed. Where the internet was originally inteded for sharing scientific documents, now people wanted to share other things as well. Very quickly, people started wanting to make the web look nicer. Because the web was not initially built to be designed, programmers used different hacks to get things laid out in different ways. Rather than using the ```<table></table>``` to describe information using a table, programmers would use them to position other elements on a page. As the use of visually designed layouts progressed, programmers started to use a generic "non-semantic" tag like `<div>`. They would often give these elements a `class` or `id` attribute to describe their purpose. For example, instead of `<header>` this was often written as `<div class="header">`. As HTML5 is still relatively new, this use of non-semantic elements is still very common on websites today.
<del>
<del>#### List of new semantic elements
<del>The semantic elements added in HTML5 are:
<del>+ `<article>`
<del>+ `<aside>`
<del>+ `<details>`
<del>+ `<figcaption>`
<del>+ `<figure>`
<del>+ `<footer>`
<del>+ `<header>`
<del>+ `<main>`
<del>+ `<mark>`
<del>+ `<nav>`
<del>+ `<section>`
<del>+ `<summary>`
<del>+ `<time>`
<del>
<del>Elements such as ```<header>```, ```<nav>```, ```<section>```, ```<article>```, ```<aside>```, and ```<footer>``` act more or less like ```<div>``` elements. They group other elements together into page sections. However where a ```<div>``` tag could contain any type of information, it is easy to identify what sort of information would go in a semantic ```<header>``` region.
<del>
<del>**An example of semantic element layout by w3schools**
<del>
<del>
<del>
<del>### Benefits of semantic elements
<del>To look at the benefits of semantic elements, here are two pieces of HTML code. This first block of code uses semantic elements:
<del>```
<del><header></header>
<del><section>
<del> <article>
<del> <figure>
<del> <img>
<del> <figcaption></figcaption>
<del> </figure>
<del> </article>
<del></section>
<del><footer></footer>
<del>```
<del>
<del>Whilst this second block of code uses non-semantic elements:
<del>```
<del><div id="header"></div>
<del><div class="section">
<del> <div class="article">
<del> <div class="figure">
<del> <img>
<del> <div class="figcaption"></div>
<del> </div>
<del> </div>
<del></div>
<del><div id="footer"></div>
<del>```
<del>
<del>First, it is much **easier to read**. This is probably the first thing you will notice when looking at the first block of code using semantic elements. This is a small example, but as a programmer you can be reading through hundreds or thousands of lines of code. The easier it is to read and understand that code, the easier it makes your job.
<del>
<del>It has **greater accessibility**. You are not the only one that finds semantic elements easier to understand. Search engines and assistive technologies (like screen readers for users with a sight impairment) are also able to better understand the context and content of your website, meaning a better experience for your users.
<del>
<del>Overall, semantic elements also lead to more **consistent code**. When creating a header using non-semantic elements, different programmers might write this as `<div class="header">`, `<div id="header">`, `<div class="head">`, or simply `<div>`. There are so many ways that you can create a header element, and they all depend on the personal preference of the programmer. By creating a standard semantic element, it makes it easier for everyone.
<del>
<del>Since October 2014, HTML4 got upgraded to HTML5, along with some new “semantic” elements. To this day, some of us might still be confused as to why so many different elements that doesn’t seem to show any major changes.
<del>
<del>#### <code><section></code> and <code><article></code>
<del>“What’s the difference?”, you may ask. Both these elements are used for sectioning a content, and yes, they can definitely be used interchangeably. It’s a matter of in which situation. HTML4 offered only one type of container element, which is <code><div></code>. While this is still used in HTML5, HTML5 provided us with <code><section></code> and <code><article></code> in a way to replace <code><div></code>.
<del>
<del>The <code><section></code> and <code><article></code> elements are conceptually similar and interchangeable. To decide which of these you should choose, take note of the following:
<del>
<del> 1. An article is intended to be independently distributable or reusable.
<del> 2. A section is a thematic grouping of content.
<del>
<del>```html
<del><section>
<del> <p>Top Stories</p>
<del> <section>
<del> <p>News</p>
<del> <article>Story 1</article>
<del> <article>Story 2</article>
<del> <article>Story 3</article>
<del> </section>
<del> <section>
<del> <p>Sport</p>
<del> <article>Story 1</article>
<del> <article>Story 2</article>
<del> <article>Story 3</article>
<del> </section>
<del></section>
<del>```
<del>
<del>#### <code><header></code> and <code><hgroup></code>
<del>The <code><header></code> element is generally found at the top of a document, a section, or an article and usually contains the main heading and some navigation and search tools.
<del>
<del>```html
<del><header>
<del> <h1>Company A</h1>
<del> <ul>
<del> <li><a href="/home">Home</a></li>
<del> <li><a href="/about">About</a></li>
<del> <li><a href="/contact">Contact us</a></li>
<del> </ul>
<del> <form target="/search">
<del> <input name="q" type="search" />
<del> <input type="submit" />
<del> </form>
<del></header>
<del>```
<del>
<del>The <code><hgroup></code> element should be used where you want a main heading with one or more subheadings.
<del>
<del>```html
<del><hgroup>
<del> <h1>Heading 1</h1>
<del> <h2>Subheading 1</h2>
<del> <h2>Subheading 2</h2>
<del></hgroup>
<del>```
<del>
<del>REMEMBER, that the <code><header></code> element can contain any content, but the <code><hgroup></code> element can only contain other headers, that is <code><h1></code> to <code><h6></code> and including <code><hgroup></code>.
<del>
<del>#### <code><aside></code>
<del>The <code><aside></code> element is intended for content that is not part of the flow of the text in which it appears, however still related in some way. This of <code><aside></code> as a sidebar to your main content.
<del>
<del>```html
<del><aside>
<del> <p>This is a sidebar, for example a terminology definition or a short background to a historical figure.</p>
<del></aside>
<del>```
<del>
<del>#### <nav>
<del>Before HTML5, our menus were created with <code><ul></code>’s and <code><li></code>’s. Now, together with these, we can separate our menu items with a <code><nav></code>, for navigation between your pages. You can have any number of <code><nav></code> elements on a page, for example, its common to have global navigation across the top (in the <code><header></code>) and local navigation in a sidebar (in an <code><aside></code> element).
<del>
<del>```html
<del><nav>
<del> <ul>
<del> <li><a href="/home">Home</a></li>
<del> <li><a href="/about">About</a></li>
<del> <li><a href="/contact">Contact us</a></li>
<del> </ul>
<del></nav>
<del>```
<del>
<del>#### <code><footer></code>
<del>If there is a <code><header></code> there must be a <code><footer></code>. A <code><footer></code> is generally found at the bottom of a document, a section, or an article. Just like the <code><header></code> the content is generally metainformation, such as author details, legal information, and/or links to related information. It is also valid to include <code><section></code> elements within a footer.
<del>
<del>```html
<del><footer>©Company A</footer>
<del>```
<del>
<del>#### <code><small></code>
<del>The <code><small></code> element often appears within a <code><footer></code> or <code><aside></code> element which would usually contain copyright information or legal disclaimers, and other such fine print. However, this is not intended to make the text smaller. It is just describing its content, not prescribing presentation.
<del>
<del>```html
<del><footer><small>©Company A</small> Date</footer>
<del>```
<del>
<del>#### <code><time></code>
<del>The <code><time></code> element allows an unambiguous ISO 8601 date to be attached to a human-readable version of that date.
<del>
<del>```html
<del><time datetime="2017-10-31T11:21:00+02:00">Tuesday, 31 October 2017</time>
<del>```
<del>
<del>Why bother with <code><time></code>? While humans can read time that can disambiguate through context in the normal way, the computers can read the ISO 8601 date and see the date, time, and the time zone.
<del>
<del>#### <code><figure></code> and <code><figcaption></code>
<del><code><figure></code> is for wrapping your image content around it, and <code><figcaption></code> is to caption your image.
<del>
<del>```html
<del><figure>
<del> <img src="https://en.wikipedia.org/wiki/File:Shadow_of_Mordor_cover_art.jpg" alt="Shadow of Mordor" />
<del> <figcaption>Cover art for Middle-earth: Shadow of Mordor</figcaption>
<del></figure>
<del>```
<del>### Learn more about the new HTML5 elements:
<del>* [w3schools](https://www.w3schools.com/html/html5_semantic_elements.asp) provides simple and clear descriptions of many of the news elements and how/where they should be used.
<del>* [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element) also provides a great reference for all HTML elements and goes deeper into each.
<del>
<ide><path>mock-guide/english/html/html5-video/index.md
<del>---
<del>title: HTML5 Video
<del>---
<del>## HTML5 Video
<del>
<del>
<del>Before HTML5, in order to have a video play in a webpage, you would need to use a plugin, like Adobe Flash Player. With the introduction of HTML5, you can now place it directly into the page itself.
<del>The HTML <video> tag is used to embed video in web documents. It may contain one or more video sources, represented using the src attribute or the [source](<source>) element.
<del>
<del>
<del> To embed a video file into a web page, just add this code snippet and change the src of the audio file.
<del>
<del> ```html
<del> <video controls>
<del> <source src="tutorial.ogg" type="video /ogg">
<del> <source src="tutorial.mp4" type="video /mpeg">
<del> Your browser does not support the video element. Kindly,update it to latest version.
<del> </video >
<del>```
<del>
<del>The controls attribute includes video controls, similar to play, pause, and volume.
<del>
<del>This feature is supported by all modern/updated browsers. However, not all support the same video file format. My recommendation for a wide range of compatibility is MP4, as it is the most widely accepted format. There are also two other formats (WebM and Ogg) that are supported in Chrome, Firefox, and Opera.
<del>
<del>The <source> element enables you to indicate alternative video files which the browser may choose from. The browser will utilize the first recognized format.
<del>In HTML5, there are 3 supported video formats: MP4, WebM, and Ogg.
<del>
<del>The text between the <video> and </video> tags will only be displayed in browsers that do not support the <video> element.
<del>Since this is html5, some browsers do not support it. You can check the support at https://caniuse.com/#search=audio.
<del>
<del>
<del>There are several different elements of the video tag, many of these explanations are based on Mozilla's web docs (linked below). There are even more if you click the link at the bottom.
<del>
<del>#### autoplay
<del>
<del>"autoplay" can be set to either true or false. You set it to true by adding it into the tag, if it is not present in the tag it is set to false. If set to true, the video will begin playing as soon as enough of the video has buffered for it to be able to play. Many people find autoplaying videos as disruptive or annoying. So use this feature sparingly. Also note, that some mobile browsers, such as Safari for iOS, ignore this attribute.
<del>
<del>```html
<del> <video autoplay>
<del> <source src="video.mp4" type="video/mp4">
<del> </video>
<del>```
<del>
<del>#### poster
<del>
<del>The "poster" attribute is the image that shows on the video until the user clicks to play it.
<del>
<del>```html
<del> <video poster="poster.png">
<del> <source src="video.mp4" type="video/mp4">
<del> </video>
<del>```
<del>
<del>#### controls
<del>
<del>The "controls" attribute can be set to true or false and will handle whether controls such as the play/pause button or volume slider appear. You set it to true by adding it into the tag, if it is not present in the tag it is set to false.
<del>
<del>```html
<del> <video controls>
<del> <source src="video.mp4" type="video/mp4">
<del> </video>
<del>```
<del>
<del>There are many more attributes that can be added that are optional to customize the videoplayer in the page. To learn more, click on the links below.
<del>
<del>## More Information:
<del>
<del>- <a href="https://www.w3schools.com/html/html5_video.asp">W3Schools - HTML5 Video</a>
<del>- <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video">Mozilla web docs - Video</a>
<del>- <a href="https://en.wikipedia.org/wiki/HTML5_video">Wikipedia - HTML5 Video</a>
<del>- <a href="https://www.html5rocks.com/en/tutorials/video/basics/">HTML5 Rocks - HTML5 Video</a>
<del>- [Can I use video?](https://caniuse.com/#search=video)
<del>- [How to use HTML5 to play video files on your webpage](https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/samples/hh924821(v=vs.85))
<ide><path>mock-guide/english/html/html5-web-storage/index.md
<del>---
<del>title: HTML5 Web Storage
<del>---
<del>## HTML5 Web Storage
<del>
<del>Web storage allows web applications to store up to 5MB of information in browser storage per origin (per domain and protocol).
<del>
<del>### Types of Web Storage
<del>
<del>There are two objects for storing data on the client:
<del>
<del>`window.localStorage`: stores data with no expiration date and lives until removed.
<del>
<del>```javascript
<del>// Store Item
<del>localStorage.setItem("foo", "bar");
<del>
<del>// Get Item
<del>localStorage.getItem("foo"); //returns "bar"
<del>```
<del>
<del>`window.sessionStorage`: stores data for one session, where data is lost when the browser / browser tab is closed.
<del>
<del>```javascript
<del>// Store Item
<del>sessionStorage.setItem("foo", "bar");
<del>
<del>// Get Item
<del>sessionStorage.getItem("foo"); //returns "bar"
<del>```
<del>
<del>Since the current implementation only supports string-to-string mappings, you need to serialize and de-serialize other data structures.
<del>
<del>You can do so using JSON.stringify() and JSON.parse().
<del>
<del>For e.g. for the given JSON
<del>
<del>```
<del>var jsonObject = { 'one': 1, 'two': 2, 'three': 3 };
<del>```
<del>
<del>We first convert the JSON object to string and save in the local storage:
<del>
<del>```
<del>localStorage.setItem('jsonObjectString', JSON.stringify(jsonObject));
<del>```
<del>
<del>To get the JSON object from the string stored in local storage:
<del>```
<del>var jsonObject = JSON.parse(localStorage.getItem('jsonObjectString'));
<del>```
<del>
<del>#### More Information:
<del>
<del><a href='https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage' target='_blank' rel='nofollow'>MDN</a>
<del><a href='https://www.html5rocks.com/en/features/storage' target='_blank' rel='nofollow'>HTML5 Rocks</a>
<del><a href='https://www.w3schools.com/html/html5_webstorage.asp' target='_blank' rel='nofollow'>W3 Schools</a>
<ide><path>mock-guide/english/html/iframes/index.md
<del>---
<del>title: Iframes
<del>---
<del>## Iframes
<del>
<del>The HTML `<iframe>` element represents an inline frame, which allows you to include an independent HTML document into the current HTML document. The `<iframe>` is typically used for embedding third-party media, your own media, widgets, code snippets, or embedding third-party applets such as payment forms.
<del>
<del>### Attributes
<del>Listed below are some of the `<iframe>`'s attributes:
<del>
<del>| Attribute | Description |
<del>| --- | --- |
<del>| `allowfullscreen` | Set to true to allow the frame to be placed into full screen mode |
<del>| `frameborder` | Tells the browser to draw a border around the frame (set to 1 by default) |
<del>| `height` | The height of the frame in CSS pixels |
<del>| `name` | A name for the frame |
<del>| `src` | The URL of the web page to embed |
<del>| `width` | The width of the frame in CSS pixels |
<del>
<del>### Examples
<del>Embedding a YouTube video with an `<iframe>`:
<del>```html
<del><iframe width="560" height="315" src="https://www.youtube.com/embed/v8kFT4I31es"
<del>frameborder="0" allowfullscreen></iframe>
<del>```
<del>
<del>Embedding Google Maps with an `<iframe>`:
<del>```html
<del><iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d774386.2436462595!2d-74.53874786161381!3d40.69718109704434!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x89c24fa5d33f083b%3A0xc80b8f06e177fe62!2sNew+York%2C+NY%2C+USA!5e0!3m2!1sen!2sau!4v1508405930424"
<del>width="600" height="450" frameborder="0" style="border:0" allowfullscreen></iframe>
<del>```
<del>
<del>### Alternative Text
<del>The content between the opening and closing `<iframe>` tags is used as alternative text, to be displayed if the viewer's browser does not support iframes.
<del>
<del>```html
<del><iframe width="560" height="315" src="https://www.youtube.com/embed/v8kFT4I31es" frameborder="0">
<del> <p>Your browser does not support iframes.</p>
<del></iframe>
<del>```
<del>
<del>### Targeting an Iframe in a Link
<del>Any `<a>` link can target the content of an `<iframe>` element. Rather than redirect the browser window to the linked webpage, it will redirect the `<iframe>`. For this to work, the `target` attribute of the `<a>` element must match the `name` attribute of the `<iframe>`.
<del>
<del>```html
<del><iframe width="560" height="315" src="about:blank" frameborder="0" name="iframe-redir"></iframe>
<del>
<del><p><a href="https://www.youtube.com/embed/v8kFT4I31es" target="iframe-redir">Redirect the Iframe</a></p>
<del>```
<del>
<del>This example will show a blank `<iframe>` initially, but when you click the link above it will redirect the `<iframe>` to show a YouTube video.
<del>
<del>### JavaScript and Iframes
<del>Documents embedded in an `<iframe>` can run JavaScript within their own context (without affecting the parent webpage) as normal.
<del>
<del>Any script interaction between the parent webpage and the content of the embedded `<iframe>` is subject to the same-origin policy. This means that if you load the content of the `<iframe>` from a different domain, the browser will block any attempt to access that content with JavaScript.
<del>
<del>### More Information:
<del>See the [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe).
<ide><path>mock-guide/english/html/index.md
<del>---
<del>title: HTML
<del>---
<del>
<del># HTML
<del>
<del>HyperText Markup Language (HTML) is a markup language used to construct online documents and is the foundation of most websites today. A markup language like HTML allows us to 1) create links to other documents, 2) structure the content in our document, and 3) ascribe context and meaning to the content of our document.
<del>
<del>An HTML document has two aspects to it. It contains structured information (Markup), and text-links (HyperText) to other documents. We structure our pages using [HTML elements](#). They are constructs of the language providing [structure](#) and [meaning](#) in our document for the browser and the [<anchor>](#) element links to other documents across the internet.
<del>
<del>The internet was originally created to store and present static (unchanging) documents. The aspects of HTML discussed above were seen perfectly in these documents which lacked all design and styling. They presented structured information that contained links to other documents.
<del>
<del>HTML5 is the latest version, or specification, of HTML. The World Wide Web Consortium (W3C) is the organization responsible for developing standards for the World Wide Web, including those for HTML. As web pages and web applications grow more complex, W3C updates HTML's standards.
<del>
<del>HTML5 Introduces a host of semantic elements. Though we discussed HTML helped to provided meaning to our document, it wasn't until HTML5s' introduction of [semantic elements](#) that its' potential was realized.
<del>
<del>## A simple example of HTML Document
<del>
<del>```html
<del><!DOCTYPE html>
<del><html>
<del><head>
<del> <title>Page Title</title>
<del></head>
<del><body>
<del>
<del> <h1>My First Heading</h1>
<del> <p>My first paragraph.</p>
<del>
<del></body>
<del></html>
<del>```
<del>
<del>!DOCTYPE html: Defines this document to be HTML5
<del>
<del>html: The root element of an HTML page
<del>
<del>head: The element contains meta information about the document
<del>
<del>title: The element specifies a title for the document
<del>
<del>body: The element contains the visible page content
<del>
<del>h1: The element defines a large heading
<del>
<del>p: The element defines a paragraph
<del>
<del>### HTML Versions
<del>
<del>Since the early days of the web, there have been many versions of HTML
<del>
<del>|Version|Year|
<del>|--- |--- |
<del>|HTML|1991|
<del>|HTML 2.0|1995|
<del>|HTML 3.2|1997|
<del>|HTML 4.01|1999|
<del>|XHTML|2000|
<del>|HTML5|2014|
<del>
<del>#### Other Resources
<del>
<del>- [HTML Elements](https://guide.freecodecamp.org/html/elements)
<del>- [Semantic HTML](https://guide.freecodecamp.org/html/html5-semantic-elements)
<del>- [HTML Attributes](https://guide.freecodecamp.org/html/attributes)
<ide><path>mock-guide/english/html/layouts/index.md
<del>---
<del>title: Layouts
<del>---
<del>## Layouts
<del>
<del>Layouts organize different areas of the web page.
<del>
<del>Almost every web page we see can be divided into boxes, that can be arranged into specific order to create that web page. The image below is one such example.
<del>
<del>
<del>
<del>> Websites often display content in multiple columns (like a magazine or newspaper).
<del>
<del>And the HTML layout techniques help us put the needed information into the needed order or design.
<del>
<del>
<del>### Techniques to Implement Layouts
<del>
<del>#### HTML Tables
<del>One the most basic tools to implement layouts in a webpage, these are provided by HTML. But as the layout gets complicated HTML tables quickly lose their ease, because of the increase in markup text.
<del>
<del><!-- Examples needed -->
<del>
<del>#### CSS Float
<del>If you are to design a 2-column based page with left navigation pane and center content viewing area, its easy to do it with CSS floats. Simply set the left navigation page into a `<div>` with style property `float: left;`. And voila you get that design. But what if you had 4 columns in a single section. Sure, one can do it with floats, but the syntax of HTML you would be writing would be easy to comprehend.
<del>
<del><!-- Examples needed -->
<del>
<del>#### CSS Frameworks
<del>This is where CSS Frameworks such as [Bootstrap](http://getbootstrap.com/) and [Materialize](http://materializecss.com/) come in. These frameworks provide a grid functionality that lets to divide each section of your webpage into 12 columns, which you can order to design.
<del>
<del>
<del>> Sample Bootstrap Grid
<del>
<del>### HTML Semantic Elements
<del>Websites often display content in multiple columns (like a magazine or newspaper).
<del>
<del>HTML5 offers new semantic elements that define the different parts of a web page:
<del>```
<del><header> - Defines a header for a document or a section
<del><nav> - Defines a container for navigation links
<del><section> - Defines a section in a document
<del><article> - Defines an independent self-contained article
<del><aside> - Defines content aside from the content (like a sidebar)
<del><footer> - Defines a footer for a document or a section
<del><details> - Defines additional details
<del><summary> - Defines a heading for the <details> element
<del>```
<del>
<del>#### More Information:
<del>
<del>- [W3 Schools - Layout](https://www.w3schools.com/html/html_layout.asp)
<del>- [CodeMentorTeam](https://www.codementor.io/codementorteam/4-different-html-css-layout-techniques-to-create-a-site-85i9t1x34) - Layout Techniques to Create a Site
<del>
<ide><path>mock-guide/english/html/lists/index.md
<del>---
<del>title: Lists
<del>---
<del>
<del># Lists
<del>Lists are used to display items. There are 3 types of lists: _ordered lists_, _unordered lists_, and _description lists_.
<del>
<del>## Ordered lists
<del>An _ordered list_ is used to describe an ordered collection of data. Browsers usually display an ordered list as a numbered list. Create an ordered list using the `<ol>` tag.
<del>
<del>## Unordered lists
<del>An _unordered list_ is used to describe an unordered collection of data. Browsers usually display an unordered list as a bulleted list. Create an unordered list using the `<ul>` tag.
<del>
<del>## List items
<del>The direct children of ordered and unordered lists must be list items. Each list item is wrapped in an `<li>` tag. A list item tag can contain [flow content](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Flow_content).
<del>
<del>## Examples
<del>
<del>An ordered list is written as
<del>```HTML
<del><ol>
<del> <li>January</li>
<del> <li>February</li>
<del> <li>March</li>
<del></ol>
<del>```
<del>and is displayed as:
<del>1. January
<del>1. February
<del>1. March
<del>
<del>An unordered list is written as
<del>
<del>
<del>```HTML
<del><ul>
<del> <li>Macintosh</li>
<del> <li>Fuji</li>
<del> <li>Gala</li>
<del></ul>
<del>```
<del>and is displayed as:
<del>- Macintosh
<del>- Fuji
<del>- Gala
<del>
<del>## Styling Bulletpoints
<del>
<del>An ordered list can be used for a variety of functions and in a number of styles. Since changing the encompassing tag colors doesn't change the color of the bullets themselves, you can style them by first removing the traditional black bullets and inserting your own:
<del>
<del>Remove bullets:
<del>```CSS
<del>ul {
<del> list-style: none;
<del> }
<del>```
<del>
<del>Insert your own:
<del>```CSS
<del>ul li::before {
<del> content: "\2022";
<del> color: orange;
<del> display: inline-block;
<del> width: 1em;
<del> }
<del>```
<del>
<del>The content style adds a new bulletpoint while display and width style create a space between the bullet and the word. Regular font styles can apply here if you would like to make the bullet larger or bolder.
<del>
<del>
<del>
<del>## Description lists
<del>
<del>A description list is a list of terms, with a description of each term. A description list is made using the `<dl>` tag.
<del>Each item in the list is made up of two tags: a term `<dt>`, and a description of that term `<dd>`.
<del>They are called definition lists in HTML 4.
<del>
<del>Here is an example of a description list:
<del>```HTML
<del><dl>
<del> <dt>Programming</dt>
<del> <dd>The process of writing computer programs.</dd>
<del> <dt>freeCodeCamp</dt>
<del> <dd>An awesome non-profit organization teaching people how to code.</dd>
<del></dl>
<del>```
<del>
<del>which would end up looking like:
<del>
<del><dl>
<del> <dt>Programming</dt>
<del> <dd>The process of writing computer programs.</dd>
<del> <dt>freeCodeCamp</dt>
<del> <dd>An awesome non-profit organization teaching people how to code.</dd>
<del></dl>
<del>
<del>
<del>## More Information:
<del>
<del><!-- Please add any articles you think might be helpful to read before writing the article -->
<del>* [HTML lists on w3schools](https://www.w3schools.com/html/html_lists.asp)
<del>
<ide><path>mock-guide/english/html/mailto-links/index.md
<del>---
<del>title: Mailto Links
<del>---
<del>
<del>## Mailto Links
<del>
<del>A mailto link is a kind of hyperlink (`<a href=""></a>`) with special parameters that lets you specify additional recipients, a subject line, and/or a body text.
<del>
<del>### The basic syntax with a recipient is:
<del>
<del>```html
<del><a href="mailto:friend@something.com">Some text</a>
<del>```
<del>
<del>### More customization!
<del>
<del>#### Adding a subject to that mail:
<del>
<del>If you want to add a specific subject to that mail, be careful to add `%20` or `+` everywhere there's a space in the subject line. An easy way to ensure that it is properly formatted is to use a [URL Decoder / Encoder](https://meyerweb.com/eric/tools/dencoder/).
<del>
<del>#### Adding body text:
<del>
<del>Similarly, you can add a specific message in the body portion of the email:
<del>Again, spaces have to be replaced by `%20` or `+`.
<del>After the subject paramater, any additional parameter must be preceded by `&`
<del>
<del>Example: Say you want users to send an email to their friends about their progress at Free Code Camp:
<del>
<del>Address: empty
<del>
<del>Subject: Great news
<del>
<del>Body: I am becoming a developer
<del>
<del>Your html link now:
<del>```html
<del><a href="mailto:?subject=Great%20news&body=I%20am%20becoming%20a%20developer">Send mail!</a>
<del>```
<del>Here, we've left mailto empty (mailto:?). This will open the user's email client and the user will add the recipient address themselves.
<del>
<del>#### Adding more recipients:
<del>
<del>In the same manner, you can add CC and bcc parameters.
<del>Seperate each address by a comma!
<del>
<del>Additional parameters must be preceded by `&`.
<del>```html
<del><a href="mailto:firstfriend@something.com?subject=Great%20news&cc=secondfriend@something.com,thirdfriend@something.com&bcc=fourthfriend@something.com">Send mail!</a>
<del>```
<del>
<del>#### More Information:
<del>
<del>[MDN - E-mail links](https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML/Creating_hyperlinks#E-mail_links)
<ide><path>mock-guide/english/html/optional-tags/index.md
<del>---
<del>title: Optional Tags
<del>---
<del>## HTML5 Optional Tags
<del>
<del>In HTML5, you can omit certain opening and closing tags under specific conditions. For example, the following HTML code...
<del>
<del>```html
<del><!DOCTYPE html>
<del><p>Hello World.
<del>```
<del>
<del>Will automatically evaluate to...
<del>
<del>```html
<del><!DOCTYPE html>
<del><html>
<del> <head></head>
<del> <body>
<del> <p>Hello world.
<del> </p>
<del> </body>
<del></html>
<del>```
<del>
<del>The optional tag specifications for the most common HTML5 tags are as follows:
<del>
<del>- An `html` element's start tag may be omitted if the first thing inside the `html` element is not a comment.
<del>- An `html` element's end tag may be omitted if the `html` element is not immediately followed by a comment.
<del>- A `head` element's start tag may be omitted if the element is empty, or if the first thing inside the `head` element is an element.
<del>- A `head` element's end tag may be omitted if the `head` element is not immediately followed by a space character or a comment.
<del>- A `body` element's start tag may be omitted if the element is empty, or if the first thing inside the `body` element is not a space character or a comment, except if the first thing inside the `body` element is a `meta`, `link`, `script`, `style`, or `template` element.
<del>- A `body` element's end tag may be omitted if the body element is not immediately followed by a comment.
<del>
<del>### More Information
<del>
<del>To learn more about the HTML5 optional tags, please visit [The World Wide Web Consortium's Recommendations](https://www.w3.org/TR/html5/syntax.html#optional-tags).
<ide><path>mock-guide/english/html/page-structure/index.md
<del>---
<del>title: Page Structure
<del>---
<del>## Page Structure
<del>
<del>To create your pages in `HTML`, you need to know how to structure a page in `HTML`. Usually, the page structure follows the example below:
<del>
<del>```HTML
<del><!DOCTYPE html>
<del><html>
<del> <head>
<del> <title>Title of the Page</title>
<del> </head>
<del> <body>
<del> <!-- Content -->
<del> </body>
<del></html>
<del>```
<del>1. The `<!DOCTYPE html>` statement must always be the first to appear on an `HTML` page and tell the browser which version of the language is being used. In this case, we are working with `HTML5`.
<del>
<del>1. The `<html>` and `</html>` tags tell the web browser where the `HTML` code starts and ends.
<del>
<del>1. The `<head>` and `</head>` tags contains information about the website, e.g. style, meta-tags, etc.
<del>
<del>1. The `<title>` and `</title>` tags tell the browser what the page title is. The title can be seen by identifying the tab in your internet browser. The text that is defined between these tags is also the text that is used as title by the search engines when they present the pages in the results of a search.
<del>
<del>1. Between the `<body>` and `</ body>` tags the page content is placed, which is what is displayed in the browser.
<del>
<del>### Changes in HTML5
<del>
<del>#### Introduction of semantic tags
<del>Instead of using `<div>` for every other container several semantic(these tags help screenreaders which are used by visually
<del>impaired) tags such as `<header>` `<footer>`. So it is advisable to use these tags instead of generic `<div>`.
<del>
<del>#### More Information:
<del>[HTML: Introduction](https://www.w3schools.com/html/html_intro.asp)
<ide><path>mock-guide/english/html/responsive-web-design/index.md
<del>---
<del>title: Responsive Web Design
<del>---
<del>## Responsive Web Design
<del>
<del>Responsive web design is the concept of designing web pages that adapt to different screen sizes. It commonly involves the use of different layouts, font sizes, and placement of navigation menus.
<del>
<del>In order to create a responsive web page, CSS is commonly used to style your HTML elements. Some common methods in CSS used to create responsive web designs are:
<del>
<del>1. Writing [media queries](https://guide.freecodecamp.org/css/media-queries)
<del>2. Using pre-existing [CSS frameworks](https://guide.freecodecamp.org/css/css-frameworks)
<del>3. Using the [Flexbox model](https://guide.freecodecamp.org/css/layout/flexbox)
<del>4. Using [CSS Grid](https://guide.freecodecamp.org/css/layout/grid-layout)
<del>
<del>### 1. Media queries
<del>
<del>Media queries tell the web browser to ignore or replace properties of the webpage based on specific attributes like screen width or whether the user is printing.
<del>
<del>```
<del>@media (query) {
<del> /* The browser will use the CSS rules within the curly braces when the query is true */
<del>}
<del>```
<del>
<del>The following example sets `padding-left` and `padding-right` within the class `more-padding` when the screen width is less than or equal to 768px.
<del>
<del>```
<del>@media screen and (max-width: 768px) {
<del> .more-padding {
<del> padding-left: 10px;
<del> padding-right: 10px;
<del> }
<del>}
<del>```
<del>
<del>### 2. CSS Frameworks
<del>
<del>CSS frameworks like [Bootstrap](https://www.getbootstrap.com/), [Material Design Lite](https://getmdl.io/), and [Foundation](https://foundation.zurb.com/) have pre-built CSS classes that make responsive design coding simpler. These classes operate like standard HTML classes.
<del>
<del>In this example, `col-md-9` and `col-sm-6` set the width of the `<div>` tag based on whether the screen is small or medium.
<del>
<del>```html
<del><div class="col-12 col-md-6"></div>
<del>```
<del>
<del>The Bootstrap framework divides a row into twelve columns. In the above example, the `<div>` will spread across either nine or six of them. The grid system, pictured below, is fundamental to how Bootstrap eases responsive design.
<del>
<del>
<del>
<del>### More Information:
<del><!-- Please add any articles you think might be helpful to read before writing the article -->
<del>1. <a href='https://medium.freecodecamp.org/css-flexbox-interactive-tutorial-in-8-minutes-including-cheat-sheet-6214e00de3d2' target='_blank' rel='nofollow'>CSS Flexbox Complete tutorial in 8 minutes</a>
<del>2. [Freecodecamp CSS section](https://guide.freecodecamp.org/css).
<del>3. <a href="https://www.youtube.com/watch?v=zBjUEDzK-ow"/>CSS Flexbox tutorial by CodingTutorials360</a>
<ide><path>mock-guide/english/html/semantic-html-elements/index.md
<del>---
<del>title: Semantic HTML Elements
<del>---
<del>
<del>## Semantic HTML Elements
<del>The `<em>` element marks text as being emphasized above the text around it. Typically, the browser renders this in *italics*, but you can add other styles using CSS.
<del>
<del>Semantic HTML elements provide meaning to browsers, developers, and users of a site. In contrast to elements like `<div>` or `<span>`, semantic elements like `<header>` and `<footer>` more clearly explain the purpose of each section of a website.
<del>
<del>### Why Use Semantic Elements?
<del>
<del>Developers use semantic elements to enhance the following:
<del>
<del>* accessibility: help assistive technologies read and interpret your webpage
<del>* searchability: help computers make sense of your content
<del>* internationalization: only 13% of the world are English native speakers
<del>* interoperability: help other programmers understand the structure of your webpage <sup>1</sup>
<del>
<del>### Useful Semantic Elements
<del>
<del>* `<header>` defines a header for the document or a section
<del>* `<footer>` defines a footer for the document or a section
<del>* `<nav>` defines navigation links in the document
<del>* `<main>` defines the main content of a document
<del>* `<section>` defines a section in the document—the spec defines this as “a thematic grouping of content, typically with a heading," so you can think of it as being like a chapter
<del>* `<article>` defines an article in the document
<del>* `<aside>` defines content aside from the page content
<del>* `<address>` defines the contact information for the author/owner of a document or an article
<del>* `<figure>` defines self-contained content, like illustrations, diagrams, photos, code blocks, etc. <sup>2</sup>
<del>
<del>### Lesser-known Semantic Elements
<del>
<del>* `<bdi>` defines a section of text that might be formatted in a different direction from other text (for instance, a quote in Hebrew or Arabic in an otherwise-English article)
<del>* `<details>` defines additional details that people can view or hide (like a tooltip)
<del>* `<dialog>` defines a dialog box or window
<del>* `<figcaption>` defines the caption for a `<figure>`
<del>* `<mark>` defines marked or highlighted text
<del>* `<menuitem>` defines a command/menu item that the user can select from a popup menu
<del>* `<meter>` defines a scalar measurement within a known range (a gauge)
<del>* `<progress>` defines the progress of a task
<del>* `<rp>` defines what to show in browsers that do not support ruby annotations
<del>* `<rt>` defines an explanation/pronunciation of characters (for east asian typography)
<del>* `<ruby>` defines a ruby annotation (for east asian typography)
<del>* `<summary>` defines a visible heading for a `<details>` element
<del>* `<time>` defines a date/time
<del>* `<wbr>` defines a possible line-break <sup>2</sup>
<del>
<del>### Sources
<del>1. [Lee, Michelle. "An Overview of HTML5 Semantics." *CodePen*. February 16, 2016. Accessed: October 24, 2017](https://codepen.io/mi-lee/post/an-overview-of-html5-semantics)
<del>2. [Bidaux, Vincent. "HTML5 semantic elements and Webflow: the essential guide." *Webflow*. December 16, 2016. Accessed: October 24, 2017](https://webflow.com/blog/html5-semantic-elements-and-webflow-the-essential-guide)
<del>
<del>#### More Information:
<del>For more information: https://codepen.io/mi-lee/post/an-overview-of-html5-semantics
<del>
<del>Refer to the [MDN Web Docs article](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/em).
<ide><path>mock-guide/english/html/symbols/index.md
<del>---
<del>title: Symbols
<del>---
<del>
<del>## Symbols
<del>
<del>HTML symbol entities are characters that are not represented on a user's keyboards. Many mathematical, scientific, and currency symbols
<del>are not present on a normal keyboard; therefore, to add such symbols to a page using HTML, the HTML entity name can be used.
<del>It is important to note that these will not effect the html code themselves, and will always be interpreted as text. For example, if we wanted to type <div> as text on a webpage, we may need to use these symbol entities.
<del>
<del>If no entity name exists, either the entity number or hexadecimal reference can be used.
<del>
<del>
<del>
<del>#### More Information:
<del>
<del>* [W3 Schools Reference](https://www.w3schools.com/html/html_symbols.asp)
<del>* [Symbols Reference Chart](https://dev.w3.org/html5/html-author/charref)
<ide><path>mock-guide/english/html/tables/index.md
<del>---
<del>title: Tables
<del>---
<del>### Defining an HTML Table
<del>
<del>An HTML table is defined with the `<table>` tag.
<del>
<del>Each table row is defined with the `<tr>` tag. Inside a row there may be table headers or table data.
<del>
<del>* A table header is defined with the `<th>` tag. By default, table headings are bold and centered.
<del>* A table data/cell is defined with the `<td>` tag.
<del>
<del>A more complex HTML table may also include `<caption>`, `<col>`, `<colgroup>`, `<thead>`, `<tfoot>`, and `<tbody>` elements in it.
<del>
<del>### Simple Table Example
<del>```html
<del><table style="width:100%">
<del> <tr>
<del> <th>Firstname</th>
<del> <th>Lastname</th>
<del> <th>Age</th>
<del> </tr>
<del> <tr>
<del> <td>Jill</td>
<del> <td>Smith</td>
<del> <td>50</td>
<del> </tr>
<del> <tr>
<del> <td>Eve</td>
<del> <td>Jackson</td>
<del> <td>94</td>
<del> </tr>
<del></table>
<del>```
<del><a href='https://www.w3schools.com/html/tryit.asp?filename=tryhtml_table'> DEMO </a>
<del>
<del>### Table Example with more semantic information
<del>```html
<del><!DOCTYPE html>
<del> <html>
<del> <body>
<del> <table>
<del> <thead>
<del> <tr>
<del> <th>Item</th>
<del> <th>Amount</th>
<del> </tr>
<del> </thead>
<del> <tfoot>
<del> <tr>
<del> <td>Apple</td>
<del> <td>10</td>
<del> </tr>
<del> </tfoot>
<del> <tbody>
<del> <tr>
<del> <td>Peach</td>
<del> <td>15</td>
<del> </tr>
<del> <tr>
<del> <td>Watermelon</td>
<del> <td>3</td>
<del> </tr>
<del> </tbody>
<del> </table>
<del> </body>
<del> </html>
<del>```
<del>Result:
<del><table>
<del> <thead>
<del> <tr>
<del> <th>Item</th>
<del> <th>Amount</th>
<del> </tr>
<del> </thead>
<del> <tfoot>
<del> <tr>
<del> <td>Apple</td>
<del> <td>10</td>
<del> </tr>
<del> </tfoot>
<del> <tbody>
<del> <tr>
<del> <td>Peach</td>
<del> <td>15</td>
<del> </tr>
<del> <tr>
<del> <td>Watermelon</td>
<del> <td>3</td>
<del> </tr>
<del> </tbody>
<del> </table>
<del>
<del>
<del>#### More Information:
<del>
<del><a href='https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table' target='_blank' rel='nofollow'>MDN Article on the HTML <table> tag</a>
<ide><path>mock-guide/english/html/tutorials/basic-html/index.md
<del>---
<del>title: Basic HTML
<del>---
<del>## Basic HTML
<del>
<del>This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/html/tutorials/basic-html/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>.
<del>
<del><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>.
<del>
<del><!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
<del>Structure of a basic HTML file:
<del>
<del>```html
<del><!doctype html>
<del><html>
<del>
<del> <head>
<del> <title></title>
<del> </head>
<del>
<del> <body>
<del> </body>
<del></html>
<del>```
<del>#### More Information:
<del><!-- Please add any articles you think might be helpful to read before writing the article -->
<del>
<del>
<ide><path>mock-guide/english/html/tutorials/basic-html/radio-button/index.md
<del>---
<del>title: Radio Button
<del>---
<del>
<del># Radio Button
<del>
<del>```html
<del><!DOCTYPE html>
<del><html>
<del><body>
<del>
<del><form action="/action_page.php">
<del> <input type="radio" name="gender" value="male"> Male<br>
<del> <input type="radio" name="gender" value="female"> Female<br>
<del> <input type="radio" name="gender" value="other"> Other<br>
<del> <input type="submit" value="Submit">
<del></form>
<del>
<del></body>
<del></html>
<del>```
<del>Radio buttons can be used to select a single option out of multiple options. You aren't allowed to choose 2 or more radio buttons in the same selection field.
<ide><path>mock-guide/english/html/tutorials/center-an-image-using-text-align-center/index.md
<del>---
<del>title: Center an Image Using Text Align Center
<del>---
<del>## Center an Image Using Text Align Center
<del>
<del>An `<img>` element is an inline element (display value of `inline-block`). It can be easily centered by adding the `text-align: center;` CSS property to the parent element
<del>that contains it.
<del>
<del>To center an image using `text-align: center;` you must place the `<img>` inside of a block-level element such as a `div`.
<del>Since the `text-align` property only applies to block-level elements, you place `text-align: center;` on the wrapping block-level element to achieve a horizontally centered `<img>`.
<del>
<del>### Example
<del>
<del>```html
<del><!DOCTYPE html>
<del><html>
<del> <head>
<del> <title>Center an Image using text align center</title>
<del> <style>
<del> .img-container {
<del> text-align: center;
<del> }
<del> </style>
<del> </head>
<del> <body>
<del> <div class="img-container"> <!-- Block parent element -->
<del> <img src="user.png" alt="John Doe">
<del> </div>
<del> </body>
<del></html>
<del>```
<del>
<del>**Note:** The parent element must be a block element. If it is not a block element, you should add ```display: block;``` CSS property along with the ```text-align``` property.
<del>
<del>```html
<del><!DOCTYPE html>
<del><html>
<del> <head>
<del> <title>Center an Image using text align center</title>
<del> <style>
<del> .img-container {
<del> text-align: center;
<del> display: block;
<del> }
<del> </style>
<del> </head>
<del> <body>
<del> <span class="img-container"> <!-- Inline parent element -->
<del> <img src="user.png" alt="">
<del> </span>
<del> </body>
<del></html>
<del>```
<del>
<del>**Demo:** [Codepen](https://codepen.io/aravindio/pen/PJMXbp)
<del>
<del>## Documentation
<del><a href='https://developer.mozilla.org/en-US/docs/Web/CSS/text-align' target='_blank' rel='nofollow'>**text-align** - MDN</a>
<del>
<del><a href='https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img' target='_blank' rel='nofollow'>**\<img\>** - MDN</a>
<ide><path>mock-guide/english/html/tutorials/embedding-youtube-videos/index.md
<del>---
<del>title: Embedding Youtube Videos
<del>---
<del>## Embedding Youtube Videos
<del>
<del>Probably a lot of times you have seen embedded videos on your favorite websites. Today we will talk about embedding YouTube videos, what is very easy to do, even if you don't have any knowledge about it. For this action we will use `<frame>` element, which is very useful in embedding other HTMLs. It's very often used to promote some products as adds. Notice that you're not only limited to YouTube - you can also experiment with other documents.
<del>
<del>### `<frame>` Element
<del>
<del>#### Using
<del>You can easily put your chosen video by using `<frame>` element. But remember, you also need to define height and width of your player, so we will use attributes `height` and `width`.
<del>
<del>What we will need?
<del>- Video on YouTube and URL
<del>- `<frame>` element (don't forget to close it!)
<del>- `width` and `height` attributes
<del>
<del>```html
<del><iframe width="420" height="315"
<del>src="https://www.youtube.com/watch?v=v8kFT4I31es">
<del></iframe>
<del>```
<del>
<del>Inserted values are recommended, but feel free to change them in a way that you would like.
<del>
<del>#### Autoplay
<del>What should we do if we would like to make this player starting automatically playing? Just add to your link value `?autoplay=1`. But be careful, because it can be annoying for a lot of people visiting your webpage.
<del>
<del>```html
<del><iframe width="420" height="315"
<del>src="https://www.youtube.com/watch?v=v8kFT4I31es?autoplay=1">
<del></iframe>
<del>```
<ide><path>mock-guide/english/html/tutorials/how-to-create-an-html-button-that-acts-like-a-link/index.md
<del>---
<del>title: How to Create an HTML Button That Acts Like a Link
<del>---
<del>## How to Create an HTML Button That Acts Like a Link
<del>
<del>Sometimes you may want to use a button to link to another page or website rather than to submit a form or something like that. This is fairly simple to do and can be achieved in several ways.
<del>
<del>One way is to simply wrap your `<button>` tag in an `<a>` tag:
<del>
<del>```html
<del><a href='https://www.freecodecamp.org/'><button>Link To freeCodeCamp</button></a>
<del>```
<del>
<del>This transforms your entire button into a link.
<del>
<del>A second option is to create your link as you normally would with your `<a>` tag and then style it via CSS:
<del>
<del>```html
<del><a href='https://www.freecodecamp.org/'>Link To freeCodeCamp</a>
<del>```
<del>
<del>Once you've created your link, you can the use CSS to make it look like a button. For instance, you could add a border, a background color, some styles for when the user is hovering the link...
<del>
<del>Another way to add a button is to wrap an `input` inside `form` tags. Specify the desired target URL in the form action attribute.
<del>
<del>```html
<del><form action="http://google.com">
<del> <input type="submit" value="Go to Google" />
<del></form>
<del>```
<del>
<del>#### More Information:
<del>* [FreeCodeCamp Guide - styling buttons](https://guide.freecodecamp.org/css/css-buttons/)
<del>* [How to create an HTML button that acts like a link?](https://stackoverflow.com/questions/2906582/how-to-create-an-html-button-that-acts-like-a-link)
<ide><path>mock-guide/english/html/tutorials/how-to-horizontally-center-a-div-tag-in-another-div-tag/index.md
<del>---
<del>title: How to Horizontally Center a Div Tag in Another Div Tag
<del>---
<del>## How to Horizontally Center a Div Tag in Another Div Tag
<del>Horizontally centering a `<div>` inside of another `<div>` is pretty easy.
<del>
<del>Let's start by creating two div tags with "parent" and "child" classes. The parent will be our container, and the child will be the `<div>` we're horizontally centering.
<del>
<del>```html
<del><!DOCTYPE html>
<del><html>
<del><head>
<del> <meta charset="UTF-8">
<del> <title>How to Horizontally Center a Div Tag in Another Div Tag</title>
<del></head>
<del><body>
<del> <div class="parent">
<del> <div class="child">
<del> <p>This is the center.</p>
<del> </div>
<del> </div>
<del></body>
<del></html>
<del>```
<del>
<del>There are a couple ways you can tacklet this, but for this tutorial let's focus on two. In the first we'll center our child `<div>` using `margin` and in the second we'll use `flexbox`.
<del>
<del>
<del>### Example of Centering a Div Tag with Margins
<del>If you specify a `width` on your child div you can use `margin: auto`. This will center your child `<div>` by evenly distributing it's left-and-right margins.
<del>
<del>```css
<del>.parent {
<del> border: 2px solid red;
<del>}
<del>
<del>.centered-child {
<del> width: 50%;
<del> margin: auto;
<del> border: 1px solid black;
<del>}
<del>```
<del>
<del>### Example of Centering a Div Tag with Flexbox
<del>Using flexbox to center a `<div>` is slightly different. First, it doesn't require you to specify `width` on your child `<div>`. Second, you actually center the child `<div>` by applying css properties on the parent `<div>`.
<del>
<del>To center a child `<div>` using flexbox you need to use `display: flex` along with `justify-content: center` on the parent `<div>`.
<del>
<del>```css
<del>.parent {
<del> display: flex;
<del> justify-content: center;
<del> border: 2px solid red;
<del>}
<del>
<del>.centered-child {
<del> border: 1px solid black;
<del>}
<del>```
<del>
<del>#### More Information:
<del>[Flexbox Support Matrix](http://caniuse.com/#search=flexbox)
<del>
<del>
<ide><path>mock-guide/english/html/tutorials/how-to-insert-spaces-or-tabs-in-text-using-html-and-css/index.md
<del>---
<del>title: How to Insert Spaces or Tabs in Text Using HTML and CSS
<del>---
<del>## How to Insert Spaces or Tabs in Text Using HTML and CSS
<del>
<del>There are a multitude of ways to insert spaces using html. For simplicity sake we will
<del>go over one of these, which are by inserting a Span tag.
<del>
<del>## Span Tag
<del>
<del>``<span>``
<del>
<del>Span Tags ``<span>`` are self closing tags meaning they do not need a ``/>``.
<del>
<del>## Span Example
<del>
<del>An example of how a ``<span>`` tag inserts a space between text can be seen below.
<del>
<del> ``<p>Hello may name is <span> James</p>``
<del>
<del>If you assign a class to your ``<span>`` then you could add some css to it.
<del> Like so,
<del>
<del> ``<p>Hello my name is <span class=tab> James</p>``
<del>
<del>Then either in an external stylesheet or an internal-stylesheet you can give the ``class .tab``
<del>some properties.
<del>
<del>## Span Class Example
<del>
<del>For example
<del>
<del>``.tab {padding-left: 2px;}``
<del>
<del>You can also give the ``<span>`` some inline-style properties, as shown below.
<del>
<del> ``<p>Hello my name is <span style="padding-left: 2px;"> James</p>``
<del>
<del>## More Information
<del>
<del>For more information on the <span> tag or on; How to Insert Spaces or Tabs in Text Using HTML and CSS, you can visit w3schools. https://www.w3schools.com/tags/tag_span.asp
<del>
<del>
<ide><path>mock-guide/english/html/tutorials/how-to-use-links/index.md
<del>---
<del>title: How to Use Links
<del>---
<del>## How to Use Links
<del>
<del>In HTML you can use the `<a>` tag to create a link. For example you can write `<a href="https://www.freecodecamp.org/">freeCodeCamp</a>` to create a link to freeCodeCamp's website.
<del>
<del>Links are found in nearly all web pages. Links allow users to click their way from page to page.
<del>
<del>HTML links are hyperlinks. You can click on a link and jump to another document.
<del>
<del>When you move the mouse over a link, the mouse arrow will turn into a little hand.
<del>
<del>Note: A link does not have to be text. It can be an image or any other HTML element.
<del>
<del>In HTML, links are defined with the <a> tag:
<del>
<del>```html
<del><a href="url">link text</a>
<del>```
<del>
<del>Example
<del>
<del>```html
<del><a href="https://www.freecodecamp.org/">Visit our site for tutorials</a>
<del>```
<del>
<del>The href attribute specifies the destination address (https://www.freecodecamp.org) of the link.
<del>
<del>The link text is the visible part (Visit our site for tutorials).
<del>
<del>Clicking on the link text will send you to the specified address.
<del>
<del>#### More Information:
<del><!-- Please add any articles you think might be helpful to read before writing the article -->
<del>* [MDN - HTML <a> Reference](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a)
<ide><path>mock-guide/english/html/tutorials/how-to-use-lists/index.md
<del>---
<del>title: How to Use Lists
<del>---
<del>## How to Use Lists
<del>Lists are used to specify a set of consecutive items or related information in well formed and semantic way, such as a list of ingredients or a list of procedural steps.
<del>HTML markup has three different types of lists - **ordered**, **unordored** and **description** lists.
<del>
<del>### Ordered Lists
<del>An ordered list is used to group a set of related items, in a specific order.
<del>This list is created with `<ol>` tag. Each list item is surrounded with `<li>` tag.
<del>
<del>##### Code
<del>```html
<del><ol>
<del> <li>Mix ingredients</li>
<del> <li>Bake in oven for an hour</li>
<del> <li>Allow to stand for ten minutes</li>
<del></ol>
<del>```
<del>##### Example
<del><ol>
<del> <li>Mix ingredients</li>
<del> <li>Bake in oven for an hour</li>
<del> <li>Allow to stand for ten minutes</li>
<del></ol>
<del>
<del>### Unordered Lists
<del>An unordered list is used to group a set of related items, in no particular order. This list is created with `<ul>` tag. Each list item is surrounded with `<li>` tag.
<del>
<del>##### Code
<del>
<del>```html
<del><ul>
<del> <li>Chocolate Cake</li>
<del> <li>Black Forest Cake</li>
<del> <li>Pineapple Cake</li>
<del></ul>
<del>```
<del>
<del>
<del>#### Example
<del><ul>
<del> <li>Chocolate Cake</li>
<del> <li>Black Forest Cake</li>
<del> <li>Pineapple Cake</li>
<del></ul>
<del>
<del>
<del>### Description Lists
<del>A description list is used to specify a list of terms and their descriptions. This list is created with `<dl>` tag. Each list item is surrounded with `<dd>` tag.
<del>
<del>##### Code
<del>
<del>```html
<del><dl>
<del> <dt>Bread</dt>
<del> <dd>A baked food made of flour.</dd>
<del> <dt>Coffee</dt>
<del> <dd>A drink made from roasted coffee beans.</dd>
<del></dl>
<del>```
<del>
<del>##### Output
<del><dl>
<del> <dt>Bread</dt>
<del> <dd>A baked food made of flour.</dd>
<del> <dt>Coffee</dt>
<del> <dd>A drink made from roasted coffee beans.</dd>
<del></dl>
<del>
<del>#### Styling List
<del>You can also control the style of the list. You can use `list-style` property of lists. Your list can be bullets, square, in roman numearls or can be images you want.
<del>
<del>`list-style` property is a shorthand for `list-style-type`, `list-style-position`, `list-style-image`.
<del>
<del>#### More Information:
<del>[HTML lists · WebPlatform Docs](https://webplatform.github.io/docs/guides/html_lists/
<del>)
<ide><path>mock-guide/english/html/tutorials/images-in-html/index.md
<del>---
<del>title: Images in HTML
<del>---
<del>
<del>
<del>## Introduction
<del>
<del>You can define images by using the `<img>` tag. It does not have a closing tag since it can contain only attributes.
<del>To insert an image you define the source and an alternative text wich is displayed when the image can not be rendered.
<del>
<del>`src` - This attribute provides the url to image present either on your desktop/laptop or to be included from some other website. Remember the link provided should not be broken otherwise the image will not be produced on your webpage.
<del>
<del>`alt` - This attribute is used to overcome the problem of broken image or incapability of your browser to not being able to produce image on webpage. This attribute as name suggests provide "alternative" to image which is some text describing the image.
<del>
<del>
<del>## Example
<del>
<del>```html
<del><img src="URL of the Image" alt="Descriptive Title" />
<del>```
<del>
<del>### To define height and width of an image you can use the height and width attribute:
<del>```html
<del><img src="URL of the Image" alt="Descriptive Title" height="100" width="150"/>
<del>```
<del>
<del>### You can also define border thickness (0 means no border):
<del>```html
<del><img src="URL of the Image" alt="Descriptive Title" border="2"/>
<del>```
<del>
<del>### Align an image:
<del>```html
<del><img src="URL of the Image" alt="Descriptive Title" align="left"/>
<del>```
<del>
<del>### You are also able to use styles within a style attribute:
<del>```html
<del><img src="URL of the Image" alt="Descriptive Title" style="width: 100px; height: 150px;"/>
<del>```
<del>
<del>Here's an example to make a rounded image:
<del>```html
<del><img src="URL of the Image" alt="Descriptive Title" style="border-radius: 50%;"/>
<del>```
<del>
<del>### More Information
<del>
<del>- See the freeCodeCamp page on the `<img>` tag [here](https://guide.freecodecamp.org/html/elements/img-tag)
<del>- To get more details on images in HTML, check out the [MDN Docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Img)
<ide><path>mock-guide/english/html/tutorials/index.md
<del>---
<del>title: Tutorials
<del>---
<del>## Tutorials
<del>
<del>This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/html/tutorials/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>.
<del>
<del><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>.
<del>
<del><!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
<del>
<del>#### More Information:
<del><!-- Please add any articles you think might be helpful to read before writing the article -->
<del>
<del>
<ide><path>mock-guide/english/html/tutorials/redirect-from-an-html-page/index.md
<del>---
<del>title: Redirect from an HTML Page
<del>---
<del>## Redirect from an HTML Page
<del>
<del>
<del>If you've changed the URL of your HTML page and want to automatically redirect your visitors to the new location of the page, you can use a meta tag within the `<head>` area of your old HTML page.
<del>
<del>``` html
<del><head>
<del> <meta http-equiv="refresh" content="0; url=http://freecodecamp.org/" />
<del></head>
<del>```
<del>In the above example, visitors to the page would be redirected from your old html page to [http://freecodecamp.org/](http://freecodecamp.org/). The attribute of `content="0` means that the browser will redirect to the new page after 0 seconds. Changing the value to `content="2` would redirect after 2 seconds.
<del>
<del>#### More Information:
<del>* [MDN - Redirections in HTTP](https://developer.mozilla.org/en-US/docs/Web/HTTP/Redirections)
<ide><path>mock-guide/english/html/tutorials/text-formatting-in-html/index.md
<del>---
<del>title: Text Formatting in HTML
<del>---
<del>
<del>## Text Formatting in HTML
<del>HTML provides you a lot of useful elements for text formatting. It allows to make your text: bold, italic, mark and much more. Changing the style of your text isn't without any reason - the main thing is just make the reader to take a look for some important notes.
<del>
<del>### Bold and Strong
<del>You can easily change your text meaning by using HTML `<b>` element. It makes words bold, which function is singling out the fragment of sequence. For example:
<del>
<del>```
<del>The most important part of your code is <b>the end</b>, because if you <b>don't close</b> the element, it will affect to <b>everything</b>!
<del>```
<del>
<del>You can also use `<strong>` as well - it adds also semantic "strong" importance. Your browser doesn't recognize a difference between those two elements, but it exists.
<del>
<del>### Italic and Emphasized
<del>Usually used when quote something or putting a translate of word in a lot of articles. It makes them italic - just imagine a little kicked in the right letters. For example:
<del>
<del>```
<del>Theatre - <i>teatos</i>, <i>teates</i> and <i>teatron</i>.
<del>```
<del>
<del>You can also use `<em>` as well - it adds also semantic "emphasized" importance. Your browser doesn't recognize a difference between those two elements, but it exists.
<del>
<del>### Small
<del>It makes your text smaller than normal size of used font. This element's meaning was changed in HTML5 - it represents side-comments and small print.
<del>
<del>```
<del>Normal, <small>small</small>, normal, <small>small</small>!
<del>```
<del>
<del>### Marked
<del>Element `<mark>` makes your text marked - in different words, it makes your text highlighted. You can use it to tell readers that is one of important things in your article. For example:
<del>
<del>```
<del>HTML is full of things and <mark>it's our journey</mark> to get known them better!
<del>```
<del>
<del>### Deleted
<del>The element `<del>` makes your text striked in the center. It's useful to show changes in your documents.
<del>
<del>```
<del>WWI started in <del>1913</del> 1914 year.
<del>```
<del>
<del>### Inserted
<del>Tag `<ins>` makes your text inserted to the article. Using other words that makes it much easier to understand - added. It shows a line under inserted text.
<del>
<del>```
<del>HTML isn't boring. <ins>You can make a lot of combinations of elements!</ins>
<del>```
<del>
<del>### Subscripted
<del>Using element `<sub>` gives you a useful formatting as subscripted text (showing it smaller on the bottom). There is an example code:
<del>
<del>```
<del>This was in 2003 year <sub>(needs a link)</sub>.
<del>```
<del>
<del>### Superscripted
<del>If you want to make an opposite to subscripted text, you can easily use `<sup>` element. It shows a smaller text on the top.
<del>
<del>```
<del>10<sup>x+y</sup> = 1000
<del>```
<ide><path>mock-guide/english/html/tutorials/use-tab-space-instead-of-multiple-non-breaking-spaces-nbsp/index.md
<del>---
<del>title: Use Tab Space Instead of Multiple Non Breaking Spaces Nbsp
<del>---
<del>## Use Tab Space Instead of Multiple Non Breaking Spaces Nbsp
<del>
<del>In HTML the most common way to add multiple spaces is by adding ` ` for each space. To add a tab space put your text in `<pre>` tags, for example `<pre>My Text Here</pre>` and every tab will be treated as eight spaces. Another way to add multiple spaces in HTML would be to use CSS for example `<p style="padding-right: 5px;">My Text Here</p>`.
<del>
<del>#### More Information:
<del>* [MDN - The Preformatted Text element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/pre)
<ide><path>mock-guide/english/html/url-encoding-reference/index.md
<del>---
<del>title: Url Encoding Reference
<del>---
<del>## Url Encoding Reference
<del>
<del>A URL is an address for a website. Just like postal addresses have to follow a specific format to be understood by the postman, URLS have to follow a format to be understood and get you to the right location.
<del>
<del>There are only certain characters that are allowed in the URL string, alphabetic characters, numerals, and a few characters `; , / ? : @ & = + $ - _ . ! ~ * ' ( ) #` that can have special meanings.
<del>
<del>#### Reserved Characters:
<del>
<del>| Character | Meaning |
<del>| --- | --- |
<del>| : | Separate protocol (http) from address |
<del>| / | Separate domain and directories |
<del>| # | Separate anchors |
<del>| ? | Separate query string |
<del>| & | Separate query elements |
<del>| @ | Separate username and password from domain |
<del>| % | Indicates an encoded character |
<del>| + | Indicates a space |
<del>
<del>#### Encoding:
<del>
<del>Any character that is not an alphabetic character, a number, or a reserved character being used needs to be encoded.
<del>
<del>URLs use the ASCII ("American Standard Code for Information Interchange") character-set and so encoding must be to a valid ASCII format.
<del>
<del>There are functions in most web languages to do this encoding for you, for example in JavaScript `encodeURI()` and in PHP `rawurlencode()`.
<del>
<del>| Character | Encoded |
<del>| --- | --- |
<del>| space | %20 |
<del>| ! | %21 |
<del>| " | %22 |
<del>| # | %23 |
<del>| $ | %24 |
<del>| % | %25 |
<del>| & | %26 |
<del>| ' | %27 |
<del>| ( | %28 |
<del>| ) | %29 |
<del>| * | %2A |
<del>| + | %2B |
<del>| , | %2C |
<del>| - | %2D |
<del>| . | %2E |
<del>| / | %2F |
<del>| 0 | %30 |
<del>| 1 | %31 |
<del>| 2 | %32 |
<del>| 3 | %33 |
<del>| 4 | %34 |
<del>| 5 | %35 |
<del>| 6 | %36 |
<del>| 7 | %37 |
<del>| 8 | %38 |
<del>| 9 | %39 |
<del>| : | %3A |
<del>| ; | %3B |
<del>| < | %3C |
<del>| = | %3D |
<del>| > | %3E |
<del>| ? | %3F |
<del>| @ | %40 |
<del>| A | %41 |
<del>| B | %42 |
<del>| C | %43 |
<del>| D | %44 |
<del>| E | %45 |
<del>| F | %46 |
<del>| G | %47 |
<del>| H | %48 |
<del>| I | %49 |
<del>| J | %4A |
<del>| K | %4B |
<del>| L | %4C |
<del>| M | %4D |
<del>| N | %4E |
<del>| O | %4F |
<del>| P | %50 |
<del>| Q | %51 |
<del>| R | %52 |
<del>| S | %53 |
<del>| T | %54 |
<del>| U | %55 |
<del>| V | %56 |
<del>| W | %57 |
<del>| X | %58 |
<del>| Y | %59 |
<del>| Z | %5A |
<del>| [ | %5B |
<del>| \ | %5C |
<del>| ] | %5D |
<del>| ^ | %5E |
<del>| _ | %5F |
<del>| ` | %60 |
<del>| a | %61 |
<del>| b | %62 |
<del>| c | %63 |
<del>| d | %64 |
<del>| e | %65 |
<del>| f | %66 |
<del>| g | %67 |
<del>| h | %68 |
<del>| i | %69 |
<del>| j | %6A |
<del>| k | %6B |
<del>| l | %6C |
<del>| m | %6D |
<del>| n | %6E |
<del>| o | %6F |
<del>| p | %70 |
<del>| q | %71 |
<del>| r | %72 |
<del>| s | %73 |
<del>| t | %74 |
<del>| u | %75 |
<del>| v | %76 |
<del>| w | %77 |
<del>| x | %78 |
<del>| y | %79 |
<del>| z | %7A |
<del>| { | %7B |
<del>| | | %7C |
<del>| } | %7D |
<del>| ~ | %7E |
<del>| ¢ | %A2 |
<del>| £ | %A3 |
<del>| ¥ | %A5 |
<del>| | | %A6 |
<del>| § | %A7 |
<del>| « | %AB |
<del>| ¬ | %AC |
<del>| ¯ | %AD |
<del>| º | %B0 |
<del>| ± | %B1 |
<del>| ª | %B2 |
<del>| , | %B4 |
<del>| µ | %B5 |
<del>| » | %BB |
<del>| ¼ | %BC |
<del>| ½ | %BD |
<del>| ¿ | %BF |
<del>| À | %C0 |
<del>| Á | %C1 |
<del>| Â | %C2 |
<del>| Ã | %C3 |
<del>| Ä | %C4 |
<del>| Å | %C5 |
<del>| Æ | %C6 |
<del>| Ç | %C7 |
<del>| È | %C8 |
<del>| É | %C9 |
<del>| Ê | %CA |
<del>| Ë | %CB |
<del>| Ì | %CC |
<del>| Í | %CD |
<del>| Î | %CE |
<del>| Ï | %CF |
<del>| Ð | %D0 |
<del>| Ñ | %D1 |
<del>| Ò | %D2 |
<del>| Ó | %D3 |
<del>| Ô | %D4 |
<del>| Õ | %D5 |
<del>| Ö | %D6 |
<del>| Ø | %D8 |
<del>| Ù | %D9 |
<del>| Ú | %DA |
<del>| Û | %DB |
<del>| Ü | %DC |
<del>| Ý | %DD |
<del>| Þ | %DE |
<del>| ß | %DF |
<del>| à | %E0 |
<del>| á | %E1 |
<del>| â | %E2 |
<del>| ã | %E3 |
<del>| ä | %E4 |
<del>| å | %E5 |
<del>| æ | %E6 |
<del>| ç | %E7 |
<del>| è | %E8 |
<del>| é | %E9 |
<del>| ê | %EA |
<del>| ë | %EB |
<del>| ì | %EC |
<del>| í | %ED |
<del>| î | %EE |
<del>| ï | %EF |
<del>| ð | %F0 |
<del>| ñ | %F1 |
<del>| ò | %F2 |
<del>| ó | %F3 |
<del>| ô | %F4 |
<del>| õ | %F5 |
<del>| ö | %F6 |
<del>| ÷ | %F7 |
<del>| ø | %F8 |
<del>| ù | %F9 |
<del>| ú | %FA |
<del>| û | %FB |
<del>| ü | %FC |
<del>| ý | %FD |
<del>| þ | %FE |
<del>| ÿ | %FF |
<del>
<del>#### Example:
<del>
<del>```js
<del>encodeURI(Free Code Camp);
<del>// Free%20Code%20Camp
<del>```
<del>
<del>#### More Information:
<del>
<del>[MDN encodeURI()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURI)
<del>
<del>[HTML URL Encoding Reference](https://www.w3schools.com/tags/ref_urlencode.asp)
<ide><path>mock-guide/english/html/utf-8-reference/index.md
<del>---
<del>title: UTF 8 Reference
<del>---
<del>## UTF 8 Reference
<del>
<del>UTF 8 is an encoding scheme used to translate the characters we see on screens into numbers computers can store. Specifying a character encoding like UTF8 will allow the browser to properly display advanced characters like accented letters and emoji.
<del>
<del>In HTML documents, you can specify the character encoding on the page by placing this meta tag in the `head` tag of your HTML page: `<meta charset="UTF-8">`. UTF 8 is the standard encoding.
<del>
<del>The [Unicode](https://www.unicode.org/) standard was developed in order to accomodate the characters used in languages across the world.
<del>
<del>But wait! What does Unicode have to do with UTF 8? UTF 8 is the encoding scheme but it is important to understand Unicode is the character set definition. In plain speak what this means is Unicode defines a unique number - called a code point - for many major characters used in languages across the world and UTF 8 will translate (aka encode) the character into computer-friendly binary format. <sup>1</sup> Here is an example:
<del>
<del> 1. You want to mention freeCodeCamp somewhere in your web page (because, you know, freeCodeCamp is 🔥 🔥 🔥).
<del> 2. The character code points to spell freeCodeCamp as defined in Unicode are:
<del>
<del> | f | r | e | e | C | o | d | e | C | a | m | p |
<del> | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
<del> |102| 114| 101| 101| 67| 111| 100| 101| 67| 97| 109| 112|
<del> 3. UTF 8 translates the code points to binary: 1100110 1110010 1100101 1100101 1000011 1101111 1100100 1100101 1000011 1100001 1101101 1110000
<del>
<del>
<del>### How to use UTF-8 In Your Webpage
<del>
<del>Specify a meta tag with a charset of UTF 8 in your head tag.
<del>
<del>```html
<del><head>
<del> <meta charset="utf-8">
<del></head>
<del>```
<del>
<del>#### More Information:
<del><!-- Please add any articles you think might be helpful to read before writing the article -->
<del>
<del>* [Unicode Character Code Charts](https://www.unicode.org/charts/index.html)
<del>* [HTML Unicode Reference](https://www.w3schools.com/charsets/ref_html_utf8.asp)
<ide><path>mock-guide/english/html/web-sockets/index.md
<del>---
<del>title: WebSockets
<del>---
<del>
<del>## WebSockets
<del>
<del>*Web Sockets* is a technology that allows you to create an interactive connection between a client and a server for exchanging data in real time. WebSockets allow you to work in two streams, which distinguishes this technology from HTTP.
<del>
<del>## How do WebSockets work?
<del>
<del>WebSockets do not need repeated calls to respond. It is enough to make one request and wait for a response. You can listen to the server, which will send the answer on readiness.
<del>
<del>## When can I use WebSockets?
<del>
<del>* Real-Time Applications
<del>* Chat application
<del>* IoT applications
<del>* Multiplayer games
<del>
<del>
<del>## When not to use WebSockets?
<del>
<del>WebSockets are already supported in 95% of browsers, but sometimes this technology is not required. For example, if you are creating a simple CMS where real-time functionality is not required.
<del>
<del>## WebSocket Example
<del>> Frontend (No need for an import, WebSockets are supported by [every major browser])
<del>```javascript
<del>const ws = new WebSocket('ws://localhost:3000');
<del>
<del>ws.onmessage = function(e){
<del> console.log('Message received from WebSocket');
<del> const parsedData = JSON.parse(e.data);
<del> handleData(parsedData);
<del>};
<del>
<del>ws.onopen = function(){
<del> console.log('Websocket open');
<del>}
<del>```
<del>
<del>> Backend (uses [ws](https://github.com/websockets/ws) and [express](https://expressjs.com/), the most common WebSocket client web framework for NodeJS)
<del>```javascript
<del>const SocketServer = require('ws').Server;
<del>const router = require('express').Router();
<del>
<del>const server = express()
<del> .use('/', router)
<del> .listen(3000, () => console.log('Listening on 3000'));
<del>
<del>const wss = new SocketServer({ server });
<del>```
<del>
<del>## Learn more
<del>[Official Mozilla API](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API)
<ide><path>mock-guide/english/php/functions/files/file-writing/index.md
<del>---
<del>title: File Writing
<del>---
<del>## File Writing
<del>
<del>This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/php/functions/files/writing/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>.
<del>
<del><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>.
<del>
<del><!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds -->
<del>### file_put_contents — Write data to a file
<del>
<del>This function is identical to calling fopen(), fwrite() and fclose() successively to write data to a file.
<del>
<del>If filename does not exist, the file is created. Otherwise, the existing file is overwritten, unless the FILE_APPEND flag is set.
<del>
<del>#### Parameters:
<del>
<del>##### filename
<del>Path to the file where to write the data.
<del>
<del>##### data
<del>The data to write. Can be either a string, an array or a stream resource.
<del>
<del>If data is a stream resource, the remaining buffer of that stream will be copied to the specified file. This is similar with using stream_copy_to_stream().
<del>
<del>You can also specify the data parameter as a single dimension array. This is equivalent to file_put_contents($filename, implode('', $array)).
<del>
<del>##### flags
<del>The value of flags can be any combination of the following flags, joined with the binary OR (|) operator.
<del>
<del>
<del>| Flag | Description |
<del>| --- | --- |
<del>| FILE_USE_INCLUDE_PATH | Search for filename in the include directory. See include_path for more information. |
<del>| FILE_APPEND | If file filename already exists, append the data to the file instead of overwriting it. |
<del>| LOCK_EX | Acquire an exclusive lock on the file while proceeding to the writing. In other words, a flock() call happens between the fopen() call and the fwrite() call. This is not identical to an fopen() call with mode "x". |
<del>
<del>##### context
<del>A valid context resource created with stream_context_create().
<del>
<del>### Return Values
<del>This function returns the number of bytes that were written to the file, or FALSE on failure.
<del>
<del>
<del>
<del>
<del>
<del>
<del>
<del>#### More Information:
<del><!-- Please add any articles you think might be helpful to read before writing the article -->
<ide><path>mock-guide/english/xml/index.md
<del>---
<del>title: Extensible Markup Language (XML)
<del>---
<del>## Extensible Markup Language (XML)
<del>
<del> XML stands for eXtensible Markup Language. It is extensible, because it does not use a predefined set of tags for identifying structural components, instead, it provides a mechanism for defining such sets of tags. The main purpose of the language is to share the data. Unlike HTML, in XML there is no predefined set of tags and tags specify meaning, rather than the presentation.
<del>
<del> ## Syntax of XML
<del> XML syntax refers to the rules that determine how an XML application can be written. The XML syntax is very straight forward, and this makes XML very easy to learn.
<del> XML documents must contain one root element that is the parent of all other elements:
<del>
<del>```
<del><root>
<del> <child>
<del> <subchild>.....</subchild>
<del> </child>
<del></root>
<del>```
<del>#### XML must have a root element
<del>Above syntax shows the root element which is necessary while creating an XML code. This can be shown by the example:-
<del>```
<del><?xml version="1.0" encoding="UTF-8"?>
<del><note>
<del> <to>Tove</to>
<del> <from>Jani</from>
<del> <heading>Reminder</heading>
<del> <body>Don't forget me this weekend!</body>
<del></note>
<del>```
<del>In this example 'note' is the root element.
<del>
<del>
<del> * Advantages of using XML:
<del> * Simplicity - XML documents are ordinary text files that can be created and edited with any text editor.
<del> * Vendor independence
<del> * Platform independence
<del> * Extensive infrastructure
<del>
<del> * Disadvantages of using XML:
<del> * Verbose and cumbersome syntax
<del> * Highly inefficient storage
<del>
<del>In Computer Language, eXtensible Markup Language(XML) is that which defines a set or block of Rules which are later used for Encoding documents in such a Format which is both Machine and Human Readable.
<del>
<del>There is a main thing between XML and HTML which makes them different from each other. It is that XML was designed to carry a particular information and focuses on that informaion only. And HTML focuses on displaying that particular Information like design and all these stuff regarding the information.
<del>
<del>Also XML does not uses a predefined tags as used by HTML. It uses user defined tags.
<del>
<del>The following are areas that can be simiplified with XML:
<del>1. data sharing
<del>2. data transport
<del>3. platform changes
<del>4. data availability
<del>
<del>And it's main achievement was that it became a W3C Recommendation as early as in February 1998.
<del>
<del>### More information
<del>
<del>* [XML Introduction](https://developer.mozilla.org/en-US/docs/XML_introduction)
<del>* [Introduction to XML](https://www.w3schools.com/xml/xml_whatis.asp)
<ide><path>mock-guide/spanish/accessibility/accessibility-basics/index.md
<del>---
<del>title: Accessibility Basics
<del>localeTitle: Conceptos básicos de accesibilidad
<del>---
<del>> "Las Artes Oscuras son muchas, variadas, siempre cambiantes y eternas. Luchar contra ellas es como luchar contra un monstruo con muchas cabezas, que, cada vez que se corta un cuello, brota una cabeza aún más feroz e inteligente que antes. Estás luchando contra eso. el cual es fijo, mutante, indestructible ".
<del>>
<del>> \--Profesor Severus Snape, Harry Potter Series
<del>
<del>El rol de la accesibilidad en el desarrollo es esencialmente entender la perspectiva y las necesidades del usuario, y saber que la web y las aplicaciones son una solución para las personas con discapacidades.
<del>
<del>En esta época, se inventan cada vez más nuevas tecnologías para facilitar la vida de los desarrolladores, así como de los usuarios. Hasta qué punto esto es bueno, es un debate para otro momento, por ahora basta con decir que la caja de herramientas de un desarrollador, especialmente un desarrollador web, está tan cambiante como las llamadas "artes oscuras" según nuestro amigo. Snape.
<del>
<del>Una herramienta en esa caja de herramientas debe ser la accesibilidad. Es una herramienta que, idealmente, debería usarse en uno de los primeros pasos para escribir cualquier forma de contenido web. Sin embargo, esta herramienta a menudo no está tan bien presentada en la caja de herramientas de la mayoría de los desarrolladores. Esto podría deberse a un simple caso de no saber que existe incluso en casos extremos, como no preocuparse por ello.
<del>
<del>En mi vida como usuario, y más tarde como desarrollador, que se beneficia de la accesibilidad en cualquier forma de contenido, he visto ambos extremos de ese espectro. Si estás leyendo este artículo, supongo que estás en una de las siguientes categorías:
<del>
<del>* Usted es un desarrollador web novato y le gustaría saber más sobre accesibilidad.
<del>* Eres un desarrollador web experimentado y has perdido tu camino (más sobre esto más adelante)
<del>* Usted siente que hay una obligación legal del trabajo y necesita aprender más sobre ello.
<del>
<del>Si cae fuera de estas categorías bastante amplias, por favor hágamelo saber. Siempre me gusta escuchar de las personas que leen sobre lo que escribo. Implementar la accesibilidad afecta a todo el equipo, desde los colores elegidos por el diseñador, la copia escrita por el redactor publicitario, y hasta usted, el desarrollador.
<del>
<del>## Entonces, ¿qué es la accesibilidad de todos modos?
<del>
<del>La accesibilidad en sí misma es un término un tanto engañoso a veces, especialmente si el inglés es su segundo idioma. A veces se le conoce como diseño inclusivo.
<del>
<del>Si su sitio está en Internet, accesible a cualquier persona con un navegador web, en un sentido, ese sitio web es accesible para todos con un navegador web.
<del>
<del>Pero, ¿es todo el contenido de su sitio web realmente legible, utilizable y comprensible para todos? ¿No hay umbrales que impidan a ciertas personas 'acceder' a toda la información que está exponiendo?
<del>
<del>Podrías hacerte preguntas como las siguientes:
<del>
<del>* Si agrega información que solo está contenida en un archivo de audio, ¿puede una persona sorda obtener esa información?
<del>* Si denota una parte importante de su sitio web con un color determinado, ¿lo sabrá una persona que no conoce los colores?
<del>* Si agrega imágenes en su sitio web que transmiten información importante, ¿cómo lo sabrá una persona ciega o con baja visión?
<del>* Si desea navegar por la aplicación con el teclado o la boquilla, ¿será posible y predecible?
<del>* ¿Su aplicación asume la orientación del dispositivo y qué sucede si el usuario no puede cambiarlo físicamente?
<del>* ¿Hay aspectos perdonados de su solicitud para alguien que podría necesitar más tiempo para completar un formulario?
<del>* ¿Su aplicación aún funciona (mejora progresiva) suponiendo que JavaScript no se carga a tiempo?
<del>* Incluso puede ir tan lejos como para decir, si su sitio web tiene muchos recursos, ¿podrá alguien con una conexión lenta o irregular leer su contenido?
<del>
<del>Aquí es donde la accesibilidad entra en juego. La accesibilidad básicamente implica hacer que su contenido sea tan amigable, tan fácil de 'acceder' como sea posible para la mayor cantidad de personas. Esto incluye a las personas sordas, con baja visión, ciegas, disléxicas, silenciadas, con una conexión lenta, sin color, con epilepsia, fatiga mental, edad, limitaciones físicas, etc.
<del>
<del>## ¿Por qué implementar la accesibilidad?
<del>
<del>Puede pensar que la accesibilidad no se aplica a usted ni a sus usuarios, ¿por qué implementarla? ¿Qué haría una persona ciega con una herramienta de edición de fotos?
<del>
<del>La verdad es que tienes razón hasta cierto punto. Si ha investigado meticulosamente a los usuarios y ha excluido cualquier posibilidad de que cierto grupo de personas visite su sitio web, la prioridad para atender a ese grupo de personas disminuye bastante.
<del>
<del>Sin embargo, hacer esta investigación es clave para defender realmente dicha declaración. ¿Sabías que había [jugadores ciegos?](http://audiogames.net) e incluso [los fotógrafos ciegos?](http://peteeckert.com/) . ¿Quizás sabías que los [músicos pueden ser sordos](http://mentalfloss.com/article/25750/roll-over-beethoven-6-modern-deaf-musicians) ?
<del>
<del>Si lo hiciste, bien por ti. Si no, supongo que esto lleva a mi punto de partida más a casa.
<del>
<del>La imagen se complica aún más cuando observamos la legislación que realmente lo obliga a hacer que ciertos sitios web y aplicaciones web sean accesibles. Un buen ejemplo es la [sección 508](http://jimthatcher.com/webcourse1.htm) con sede en los Estados Unidos. En este momento, esta ley se refiere principalmente a organizaciones gubernamentales, sitios web del sector público, etc. Sin embargo, las leyes cambian.
<del>
<del>El año pasado, los sitios web de las aerolíneas se incluyeron en esta lista, lo que significa que incluso en Europa, los desarrolladores de sitios web de las aerolíneas se apresuraron a hacer que su contenido sea accesible. No hacerlo puede dar a su compañía una multa de literalmente decenas de miles de dólares por cada día que el problema no se resuelva.
<del>
<del>Hay variaciones en esta legislación en todo el mundo, algunas más severas y abarcadoras que otras. El no saber sobre este hecho no hace que la demanda desaparezca, tristemente.
<del>
<del>## Ok, entonces la accesibilidad es un gran problema. Ahora, ¿cómo lo implementamos?
<del>
<del>Esa pregunta, lamentablemente, es más difícil de responder de lo que parece. La cita de Harry Potter en la parte superior está ahí por una razón, y no es que yo sea un ávido lector de Fantasía.
<del>
<del>Como dije anteriormente, la accesibilidad es importante para un grupo grande de personas diferentes, cada una con sus propias necesidades. Hacer que su sitio web funcione para todos, literalmente, es una tarea grande y continua.
<del>
<del>Para aportar un poco de método a la locura, se redactaron las Pautas de Accesibilidad al Contenido Web o [WCAG](https://www.wuhcag.com/web-content-accessibility-guidelines/) . Este documento contiene una serie de criterios que puede utilizar para verificar su sitio web. Por ahora, cubriré algunos de los conceptos básicos más importantes aquí. Te señalaré las frutas bajas, por así decirlo. En artículos posteriores, discutiré técnicas más avanzadas como \[WAI-ARIA\], que es importante para aplicaciones basadas en JavaScript.
<del>
<del>### Hablar como los nativos
<del>
<del>La especificación HTML es un documento que describe cómo se debe usar el lenguaje para crear sitios web. Las tecnologías de asistencia, como los lectores de pantalla, los programas de reconocimiento de voz, etc. conocen este documento. Sin embargo, los desarrolladores web a menudo no lo son, o al menos no lo suficiente, y piensan que algo como esto está bien:
<del>
<del>```html
<del>
<del> <div class="awesome-button"></div>
<del>
<del> <span><strong>Huge heading I will style with CSS later</strong></span>
<del>
<del> <span class="clickable-with-JavaScript">English</span>
<del>```
<del>
<del>¿Adivina qué? Los tres de estos elementos rompen varios criterios de WCAG y, por lo tanto, no son accesibles en absoluto.
<del>
<del>El primer elemento rompe el llamado 'nombre, rol, valor-criterio', que establece que todos los elementos en una página web deben exponer su nombre, su rol (botón similar) y su valor (como el contenido de un campo de edición) a las tecnologías asistivas. Este div realmente no proporciona ninguno de los tres, haciéndolo invisible para los lectores de pantalla.
<del>
<del>El segundo elemento parece un encabezado visual después de estilizarlo con CSS, pero semánticamente es un lapso. Por lo tanto, las tecnologías de asistencia no sabrán que es un título. Un lector de pantalla leerá esto como texto regular, en lugar de un encabezado. Los lectores de pantalla a menudo tienen una tecla de acceso rápido para saltar rápidamente al encabezado más cercano, este encabezado no se incluirá en ese alcance.
<del>
<del>El tercer elemento podría ser, por ejemplo, un elemento en el que un usuario puede hacer clic para cambiar el idioma del sitio web. Tal vez un menú animado de idiomas se expandirá cuando se haga clic. Sin embargo, esto también es un lapso y no expone su función (enlace o botón), lo que hace que las tecnologías de asistencia piensen que esta es solo la palabra inglés con algo de estilo.
<del>
<del>Spans y divs no son elementos. Están destinados a contener otros elementos, no a ser elementos en sí mismos. Puedes arreglar esto de dos maneras:
<del>
<del>* Puede agregar manualmente atributos ARIA a los elementos anteriores. Este es un tema avanzado y fuera del alcance de este artículo.
<del>* O, simplemente puede hacer esto:
<del>
<del>```html
<del>
<del> <button>This is a button</button>
<del>
<del> <h2>Here's a heading level two</h2>
<del>
<del> <a href="JavascriptThing">English</a>
<del>```
<del>
<del>Auge. De repente, todos estos elementos ahora son perfectamente accesibles, solo mediante el uso de HTML nativo. HTML de la forma en que estaba destinado a ser utilizado, en otras palabras.
<del>
<del>### Una fundación no puede soportar sin estructura.
<del>
<del>Un poco antes, toqué las teclas de acceso rápido de un lector de pantalla para saltar de un encabezado a otro. De hecho, hay muchas teclas de acceso rápido como esta para saltar rápidamente a la tabla más cercana, campo de formulario, enlace, etc. Asegurarse de que estos encabezados estén realmente en lugares lógicos es una buena práctica y realmente disminuye los niveles de estrés de los usuarios de la tecnología de asistencia, lo cual es bueno Si quieres que los visitantes sigan regresando a tu sitio web.
<del>
<del>También recuerda que los encabezados son jerárquicos. Si usas un h2, asegúrate de que los h3 que lo siguen tengan algo que ver con ese h2. No coloque un h3 para detalles de contacto debajo de su h2 para publicaciones de blog recientes. Una buena analogía aquí es un libro con capítulos, que tienen subsecciones. No pondría una sección sobre cómo hornear galletas en medio de un capítulo sobre la preparación de verduras ... o ... no lo haría ... ¿verdad?
<del>
<del>### ¿Cuál es la alternativa?
<del>
<del>Las imágenes en un sitio web son excelentes. Añaden una nueva capa a su contenido, realmente pueden hacer que la experiencia de los visitantes de su sitio sea mucho más inmersiva y, en general, se vea bien entre todo ese texto. Una imagen puede decir más que mil palabras, ¿verdad?
<del>
<del>Ciertamente. Es decir, si puedes verlos. En la especificación HTML5, un atributo img siempre debe tener un atributo alt. Este atributo está pensado como una alternativa a la imagen en caso de que no se pueda ver. Esto sería cierto para los visitantes ciegos de su sitio web, pero también cuando su imagen no se pueda cargar por algún motivo. Por lo tanto, no agregar una etiqueta alt a un atributo img no solo rompe la accesibilidad, sino que va en contra de la especificación HTML5.
<del>
<del>Imploro a cualquier desarrollador web que se sorprenda haciendo esto para comerse el sombrero de su programador y trabajar en Windows 95 exclusivamente durante una semana. Después de que se acabe el tiempo, escribe un ensayo sobre lo que has aprendido de esta prueba para que pueda reírme durante mi café de la tarde.
<del>
<del>Ahora, hay una advertencia aquí. Los atributos Alt son obligatorios según la especificación HTML5, pero no es obligatorio rellenarlos. `<img src="awesome-image.jpg", alt="">` es un código HTML5 legal.
<del>
<del>¿Debería por lo tanto llenar las etiquetas alt para todas las imágenes? Depende de la imagen, de verdad. Para las imágenes de fondo, la respuesta suele ser no, pero de todos modos debería usar CSS.
<del>
<del>Para imágenes puramente decorativas que no tienen información en absoluto, básicamente tiene la libertad de elegir. O bien poner algo útil y descriptivo o nada en absoluto.
<del>
<del>Para las imágenes que contienen información, como un folleto, un mapa, un gráfico, etc., no agregue saltos de texto alternativos WCAG a menos que proporcione una alternativa textual. Este suele ser un atributo alternativo, pero también puede ser un bloque de texto justo debajo o al lado de la imagen.
<del>
<del>Para imágenes de texto, el texto se puede incluir en el atributo alt o se puede ofrecer de alguna manera alternativa. El problema es que agregar la alternativa textual en la misma página básicamente haría que el mismo contenido se muestre dos veces para las personas que pueden ver la imagen, por lo que el atributo alt es mejor en este caso.
<del>
<del>El texto debe proporcionar el contexto y la información que es una alternativa para ver la imagen. Simplemente no es suficiente escribir "imagen de globos aerostáticos": ¿por qué hay imágenes de globos allí? Si la imagen está estilizada o transmite un significado emocional, esto puede incluirse.
<del>
<del>### No puedo leer tu garabato hijo
<del>
<del>Incluso las personas que no usan gafas y no tienen ningún problema con la vista se benefician de una fuente fácil de leer y un contraste adecuado. Estoy seguro de que te estremecerías si tuvieras que rellenar un formulario en el que las letras de color amarillo claro y sin remedio se colocan sobre un fondo blanco. Para las personas cuya vista no es tan buena, como su abuela, por ejemplo, esto se vuelve irremediablemente peor.
<del>
<del>La WCAG tiene relaciones de contraste para letras más pequeñas y más grandes y hay muchas herramientas para verificar si las relaciones de contraste son lo suficientemente fuertes. La información y las herramientas están ahí, ve y úsala.
<del>
<del>Un buen lugar para comenzar a verificar el contraste de color es mediante el uso del [verificador de](https://webaim.org/resources/contrastchecker/) contraste de color [WebAIM](https://webaim.org/resources/contrastchecker/) .
<del>
<del>### Qué hace este botón?
<del>
<del>Mientras estamos en el tema de los formularios, echemos un vistazo rápido a la etiqueta de `input` . Este pequeño es algo importante.
<del>
<del>Cuando coloca algunos campos de entrada en una página web, puede usar etiquetas para ... bueno ... etiquetarlos. Sin embargo, ponerlos uno al lado del otro no es suficiente. El atributo que desea es el atributo for, que toma el ID de un campo de entrada posterior. De esta manera, las tecnologías de asistencia saben qué etiqueta asociar con qué campo de formulario.
<del>
<del>Supongo que la mejor manera de ilustrar esto es dando un ejemplo:
<del>
<del>```html
<del>
<del> <label for='username'>
<del>
<del> <input type='text' id='username'>
<del>```
<del>
<del>Esto hará que, por ejemplo, un lector de pantalla diga "nombre de usuario, campo de edición de texto", en lugar de solo informar el "campo de edición de texto" y requiera que el usuario busque una etiqueta. Esto también ayuda realmente a las personas que usan software de reconocimiento de voz.
<del>
<del>### Eso es una tarea difícil
<del>
<del>Tomemos un pequeño descanso. Quiero que veas una página web muy bien diseñada. Puede ser cualquier página. Vamos, voy a esperar.
<del>
<del>¿Espalda? Vale genial. Ahora, mira la página de nuevo, pero desactiva todos los CSS. ¿Todavía se ve bien? ¿El contenido de la página aún está en un orden lógico? Si es así, genial. Has encontrado una página con una estructura HTML decente. (Una forma de ver fácilmente una página sin CSS es cargar el sitio en la [Herramienta de evaluación de accesibilidad web WAVE](http://wave.webaim.org) de WebAIM. Luego, haga clic en la pestaña "Sin estilos" para verla sin estilos).
<del>
<del>Si no, genial. Ahora tiene una impresión de lo que tengo que enfrentar a diario cuando me encuentro con un sitio web mal estructurado.
<del>
<del>Revelación completa: tiendo a maldecir cuando esto sucede. Ruidosamente. Con vigor.
<del>
<del>¿Por qué esto es tan importante? Lo explicaré.
<del>
<del>_¡Alerta de spoiler!_ Para aquellos que solo han cubierto el plan de estudios HTML / CSS hasta ahora, vamos a avanzar un poco.
<del>
<del>Los lectores de pantalla y otras tecnologías de asistencia representan una representación completa de una página web basada en el DOM de su sitio web. Todo el CSS posicional se ignora en esta versión de la página web.
<del>
<del>DOM significa Document Object Model y es la estructura en forma de árbol de los elementos HTML de su sitio web. Todos sus elementos HTML son nodos que se vinculan jerárquicamente en función de las etiquetas HTML que utiliza y JavaScript. Los lectores de pantalla usan este árbol DOM para trabajar con su código HTML.
<del>
<del>Si coloca su elemento en la parte superior de su elemento, también se mostrará en la parte superior de su árbol DOM. por lo tanto, el lector de pantalla también lo colocará en la parte superior, incluso si lo mueve hacia la parte inferior de la página utilizando CSS.
<del>
<del>Por lo tanto, un consejo final que quiero darles todo es prestar atención al orden de su HTML, no solo a su sitio web terminado con CSS agregado. ¿Sigue teniendo sentido sin CSS? ¡Estupendo!
<del>
<del>Oh ... no lo hace? En ese caso ... es posible que algún día escuches una maldición apagada en una brisa fría mientras caminas afuera. Eso es muy probable que sea yo, visitando su sitio web.
<del>
<del>En ese caso realmente solo tengo dos palabras para ti. A menudo he escuchado esas mismas dos palabras dirigidas a mí cuando escribí un código incorrecto y es con gran placer que les digo: "¡váyanse a arreglar!"
<del>
<del>### Contraste de color
<del>
<del>El contraste de color debe ser un mínimo de 4.5: 1 para texto normal y 3: 1 para texto grande. "Texto grande" se define como texto que tiene al menos 18 puntos (24px) o 14 puntos (18.66px) y negrita. [Comprobador de Contraste](https://webaim.org/resources/contrastchecker/)
<del>
<del>## Conclusión
<del>
<del>Le he contado sobre la accesibilidad, qué es, qué no es y por qué es importante.
<del>
<del>También te he dado lo básico, lo más básico, de hacer que la accesibilidad sea correcta. Sin embargo, estos elementos básicos son muy poderosos y pueden hacer su vida mucho más fácil al codificar la accesibilidad.
<del>
<del>Si hablamos en términos de la FCC, debe tener esto en cuenta al realizar el plan de estudios HTML / CSS, así como el plan de estudios de JavaScript.
<del>En los artículos posteriores, abordaré varios temas más de primera clase. Una serie de preguntas que voy a responder son:
<del>
<del>* Agregar encabezados estructurados suena como una buena idea, pero no encajan en mi diseño. ¿Qué debo hacer?
<del>* ¿Hay alguna manera de escribir contenido que solo vean los lectores de pantalla y otras tecnologías de asistencia?
<del>* ¿Cómo hago accesibles los componentes personalizados de JavaScript?
<del>* ¿Qué herramientas hay, además de las pruebas de usuario inclusivas, que pueden usarse para desarrollar la experiencia más sólida y accesible para el grupo más grande de usuarios?
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/accessibility/index.md
<del>---
<del>title: Accessibility
<del>localeTitle: Accesibilidad
<del>---
<del>## Accesibilidad
<del>
<del>**La accesibilidad web significa que las personas con discapacidades pueden usar la web** .
<del>
<del>Más específicamente, la accesibilidad a la Web significa que las personas con discapacidades pueden percibir, comprender, navegar e interactuar con la Web, y que pueden Contribuye a la web. La accesibilidad web también beneficia a otros, incluidas [las personas mayores](https://www.w3.org/WAI/bcase/soc.html#of) con habilidades cambiantes Debido al envejecimiento.
<del>
<del>La accesibilidad a la Web abarca todas las discapacidades que afectan el acceso a la Web, incluyendo visual, auditiva, física, del habla, cognitiva y neurológica. discapacidades El documento [Cómo las personas con discapacidades usan la web](http://www.w3.org/WAI/intro/people-use-web/Overview.html) describe cómo diferentes las discapacidades afectan el uso de la Web e incluyen escenarios de personas con discapacidades que utilizan la Web.
<del>
<del>La accesibilidad web también **beneficia a las** personas _sin_ discapacidad. Por ejemplo, un principio clave de la accesibilidad web es el diseño de sitios web y software. que son flexibles para satisfacer diferentes necesidades de los usuarios, preferencias y situaciones. Esta **flexibilidad** también beneficia a las personas _sin_ discapacidad en ciertos situaciones, como personas que utilizan una conexión lenta a Internet, personas con "discapacidades temporales", como un brazo roto, y personas con capacidades cambiantes Debido al envejecimiento. El documento [Desarrollo de un caso de negocio de accesibilidad web para su organización](https://www.w3.org/WAI/bcase/Overview) describe muchos Diferentes beneficios de la accesibilidad web, incluyendo **beneficios para las organizaciones** .
<del>
<del>La accesibilidad a la web también debe incluir a las personas que no tienen acceso a Internet ni a las computadoras.
<del>
<del>Una importante guía para el desarrollo web fue presentada por el [World Wide Web Consortium (W3C)](https://www.w3.org/) , la [Iniciativa de Accesibilidad Web.](https://www.w3.org/WAI/) de donde obtenemos el [WAI-ARIA](https://developer.mozilla.org/en-US/docs/Learn/Accessibility/WAI-ARIA_basics) , el paquete de aplicaciones de Internet enriquecidas accesibles. Donde WAI aborda la semántica de html para enganchar más fácilmente el árbol DOM, ARIA intenta crear aplicaciones web, especialmente aquellas desarrolladas con javascript y AJAX, más accesible.
<del>
<del>El uso de imágenes y gráficos en sitios web puede disminuir la accesibilidad para las personas con discapacidades visuales. Sin embargo, esto no significa que los diseñadores deben evitar utilizando estos elementos visuales. Cuando se usan correctamente, los elementos visuales pueden transmitir el aspecto apropiado a los usuarios sin discapacidades y deben usarse para hacerlo Para utilizar estos elementos de manera adecuada, los diseñadores web deben usar el texto alternativo para comunicar el mensaje de estos elementos a aquellos que no pueden ver. ellos. El texto alternativo debe ser corto y al punto, generalmente [no más de cinco a 15 palabras](https://www.thoughtco.com/writing-great-alt-text-3466185) . Si un El gráfico se utiliza para transmitir información que excede las limitaciones del texto alternativo, esa información también debe existir como texto web para que se pueda leer por pantalla lectores [Aprenda más sobre el texto alternativo](https://webaim.org/techniques/alttext/) .
<del>
<del>Al igual que el texto Alt es para personas con discapacidades visuales, las transcripciones del audio son para las personas que no pueden escuchar. Proporcionar un documento escrito o una transcripción de lo que se está hablando accesible a las personas con problemas de audición.
<del>
<del>Copyright © 2005 [World Wide Web Consortium](http://www.w3.org) , ( [MIT](http://www.csail.mit.edu/) , [ERCIM](http://www.ercim.org) , [Keio](http://www.keio.ac.jp) , [Beihang](http://ev.buaa.edu.cn) ). http://www.w3.org/Consortium/Legal/2015/doc-license
<del>
<del>### Más información:
<del>
<del>[w3.org introducción a la accesibilidad.](https://www.w3.org/WAI/intro/accessibility.php) [El proyecto A11Y](http://a11yproject.com/)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/agile/index.md
<del>---
<del>title: Agile
<del>localeTitle: Ágil
<del>---
<del>## Ágil
<del>
<del>El desarrollo de software ágil es una colección de metodologías utilizadas para administrar equipos de desarrolladores. Aboga por la planificación adaptativa, el desarrollo evolutivo, la entrega temprana y la mejora continua, y alienta una respuesta rápida y flexible al cambio. Las personas y la comunicación son consideradas más importantes que las herramientas y procesos.
<del>
<del>Agile hace hincapié en preguntar a los usuarios finales qué es lo que quieren y mostrarles con frecuencia demostraciones del producto a medida que se desarrolla. Esto contrasta con el enfoque de "Cascada", el desarrollo basado en especificaciones y lo que los profesionales de Agile denominan "Gran diseño frontal". En estos enfoques, las características se planifican y presupuestan antes de que comience el desarrollo.
<del>
<del>Con Agile, el énfasis está en la "agilidad": poder responder rápidamente a los comentarios de los usuarios y otras circunstancias cambiantes.
<del>
<del>
<del>
<del>Hay muchos sabores diferentes de ágil, incluyendo Scrum y Programación Extrema.
<del>
<del>### Más información
<del>
<del>[Página de inicio de Agile Alliance](https://www.agilealliance.org/)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/algorithms/algorithm-design-patterns/behavioral-patterns/index.md
<del>---
<del>title: Behavioral patterns
<del>localeTitle: Patrones de comportamiento
<del>---
<del>## Patrones de comportamiento
<del>
<del>Los patrones de diseño de comportamiento son patrones de diseño que identifican problemas comunes de comunicación entre objetos y realizan estos patrones. Al hacerlo, estos patrones aumentan la flexibilidad para llevar a cabo esta comunicación, haciendo que el software sea más confiable y fácil de mantener.
<del>
<del>Ejemplos de este tipo de patrón de diseño incluyen:
<del>
<del>1. **Patrón de cadena de responsabilidad** : los objetos de comando se manejan o pasan a otros objetos mediante objetos de procesamiento que contienen lógica.
<del>2. **Patrón de comando** : los objetos de comando encapsulan una acción y sus parámetros.
<del>3. **Patrón de intérprete** : implemente un lenguaje informático especializado para resolver rápidamente un conjunto específico de problemas.
<del>4. **Patrón de iterador** : los iteradores se utilizan para acceder a los elementos de un objeto agregado de forma secuencial sin exponer su representación subyacente.
<del>5. **Patrón de mediador** : proporciona una interfaz unificada a un conjunto de interfaces en un subsistema.
<del>6. **Patrón de recuerdo** : proporciona la capacidad de restaurar un objeto a su estado anterior (retroceso).
<del>7. **Patrón de objeto nulo** : diseñado para actuar como un valor predeterminado de un objeto.
<del>8. **Patrón de observador** : también conocido como P **ublish / Subscribe** o **Event Listener** . Los objetos se registran para observar un evento que puede ser provocado por otro objeto.
<del>9. **Patrón de referencia débil** : desacoplar un observador de un observable.
<del>10. **Pila de protocolos** : las comunicaciones se manejan mediante varias capas, que forman una jerarquía de encapsulación.
<del>11. **Patrón de** tarea programada: una tarea está programada para realizarse en un intervalo determinado o en un tiempo de reloj (usado en computación en tiempo real).
<del>12. **Patrón de visitante de servicio único** : optimice la implementación de un visitante que se asigna, se usa solo una vez y luego se elimina.
<del>13. **Patrón de especificación** : lógica empresarial recombinante de forma booleana.
<del>14. **Patrón de estado** : una forma limpia de que un objeto cambie parcialmente su tipo en tiempo de ejecución.
<del>15. **Patrón de estrategia** : los algoritmos se pueden seleccionar sobre la marcha.
<del>16. **Patrón de método de plantilla** : describe el esqueleto del programa de un programa.
<del>17. **Patrón de visitante** : una forma de separar un algoritmo de un objeto.
<del>
<del>### Fuentes
<del>
<del>[https://en.wikipedia.org/wiki/Behavioral\_pattern](https://en.wikipedia.org/wiki/Behavioral_pattern)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/algorithms/algorithm-design-patterns/index.md
<del>---
<del>title: Algorithm Design Patterns
<del>localeTitle: Patrones de diseño de algoritmos
<del>---
<del>## Patrones de diseño de algoritmos
<del>
<del>En ingeniería de software, un patrón de diseño es una solución general repetible a un problema común en el diseño de software. Un patrón de diseño no es un diseño terminado que se puede transformar directamente en código. Es una descripción o plantilla sobre cómo resolver un problema que se puede utilizar en muchas situaciones diferentes.
<del>
<del>Los patrones de diseño pueden acelerar el proceso de desarrollo al proporcionar paradigmas de desarrollo probados y comprobados.
<del>
<del>Estos patrones se dividen en tres categorías principales:
<del>
<del>### Patrones creacionales
<del>
<del>Estos son patrones de diseño que tratan con los mecanismos de creación de objetos, tratando de crear objetos de una manera adecuada a la situación. La forma básica de creación de objetos podría provocar problemas de diseño o una mayor complejidad al diseño. Los patrones de diseño creacional resuelven este problema controlando de alguna manera la creación de este objeto.
<del>
<del>### Patrones estructurales
<del>
<del>Estos son patrones de diseño que facilitan el diseño al identificar una forma sencilla de establecer relaciones entre entidades.
<del>
<del>### Patrones de comportamiento
<del>
<del>Estos son patrones de diseño que identifican patrones de comunicación comunes entre objetos y realizan estos patrones. Al hacerlo, estos patrones aumentan la flexibilidad para llevar a cabo esta comunicación.
<del>
<del>#### Más información:
<del>
<del>[Patrones de diseño - Wikipedia](https://en.wikipedia.org/wiki/Design_Patterns)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/algorithms/avl-trees/index.md
<del>---
<del>title: AVL Trees
<del>localeTitle: Árboles AVL
<del>---
<del>## Árboles AVL
<del>
<del>Un árbol AVL es un subtipo de árbol de búsqueda binario.
<del>
<del>Un BST es una estructura de datos compuesta por nodos. Cuenta con las siguientes garantías:
<del>
<del>1. Cada árbol tiene un nodo raíz (en la parte superior).
<del>2. El nodo raíz tiene cero o más nodos secundarios.
<del>3. Cada nodo secundario tiene cero o más nodos secundarios, y así sucesivamente.
<del>4. Cada nodo tiene hasta dos hijos.
<del>5. Para cada nodo, sus descendientes izquierdos son menores que el nodo actual, que es menor que los descendientes derechos.
<del>
<del>Los árboles AVL tienen una garantía adicional:
<del>
<del>6. La diferencia entre la profundidad de los subárboles derecho e izquierdo no puede ser más de uno. Para mantener esta garantía, una implementación de una AVL incluirá un algoritmo para reequilibrar el árbol cuando agregar un elemento adicional alteraría esta garantía.
<del>
<del>Los árboles AVL tienen un peor tiempo de búsqueda, inserción y eliminación de O (log n).
<del>
<del>### Rotación a la derecha
<del>
<del>
<del>
<del>### Rotación a la izquierda
<del>
<del>
<del>
<del>### Proceso de Inserción AVL
<del>
<del>Hará una inserción similar a una inserción en el árbol de búsqueda binario normal. Después de la inserción, arregla la propiedad AVL usando rotaciones a la izquierda o derecha.
<del>
<del>* Si hay un desequilibrio en el hijo izquierdo del subárbol derecho, se realiza una rotación de izquierda a derecha.
<del>* Si hay un desequilibrio en el hijo izquierdo del subárbol izquierdo, se realiza una rotación a la derecha.
<del>* Si hay un desequilibrio en el elemento secundario derecho del subárbol derecho, se realiza una rotación hacia la izquierda.
<del>* Si hay un desequilibrio en el lado derecho del subárbol izquierdo, se realiza una rotación de derecha a izquierda.
<del>
<del>#### Más información:
<del>
<del>[YouTube - AVL Tree](https://www.youtube.com/watch?v=7m94k2Qhg68)
<del>
<del>Un árbol AVL es un árbol de búsqueda binaria auto-equilibrado. Un árbol AVL es un árbol de búsqueda binario que tiene las siguientes propiedades: -> Los subárboles de cada nodo difieren en altura como máximo en uno. -> Cada subárbol es un árbol AVL.
<del>
<del>El árbol AVL verifica la altura de los subárboles izquierdo y derecho y asegura que la diferencia no sea mayor que 1. Esta diferencia se denomina factor de balance. La altura de un árbol AVL es siempre O (Logn) donde n es el número de nodos en el árbol.
<del>
<del>Rotaciones de árboles AVL: -
<del>
<del>En el árbol AVL, después de realizar cada operación, como la inserción y la eliminación, debemos verificar el factor de equilibrio de cada nodo en el árbol. Si cada nodo satisface la condición del factor de equilibrio, entonces concluimos la operación, de lo contrario, debemos hacerlo equilibrado. Utilizamos las operaciones de rotación para equilibrar el árbol cuando este se desequilibra debido a cualquier operación.
<del>
<del>Las operaciones de rotación se utilizan para hacer que un árbol esté equilibrado. Hay cuatro rotaciones y se clasifican en dos tipos: -> Rotación Izquierda Única (Rotación LL) En LL Rotation, cada nodo se mueve una posición hacia la izquierda desde la posición actual. -> Rotación única hacia la derecha (Rotación RR) En la rotación RR, cada nodo se mueve una posición hacia la derecha desde la posición actual. -> Rotación izquierda derecha (Rotación LR) La rotación LR es una combinación de una sola rotación a la izquierda seguida de una sola rotación a la derecha. En LR Rotation, primero cada nodo mueve una posición a la izquierda y luego una posición a la derecha desde la posición actual. -> Rotación derecha izquierda (Rotación RL) La rotación de RL es una combinación de una sola rotación a la derecha seguida de una sola rotación a la izquierda. En RL Rotation, primero, cada nodo mueve una posición a la derecha y luego una posición a la izquierda desde la posición actual.
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/algorithms/index.md
<del>---
<del>title: Algorithms
<del>localeTitle: Algoritmos
<del>---
<del>## Algoritmos
<del>
<del>En informática, un algoritmo es una especificación inequívoca de cómo resolver una clase de problemas. Los algoritmos pueden realizar cálculos, procesamiento de datos y tareas de razonamiento automatizado.
<del>
<del>Un algoritmo es un método efectivo que se puede expresar en una cantidad finita de espacio y tiempo y en un lenguaje formal bien definido para calcular una función. Comenzando desde un estado inicial y una entrada inicial (quizás vacía), las instrucciones describen un cálculo que, cuando se ejecuta, avanza a través de un número finito de estados sucesivos bien definidos, que eventualmente producen "salida" y terminan en un estado final final. La transición de un estado a otro no es necesariamente determinista; algunos algoritmos, conocidos como algoritmos aleatorios, incorporan entrada aleatoria.
<del>
<del>Hay ciertos requisitos que un algoritmo debe cumplir:
<del>
<del>1. Definitividad: Cada paso en el proceso se establece con precisión.
<del>2. Computabilidad efectiva: Cada paso del proceso puede ser llevado a cabo por una computadora.
<del>3. Finitud: El programa terminará con éxito.
<del>
<del>Algunos tipos comunes de algoritmos incluyen algoritmos de clasificación, algoritmos de búsqueda y algoritmos de compresión. Las clases de algoritmos incluyen Gráficos, Programación dinámica, Clasificación, Búsqueda, Cadenas, Matemáticas, Geometría computacional, Optimización y Varios. Aunque técnicamente no es una clase de algoritmos, las estructuras de datos a menudo se agrupan con ellos.
<del>
<del>### Eficiencia
<del>
<del>Los algoritmos se juzgan más comúnmente por su eficiencia y la cantidad de recursos informáticos que requieren para completar su tarea. Una forma común de evaluar un algoritmo es observar su complejidad de tiempo. Esto muestra cómo crece el tiempo de ejecución del algoritmo a medida que crece el tamaño de entrada. Debido a que los algoritmos actuales deben operarse en grandes entradas de datos, es esencial que nuestros algoritmos tengan un tiempo de ejecución razonablemente rápido.
<del>
<del>### Clasificación de los algoritmos
<del>
<del>Los algoritmos de clasificación vienen en varios sabores dependiendo de su necesidad. Algunos, muy comunes y ampliamente utilizados son:
<del>
<del>#### Ordenación rápida
<del>
<del>No hay discusión de clasificación que pueda terminar sin una clasificación rápida. El concepto básico está en el siguiente enlace. [Ordenación rápida](http://me.dt.in.th/page/Quicksort/)
<del>
<del>#### Combinar clasificación
<del>
<del>Es el algoritmo de clasificación que se basa en el concepto de cómo se ordenan las matrices ordenadas que se combinan para dar una matriz ordenada. Lea más sobre esto aquí. [Combinar clasificación](https://www.geeksforgeeks.org/merge-sort/)
<del>
<del>El currículo de freeCodeCamp enfatiza fuertemente la creación de algoritmos. Esto se debe a que los algoritmos de aprendizaje son una buena manera de practicar las habilidades de programación. Los entrevistadores suelen probar candidatos en algoritmos durante las entrevistas de trabajo del desarrollador.
<del>
<del>### Recursos adicionales
<del>
<del>[Introducción a los algoritmos | Curso intensivo: Informática](https://www.youtube.com/watch?v=rL8X2mlNHPM)
<del>
<del>Este video ofrece una introducción accesible y animada a los algoritmos que se centran en los algoritmos de clasificación y búsqueda de gráficos.
<del>
<del>[¿Qué es un algoritmo y por qué debería importarte? | academia Khan](https://www.youtube.com/watch?v=CvSOaYi89B4)
<del>
<del>Este video presenta algoritmos y describe brevemente algunos usos de alto perfil de ellos.
<del>
<del>[15 Clasificación de los algoritmos en 6 minutos | Timo Bingmann](https://www.youtube.com/watch?v=kPRA0W1kECg)
<del>
<del>Este video muestra visualmente algunos algoritmos de clasificación populares que se enseñan comúnmente en los cursos de programación y ciencias de la computación.
<del>
<del>[Visualizador de algoritmos](http://algo-visualizer.jasonpark.me)
<del>
<del>Este es también un muy buen proyecto de código abierto que te ayuda a visualizar algoritmos.
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/git/authenticate-with-github-using-ssh/index.md
<del>---
<del>title: How to authenticate with GitHub using SSH
<del>localeTitle: Cómo autenticar con GitHub usando SSH
<del>---
<del># Cómo autenticar con GitHub usando SSH
<del>
<del>Verifique que no haya archivos `rsa` aquí antes de continuar, use:
<del>
<del>```shell
<del>ls -al ~/.ssh
<del>```
<del>
<del>Si no hay nada que enumerar (es decir, no existe `: No such file or directory` ), use:
<del>
<del>```shell
<del>mkdir $HOME/.ssh
<del>```
<del>
<del>Si no hay nada allí entonces genere un nuevo keygen con:
<del>
<del>```shell
<del>ssh-keygen -t rsa -b 4096 -C your@email.com
<del>```
<del>
<del>Ahora usando `ls -al ~/.ssh` mostrará nuestro archivo `id_rsa.pub` .
<del>
<del>Agregue la clave SSH al agente SSH:
<del>
<del>```shell
<del>eval "$(ssh-agent -s)" # for mac and Linux from bash
<del>```
<del>
<del>```shell
<del>eval `ssh-agent -s`
<del> ssh-agent -s # for Windows
<del>```
<del>
<del>Agregue la clave RSA a SHH con:
<del>
<del>```shell
<del>ssh-add ~/.ssh/id_rsa
<del>```
<del>
<del>Copia tu llave al portapapeles
<del>
<del>```shell
<del>clip < ~/.ssh/id_rsa.pub # Windows
<del>```
<del>
<del>```shell
<del>cat ~/.ssh/id_rsa.pub # Linux
<del>```
<del>
<del>Vaya a la página de [configuración de](https://github.com/settings/keys) GitHub y haga clic en el botón 'Nueva clave SSH' para pegar en su clave generada.
<del>
<del>Luego autentíquese con:
<del>
<del>```shell
<del>ssh -T git@github.com
<del>
<del>```
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/git/difference-git-github/index.md
<del>---
<del>title: Difference between Git and GitHub
<del>localeTitle: Diferencia entre Git y GitHub
<del>---
<del>## Diferencia entre Git y GitHub
<del>
<del>Git y GitHub son dos cosas diferentes. [Git](https://git-scm.com/) es el [sistema de control de versiones](https://en.wikipedia.org/wiki/Version_control) , mientras que [GitHub](https://github.com/) es un servicio para alojar repositorios de Git y ayudar a las personas a colaborar en la escritura de software. Sin embargo, a menudo se confunden por su nombre similar, debido al hecho de que GitHub se construye sobre Git, y porque muchos sitios web y artículos no hacen la diferencia entre ellos lo suficientemente clara.
<del>
<del>
<del>
<del>### Git
<del>
<del>Git es el sistema de control de versiones distribuido. Git es responsable de realizar un seguimiento de los cambios en el contenido, generalmente los archivos de código fuente.
<del>
<del>Para más información, hay un [artículo completo sobre el propio Git](https://guide.freecodecamp.org/git) .
<del>
<del>### GitHub
<del>
<del>GitHub es una empresa que proporciona hosting de repositorio Git. Eso significa que proporcionan una solución llave en mano para alojar repositorios Git en sus servidores. Eso puede ser útil para mantener una copia de seguridad de su repositorio (Git solo rastrea los cambios realizados en sus archivos a lo largo del tiempo, todavía se debe hacer una copia de seguridad de la repo), y tener un lugar centralizado para guardar y compartir su código con otros.
<del>
<del>Más que un simple servicio de alojamiento de repositorios Git, GitHub es una [forja de software](https://en.wikipedia.org/wiki/Forge_(software)) . Eso significa que también proporciona un [rastreador de problemas](https://en.wikipedia.org/wiki/Issue_tracking_system) , herramientas para [revisar el código](https://en.wikipedia.org/wiki/Code_review) y otras herramientas para colaborar con otras personas y crear software.
<del>
<del>GitHub no es el único que ofrece este tipo de servicio. Uno de sus principales competidores es [GitLab](https://gitlab.com) . Para más información sobre esto, consulte el [artículo sobre Git hosting](https://guide.freecodecamp.org/git/git-hosting) .
<ide><path>mock-guide/spanish/git/git-alias/index.md
<del>---
<del>title: Git Aliases
<del>localeTitle: Alias Git
<del>---
<del>## Git Alias
<del>
<del>Git no infiere automáticamente su comando si lo escribe parcialmente. Si no desea escribir todo el texto de cada uno de los comandos de Git, puede configurar fácilmente un alias para cada comando usando git config. Aquí hay un par de ejemplos que puede querer configurar:
<del>
<del>```shell
<del>$ git config --global alias.co checkout
<del> $ git config --global alias.br branch
<del> $ git config --global alias.ci commit
<del> $ git config --global alias.st status
<del>```
<del>
<del>Esto significa que, por ejemplo, en lugar de escribir git commit, solo necesita escribir git ci. A medida que continúe usando Git, probablemente también usará otros comandos con frecuencia; No dudes en crear nuevos alias.
<del>
<del>Esta técnica también puede ser muy útil para crear comandos que creas que deberían existir. Por ejemplo, para corregir el problema de usabilidad que encontraste al desempaquetar un archivo, puedes agregar tu propio alias para Git:
<del>
<del>```shell
<del>$ git config --global alias.unstage 'reset HEAD --'
<del>```
<del>
<del>Esto hace que los siguientes dos comandos sean equivalentes:
<del>
<del>```shell
<del>$ git unstage fileA
<del> $ git reset HEAD fileA
<del>```
<del>
<del>Esto parece un poco más claro. También es común agregar un último comando, como este:
<del>
<del>```shell
<del>$ git config --global alias.last 'log -1 HEAD'
<del>```
<del>
<del>De esta manera, puedes ver el último commit fácilmente:
<del>
<del>```shell
<del>$ git last
<del> commit 66938dae3329c7aebe598c2246a8e6af90d04646
<del> Author: Josh Goebel <dreamer3@example.com>
<del> Date: Tue Aug 26 19:48:51 2008 +0800
<del>
<del> test for current head
<del>
<del> Signed-off-by: Scott Chacon <schacon@example.com>
<del>```
<del>
<del>```shell
<del>$ git config --global alias.st status --short --branch
<del>```
<del>
<del>Cuando ejecute el comando `git st` , su estado de git se mostrará en un formato agradable y optimizado.
<del>
<del>### Ver, editar y eliminar alias
<del>
<del>Para ver todos los alias que ha creado en su máquina, ejecute el comando:
<del>
<del>```shell
<del>cat ~/.gitconfig
<del>```
<del>
<del>Reemplazar `cat` por `nano` te permitirá editarlos o eliminarlos completamente.
<del>
<del>### Alias para ver todos los alias
<del>
<del>Para agregar un alias para ver todos los demás creados en su máquina, agregue el alias
<del>
<del>```shell
<del> git config --global alias.aliases 'config --get-regexp alias'
<del>
<del>```
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/git/git-bisect/index.md
<del>---
<del>title: Git Bisect
<del>localeTitle: Git Bisect
<del>---
<del>## Git Bisect
<del>
<del>El comando `git bisect` ayuda a encontrar confirmaciones que agregaron cambios específicos en su proyecto. Esto es particularmente útil si necesita encontrar qué cambio introdujo un error.
<del>
<del>Este comando funciona al proporcionarle una confirmación "incorrecta" que incluye el error y una confirmación "buena" de antes de que se introdujera la falla. A través de la búsqueda binaria, `git bisect` seleccionará confirmaciones y le pedirá que identifique si la confirmación es "buena" o "mala". Esto continúa hasta que el comando es capaz de encontrar la confirmación exacta que introdujo el cambio.
<del>
<del>### Comandos de Bisect
<del>
<del>Para iniciar una sesión bisect, le dirá a git que comience una sesión bisect, identifique una versión "mala" e identifique una versión "buena". Suponiendo que la confirmación actual está rota pero la confirmación `4b60707` es buena, ejecutará lo siguiente:
<del>
<del>```shell
<del>git bisect start
<del> git bisect bad
<del> git bisect good 4b60707
<del>```
<del>
<del>Git comprobará un compromiso entre las versiones "buena" y "mala" y dará como resultado algo como lo siguiente:
<del>```
<del>Bisecting: 2 revisions left to test after this (roughly 2 steps)
<del>```
<del>
<del>Ahora debe indicar a git si el compromiso actual funciona con `git bisect good` o si el compromiso actual se rompe con `git bisect bad` . Este proceso se repetirá hasta que el comando pueda imprimir el primer error de confirmación.
<del>
<del>Cuando haya terminado, debe limpiar la sesión bisect. Esto restablecerá su HEAD a lo que era antes de comenzar la sesión bisect:
<del>
<del>```shell
<del>git bisect reset
<del>```
<del>
<del>### Otros recursos
<del>
<del>* [Git bisect documentacion](https://git-scm.com/docs/git-bisect)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/git/git-blame/index.md
<del>---
<del>title: Git Blame
<del>localeTitle: Git Blame
<del>---
<del>## Git Blame
<del>
<del>Con `git blame` puedes ver quién cambió qué en un archivo específico, línea por línea, lo cual es útil si trabajas en equipo, en lugar de hacerlo solo. Por ejemplo, si una línea de código hace que te preguntes por qué está allí, puedes usar `git blame` y sabrás a quién debes preguntar.
<del>
<del>### Uso
<del>
<del>Utiliza `git blame` así: `git blame NAME_OF_THE_FILE`
<del>
<del>Por ejemplo: `git blame triple_welcome.rb`
<del>
<del>Verás una salida como esta:
<del>
<del>```shell
<del>0292b580 (Jane Doe 2018-06-18 00:17:23 -0500 1) 3.times do
<del> e483daf0 (John Doe 2018-06-18 23:50:40 -0500 2) print 'Welcome '
<del> 0292b580 (Jane Doe 2018-06-18 00:17:23 -0500 3) end
<del>```
<del>
<del>Cada línea está anotada con el SHA, el nombre del autor y la fecha de la última confirmación.
<del>
<del>### Aliasing Git Blame
<del>
<del>A algunos programadores no les gusta la palabra "culpa", debido a la connotación negativa que "culpar a alguien" trae consigo. Además, la herramienta rara vez se usa (si acaso) para culpar a alguien, sino para pedir consejo o comprender el historial de un archivo. Por lo tanto, a veces las personas usan un alias para cambiar la `git blame` a algo que suena un poco mejor, como `git who` , `git history` o `git praise` . Para hacerlo, simplemente agregue un alias de git como este:
<del>
<del>`git config --global alias.history blame`
<del>
<del>Puede encontrar más información sobre los comandos git alias [aquí](../git-alias/index.md) .
<del>
<del>### Plugins de editor de texto utilizando Git Blame
<del>
<del>Hay algunos complementos por ahí para varios editores de texto que utilizan `git blame` . Por ejemplo, para crear algo así como mapas de calor o agregar información en línea para la línea actual que está inspeccionando. Un ejemplo famoso es [GitLense](https://gitlens.amod.io/) para VSCode.
<del>
<del>### Otras lecturas
<del>
<del>* [Documentación de Git Blame](https://git-scm.com/docs/git-blame)
<del>* [Lectura adicional sobre el uso de Git Blame](https://corgibytes.com/blog/2016/10/18/git-blame/)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/git/git-branch/index.md
<del>---
<del>title: Git Branch
<del>localeTitle: Git Branch
<del>---
<del>## Git Branch
<del>
<del>La funcionalidad de bifurcación de Git le permite crear nuevas ramas de un proyecto para probar ideas, aislar nuevas funciones o experimentar sin afectar el proyecto principal.
<del>
<del>**Tabla de contenido**
<del>
<del>* [Ver sucursales](#view-branches)
<del>* [Compra una sucursal](#checkout-a-branch)
<del>* [Crear una nueva rama](#create-a-new-branch)
<del>* [Renombrar una rama](#rename-a-branch)
<del>* [Eliminar una rama](#delete-a-branch)
<del>* [Comparar Sucursales](#compare-branches)
<del>* [Ayuda con Git Branch](#help-with-git-branch)
<del>* [Más información](#more-information)
<del>
<del>### Ver sucursales
<del>
<del>Para ver las ramas en un repositorio Git, ejecute el comando:
<del>
<del>```shell
<del>git branch
<del>```
<del>
<del>Para ver tanto las sucursales de seguimiento remoto como las locales, ejecute el comando:
<del>
<del>```shell
<del>git branch -a
<del>```
<del>
<del>Habrá un asterisco (\*) junto a la rama en la que está actualmente.
<del>
<del>Hay varias opciones diferentes que puede incluir con `git branch` para ver información diferente. Para obtener más detalles sobre las ramas, puede usar la opción `-v` (o `-vv` o `--verbose` ). La lista de sucursales incluirá el valor SHA-1 y la línea de asunto de confirmación para la `HEAD` de cada sucursal junto a su nombre.
<del>
<del>Puede usar la opción `-a` (o `--all` ) para mostrar las sucursales locales, así como las sucursales remotas para un repositorio. Si solo desea ver las ramas remotas, use la opción `-r` (o `--remotes` ).
<del>
<del>### Compra una sucursal
<del>
<del>Para pagar una rama existente, ejecute el comando:
<del>
<del>```shell
<del>git checkout BRANCH-NAME
<del>```
<del>
<del>En general, Git no le permitirá registrar otra rama a menos que su directorio de trabajo esté limpio, ya que perdería cualquier cambio de directorio de trabajo que no esté confirmado. Tienes tres opciones para manejar tus cambios: 1) Deshágase de ellos (consulte la página de verificación de [Git para obtener detalles](https://guide.freecodecamp.org/git/git-checkout/) ) o 2) cometerlos (ver [Git commit para más detalles](https://guide.freecodecamp.org/git/git-commit/) ) o 3) Guárdelos (vea [Git stash para más detalles](https://guide.freecodecamp.org/git/git-stash/) ).
<del>
<del>### Crear una nueva rama
<del>
<del>Para crear una nueva rama, ejecute el comando:
<del>
<del>```shell
<del>git branch NEW-BRANCH-NAME
<del>```
<del>
<del>Tenga en cuenta que este comando solo crea la nueva rama. Deberá ejecutar `git checkout NEW-BRANCH-NAME` para cambiarlo.
<del>
<del>Hay un acceso directo para crear y pagar una nueva rama a la vez. Puede pasar la opción `-b` (para sucursal) con `git checkout` . Los siguientes comandos hacen lo mismo:
<del>
<del>```shell
<del># Two-step method
<del> git branch NEW-BRANCH-NAME
<del> git checkout NEW-BRANCH-NAME
<del>
<del> # Shortcut
<del> git checkout -b NEW-BRANCH-NAME
<del>```
<del>
<del>Cuando cree una nueva rama, incluirá todas las confirmaciones de la rama principal. La rama principal es la rama en la que se encuentra cuando crea la nueva rama.
<del>
<del>### Renombrar una rama
<del>
<del>Para renombrar una rama, ejecute el comando:
<del>
<del>```shell
<del>git branch -m OLD-BRANCH-NAME NEW-BRANCH-NAME
<del>
<del> # Alternative
<del> git branch --move OLD-BRANCH-NAME NEW-BRANCH-NAME
<del>```
<del>
<del>### Eliminar una rama
<del>
<del>Git no te permitirá eliminar una rama en la que estés actualmente. Primero debe verificar una rama diferente, luego ejecute el comando:
<del>
<del>```shell
<del>git branch -d BRANCH-TO-DELETE
<del>
<del> # Alternative:
<del> git branch --delete BRANCH-TO-DELETE
<del>```
<del>
<del>La rama a la que cambias hace una diferencia. Git generará un error si los cambios en la rama que está intentando eliminar no están completamente fusionados en la rama actual. Puede anular esto y forzar a Git a eliminar la rama con la opción `-D` (note la letra mayúscula) o usando la opción `--force` con `-d` o `--delete` :
<del>
<del>```shell
<del>git branch -D BRANCH-TO-DELETE
<del>
<del> # Alternatives
<del> git branch -d --force BRANCH-TO-DELETE
<del> git branch --delete --force BRANCH-TO-DELETE
<del>```
<del>
<del>### Comparar Sucursales
<del>
<del>Puedes comparar ramas con el comando `git diff` :
<del>
<del>```shell
<del>git diff FIRST-BRANCH..SECOND-BRANCH
<del>```
<del>
<del>Verás una salida de color para los cambios entre las ramas. Para todas las líneas que han cambiado, la versión `SECOND-BRANCH` será una línea verde que comienza con un "+", y la versión `FIRST-BRANCH` será una línea roja que comienza con un "-". Si no desea que Git muestre dos líneas para cada cambio, puede usar la opción `--color-words` . En cambio, Git mostrará una línea con el texto eliminado en rojo y el texto agregado en verde.
<del>
<del>Si desea ver una lista de todas las ramas que están completamente fusionadas en su rama actual (en otras palabras, su rama actual incluye todos los cambios de las otras ramas que están en la lista), ejecute el comando `git branch --merged` .
<del>
<del>### Ayuda con Git Branch
<del>
<del>Si olvida cómo usar una opción, o si desea explorar otras funciones relacionadas con el comando `git branch` , puede ejecutar cualquiera de estos comandos:
<del>
<del>```shell
<del>git help branch
<del> git branch --help
<del> man git-branch
<del>```
<del>
<del>### Más información:
<del>
<del>* El comando `git merge` : [fCC Guide](https://guide.freecodecamp.org/git/git-merge/)
<del>* El comando `git checkout` : [fCC Guide](https://guide.freecodecamp.org/git/git-checkout/)
<del>* El comando `git commit` : [fCC Guide](https://guide.freecodecamp.org/git/git-commit/)
<del>* El comando `git stash` : [fCC Guide](https://guide.freecodecamp.org/git/git-stash/)
<del>* Documentación Git: [sucursal](https://git-scm.com/docs/git-branch)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/git/git-checkout/index.md
<del>---
<del>title: Git Checkout
<del>localeTitle: Git Checkout
<del>---
<del>## Git Checkout
<del>
<del>El comando `git checkout` cambia entre ramas o restaura los archivos del árbol de trabajo. Hay una serie de opciones diferentes para este comando que no se cubrirán aquí, pero puedes verlas todas en la [documentación de Git](https://git-scm.com/docs/git-checkout) .
<del>
<del>### Checkout un compromiso específico
<del>
<del>Para verificar un compromiso específico, ejecute el comando:
<del>
<del>```shell
<del>git checkout specific-commit-id
<del>```
<del>
<del>podemos obtener los ID de confirmación específicos ejecutando:
<del>
<del>```shell
<del>git log
<del>```
<del>
<del>### Checkout una rama existente
<del>
<del>Para pagar una rama existente, ejecute el comando:
<del>
<del>```shell
<del>git checkout BRANCH-NAME
<del>```
<del>
<del>En general, Git no le permitirá registrar otra rama a menos que su directorio de trabajo esté limpio, ya que perdería cualquier cambio de directorio de trabajo que no esté confirmado. Tiene tres opciones para manejar sus cambios: 1) desecharlos, 2) [cometerlos](https://guide.freecodecamp.org/git/git-commit/) o 3) [esconderlos](https://guide.freecodecamp.org/git/git-stash/) .
<del>
<del>### Compra una nueva sucursal
<del>
<del>Para crear y sacar una nueva rama con un solo comando, puede usar:
<del>
<del>```shell
<del>git checkout -b NEW-BRANCH-NAME
<del>```
<del>
<del>Esto te cambiará automáticamente a la nueva rama.
<del>
<del>### Realizar el pago de una nueva sucursal o restablecer una sucursal a un punto de inicio
<del>
<del>El siguiente comando es similar a la verificación de una nueva rama, pero usa el indicador `-B` (observe el capitular B) y un parámetro `START-POINT` opcional:
<del>
<del>```shell
<del>git checkout -B BRANCH-NAME START-POINT
<del>```
<del>
<del>Si la rama `BRANCH-NAME` no existe, Git la creará y la iniciará en `START-POINT` . Si la rama `BRANCH-NAME` ya existe, Git restablece la rama a `START-POINT` . Esto es equivalente a ejecutar `git branch` con `-f` .
<del>
<del>### Forzar un pago
<del>
<del>Puede pasar la opción `-f` o `--force` con el comando `git checkout` para forzar a Git a cambiar de rama, incluso si tiene cambios sin etapas (en otras palabras, el índice del árbol de trabajo difiere de `HEAD` ). Básicamente, se puede utilizar para deshacerse de los cambios locales.
<del>
<del>Cuando ejecute el siguiente comando, Git ignorará las entradas no combinadas:
<del>
<del>```shell
<del>git checkout -f BRANCH-NAME
<del>
<del> # Alternative
<del> git checkout --force BRANCH-NAME
<del>```
<del>
<del>### Deshacer cambios en su directorio de trabajo
<del>
<del>Puede usar el comando `git checkout` para deshacer los cambios que haya realizado en un archivo en su directorio de trabajo. Esto revertirá el archivo a la versión en `HEAD` :
<del>
<del>```shell
<del>git checkout -- FILE-NAME
<del>
<del>```
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/git/git-cherry-pick/index.md
<del>---
<del>title: Git Cherry Pick
<del>localeTitle: Git Cherry Pick
<del>---
<del>## Git Cherry Pick
<del>
<del>El comando `git cherry-pick` aplica los cambios introducidos por algunas confirmaciones existentes. Esta guía se centrará en explicar esta característica lo más posible, pero, por supuesto, la verdadera [documentación de Git](https://git-scm.com/docs/git-cherry-pick) siempre será útil.
<del>
<del>### Comprobación de una selección de cereza de rama existente de maestro
<del>
<del>Para aplicar el cambio introducido por la confirmación en la punta de la rama maestra y crear una nueva confirmación con este cambio. Ejecuta el siguiente comando
<del>
<del>```shell
<del>git cherry-pick master
<del>```
<del>
<del>### Compruebe en un cambio de un compromiso diferente
<del>
<del>Para aplicar el cambio introducido por la confirmación en el valor hash particular que desea, ejecute el siguiente comando
<del>
<del>```shell
<del>git cherry-pick {HASHVALUE}
<del>```
<del>
<del>Esto agregará los cambios incluidos referidos en ese compromiso, a su repositorio actual
<del>
<del>### Aplicar ciertas confirmaciones de una rama a otra.
<del>
<del>`cherry-pick` te permite elegir y elegir entre confirmaciones de una rama a otra. Digamos que tienes dos ramas `master` y `develop-1` . En la rama `develop-1` tienes 3 confirmaciones con los ID de `commit-1` , `commit-2` y `commit-3` . Aquí solo puede aplicar `commit-2` al `master` rama por:
<del>
<del>```shell
<del>git checkout master
<del> git cherry-pick commit-2
<del>```
<del>
<del>Si encuentra algún conflicto en este punto, debe corregirlos y agregarlos usando `git add` y luego puede usar la marca de continuación para aplicar el cherry-pick.
<del>
<del>```shell
<del>git cherry-pick --continue
<del>```
<del>
<del>Si desea abortar una selección intermedia, puede utilizar la bandera de abortar:
<del>
<del>```shell
<del>git cherry-pick --abort
<del>
<del>```
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/git/git-clone/index.md
<del>---
<del>title: Git Clone
<del>localeTitle: Git Clone
<del>---
<del>## Git Clone
<del>
<del>El comando `git clone` permite copiar un repositorio remoto en su máquina local.
<del>
<del>Primero, busque el repositorio remoto para el proyecto en el que está trabajando o en el que está interesado, este también puede ser el enlace de un proyecto. A continuación, copia la URL para ello. Por ejemplo, si ha bifurcado el repositorio de guías freeCodeCamp, la URL se verá como `https://github.com/YOUR-GITHUB-USERNAME/guides.git` .
<del>
<del>En la línea de comandos en su máquina local, navegue hasta donde desea guardar el proyecto en su directorio de trabajo. Finalmente, ejecute el comando `git clone` :
<del>
<del>```shell
<del>git clone URL-OF-REPOSITORY
<del>```
<del>
<del>El nombre predeterminado del nuevo directorio en su computadora es el nombre del repositorio, pero puede cambiarlo incluyendo el último parámetro (opcional):
<del>
<del>```shell
<del>git clone URL-OF-REPOSITORY NAME-OF-DIRECTORY-ON-COMPUTER
<del>```
<del>
<del>Git le da al remoto el alias "origen". Esta es una forma útil de referirse al control remoto cuando desea enviar sus cambios al servidor remoto o extraer cambios de este. Ver [Git push](https://guide.freecodecamp.org/git/git-push/) y [Git pull](https://guide.freecodecamp.org/git/git-pull/) para más detalles.
<del>
<del>Git solo coloca la rama principal del control remoto en tu computadora. Esta rama suele denominarse "maestra" por convención, pero puede definirse de manera diferente según el proyecto.
<del>
<del>Además, Git configura automáticamente su sucursal principal local para rastrear la sucursal remota. Cuando ejecute `git status` , verá información sobre si su sucursal local está actualizada con el control remoto. Aquí hay un ejemplo de salida:
<del>
<del>```shell
<del>myCommandPrompt (master) >> git status
<del> On branch master
<del> Your branch is up-to-date with 'origin/master'.
<del> nothing to commit, working tree clean
<del> myCommandPrompt (master) >>
<del>```
<del>
<del>Si su sucursal `master` local tiene tres confirmaciones que aún no ha enviado al servidor remoto, el estado diría "Su sucursal está delante de 'origen / maestro' con 3 confirmaciones".
<del>
<del>### Git Clone Espejo
<del>
<del>Si desea alojar la duplicación de un repositorio, puede usar el parámetro duplicado.
<del>
<del>```shell
<del>git clone URL-OF-REPOSITORY --mirror
<del>```
<del>
<del>Después de duplicar un repositorio, puede clonar su duplicación local desde su servidor.
<del>
<del>```shell
<del>git clone NAME-OF-DIRECTORY-ON-COMPUTER
<del>```
<del>
<del>### Más información:
<del>
<del>* Documentación Git: [clon](https://git-scm.com/docs/git-clone)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/git/git-commit/index.md
<del>---
<del>title: Git Commit
<del>localeTitle: Git Commit
<del>---
<del>## Git Commit
<del>
<del>El comando `git commit` guardará todos los cambios en etapas, junto con una breve descripción del usuario, en un "commit" en el repositorio local.
<del>
<del>Los compromisos están en el corazón del uso de Git. Puede pensar en una confirmación como una instantánea de su proyecto, donde se crea una nueva versión de ese proyecto en el repositorio actual. Dos características importantes de los compromisos son:
<del>
<del>* puede recuperar los cambios comprometidos en una fecha posterior o revertir el proyecto a esa versión ( [ver pago de Git](https://guide.freecodecamp.org/git/git-checkout) )
<del>* Si múltiples confirmaciones editan diferentes partes del proyecto, no se sobrescribirán entre sí, incluso si los autores de la confirmación no se conocían entre sí. Este es uno de los beneficios de usar Git sobre una herramienta como Dropbox o Google Drive.
<del>
<del>### Opciones
<del>
<del>Hay una serie de opciones que puedes incluir con `git commit` . Sin embargo, esta guía solo cubrirá las dos opciones más comunes. Para obtener una lista extensa de opciones, consulte la [documentación de Git](https://git-scm.com/docs/git-commit) .
<del>
<del>#### La opción -m
<del>
<del>La opción más común utilizada con `git commit` es la opción `-m` . La `-m` significa mensaje. Cuando se llama a `git commit` , se requiere incluir un mensaje. El mensaje debe ser una breve descripción de los cambios que se están comprometiendo. El mensaje debe estar al final del comando y debe estar entre comillas `" "` .
<del>
<del>Un ejemplo de cómo usar la opción `-m` :
<del>
<del>```shell
<del>git commit -m "My message"
<del>```
<del>
<del>La salida en su terminal debería verse así:
<del>
<del>```shell
<del>[master 13vc6b2] My message
<del> 1 file changed, 1 insertion(+)
<del>```
<del>
<del>**NOTA:** Si no se incluye `-m` con el comando `git commit` , se le solicitará que agregue un mensaje en su editor de texto predeterminado. Consulte "Uso de mensajes de confirmación detallados" a continuación.
<del>
<del>#### La opción -a
<del>
<del>Otra opción popular es la opción `-a` . La `-a` representa a todos. Esta opción escalona automáticamente todos los archivos modificados para ser confirmados Si se agregan nuevos archivos, la opción `-a` no mostrará esos nuevos archivos. Sólo se confirmarán los archivos que el repositorio Git conoce.
<del>
<del>Por ejemplo:
<del>
<del>Digamos que tiene un archivo `README.md` que ya se ha confirmado en su repositorio. Si realiza cambios en este archivo, puede usar la opción `-a` en su comando commit para poner en escena y agregar los cambios a su repositorio. Sin embargo, ¿qué sucede si también agrega un nuevo archivo llamado `index.html` ? La opción `-a` no mostrará el `index.html` ya que no existe actualmente en el repositorio. Cuando se han agregado nuevos archivos, se debe invocar el comando `git add` para organizar los archivos antes de que se puedan enviar al repositorio.
<del>
<del>Un ejemplo de cómo usar la opción `-a` :
<del>
<del>```shell
<del>git commit -am “My new changes”
<del>```
<del>
<del>La salida en su terminal debería verse así:
<del>
<del>```shell
<del>[master 22gc8v1] My new message
<del> 1 file changed, 1 insertion(+)
<del>```
<del>
<del>### Usando mensajes de confirmación detallados
<del>
<del>Aunque `git commit -m "commit message"` funciona bien, puede ser útil proporcionar información más detallada y sistemática.
<del>
<del>Si se compromete sin usar la opción `-m` , git abrirá su editor de texto predeterminado con un nuevo archivo, que incluirá una lista comentada de todos los archivos / cambios que se almacenan en la confirmación. Luego escribe su mensaje de confirmación detallado (la primera línea se tratará como la línea del asunto) y la confirmación se realizará cuando guarde / cierre el archivo.
<del>
<del>Tener en cuenta:
<del>
<del>* Mantenga la longitud de sus líneas de mensajes de confirmación de menos de 72 caracteres como práctica estándar
<del>* Está perfectamente bien - e incluso recomendado - escribir mensajes de confirmación multilínea
<del>* También puede consultar otros problemas o extraer solicitudes en su mensaje de confirmación. GitHub asignó una referencia numérica a todas las solicitudes y problemas de extracción, así que, por ejemplo, si desea consultar la solicitud de extracción n.º 788, simplemente hágalo en la línea del asunto o en el texto del cuerpo, según corresponda.
<del>
<del>#### La opción de enmienda
<del>
<del>La opción `--amend` permite cambiar su último compromiso. Digamos que acaba de confirmar y cometió un error en su mensaje de registro de confirmación. Puede modificar convenientemente la confirmación más reciente usando el comando:
<del>
<del>```shell
<del>git commit --amend -m "an updated commit message"
<del>```
<del>
<del>Si olvidas incluir un archivo en el commit:
<del>
<del>```shell
<del>git add FORGOTTEN-FILE-NAME
<del> git commit --amend -m "an updated commit message"
<del>
<del> # If you don't need to change the commit message, use the --no-edit option
<del> git add FORGOTTEN-FILE-NAME
<del> git commit --amend --no-edit
<del>```
<del>
<del>Los compromisos prematuros suceden todo el tiempo en el curso de su desarrollo diario. Es fácil olvidarse de configurar un archivo o cómo formatear correctamente su mensaje de confirmación. La `--amend` es una forma conveniente de solucionar estos pequeños errores. Este comando reemplazará el antiguo mensaje de confirmación con el actualizado especificado en el comando.
<del>
<del>Los compromisos modificados son en realidad compromisos completamente nuevos y el compromiso anterior ya no estará en su rama actual. Cuando trabaje con otros, debe tratar de evitar la modificación de las confirmaciones si la última confirmación ya está insertada en el repositorio.
<del>
<del>Con `--amend` , uno de los indicadores útiles que podría usar es `--author` que le permite cambiar el autor del último compromiso realizado. Imagine una situación en la que no haya configurado correctamente su nombre o correo electrónico en las configuraciones de git, pero ya hizo un compromiso. Con el `--author` puede simplemente cambiarlos sin restablecer el último compromiso.
<del>```
<del>git commit --amend --author="John Doe <johndoe@email.com>"
<del>```
<del>
<del>#### La opción -v o --verbose
<del>
<del>La opción `-v` o `--verbose` se usa sin la opción `-m` . La opción `-v` puede ser útil cuando desee editar un mensaje de confirmación de Git en su editor predeterminado y poder ver los cambios que realizó para la confirmación. El comando abre su editor de texto predeterminado con una plantilla de mensaje de confirmación _, así como_ una copia de los cambios que realizó para esta confirmación. Los cambios, o diff, no se incluirán en el mensaje de confirmación, pero proporcionan una buena manera de hacer referencia a sus cambios cuando los describe en su mensaje de confirmación.
<del>
<del>### Más información:
<del>
<del>* Documentación Git: [commit](https://git-scm.com/docs/git-commit)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/git/git-fetch/index.md
<del>---
<del>title: Git Fetch
<del>localeTitle: Git Fetch
<del>---
<del>## Git Fetch
<del>
<del>`git fetch` git-fetch: descarga objetos y referencias de otro repositorio
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/git/git-hooks/index.md
<del>---
<del>title: Git Hooks
<del>localeTitle: Git ganchos
<del>---
<del>## Git ganchos
<del>
<del>Los Git Hooks son scripts ubicados en el `.git/hooks/` de un repositorio de git. Estos scripts se ejecutan después de ser activados por diferentes etapas en el proceso de control de versiones.
<del>
<del>### Muestras
<del>
<del>En este directorio hay un puñado de scripts de muestra, como `pre-commit.sample` . Esta muestra en particular se ejecuta cada vez que un usuario ejecuta `git commit` . Si el script de enganche sale con un estado distinto de 0, la confirmación se detiene.
<del>
<del>### Documentación
<del>
<del>* [Documentación para Git Hooks](https://git-scm.com/docs/githooks)
<del>* [Atlassian Tutorial en Git Hooks](https://www.atlassian.com/git/tutorials/git-hooks)
<del>* [Guía de ganchos de Git](http://githooks.com/)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/git/git-hosting/index.md
<del>---
<del>title: Git hosting
<del>localeTitle: Git hosting
<del>---
<del>## Git hosting
<del>
<del>Esto es un talón. [Ayuda a nuestra comunidad a expandirla](https://github.com/freecodecamp/guides/tree/master/src/pages/git/git-hosting/index.md) .
<del>
<del>[Esta guía rápida de estilo ayudará a asegurar que su solicitud de extracción sea aceptada](https://github.com/freecodecamp/guides/blob/master/README.md) .
<del>
<del>#### Más información:
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/git/git-log/index.md
<del>---
<del>title: Git Log
<del>localeTitle: Git Log
<del>---
<del>## Git Log
<del>
<del>El comando `git log` muestra todas las confirmaciones en el historial de un repositorio.
<del>
<del>Por defecto, el comando muestra cada confirmación:
<del>
<del>* Algoritmo de hash seguro (SHA)
<del>* autor
<del>* fecha
<del>* cometer mensaje
<del>
<del>### Navegando por Git Log
<del>
<del>Git utiliza el buscapersonas de la terminal Less para recorrer el historial de confirmación. Puedes navegarlo con los siguientes comandos:
<del>
<del>* para desplazarse hacia abajo una línea, use j o ↓
<del>* para desplazarse hacia arriba una línea, use k o ↑
<del>* para desplazarse hacia abajo en una página, use la barra espaciadora o el botón Av Pág.
<del>* para desplazarse por una página, use b o el botón Re Pág
<del>* para salir del registro, usa q
<del>
<del>### Git Log Flags
<del>
<del>Puedes personalizar la información presentada por `git log` usando marcas.
<del>
<del>#### \--una línea
<del>
<del>`git log --oneline`
<del>
<del>El indicador `--oneline` hace que se muestre el `git log`
<del>
<del>* un compromiso por línea
<del>* Los primeros siete personajes de la SHA.
<del>* el mensaje de confirmación
<del>
<del>#### \--estado
<del>
<del>`git log --stat`
<del>
<del>El indicador `--stat` hace que se muestre el `git log`
<del>
<del>* Los archivos que fueron modificados en cada confirmación.
<del>* el número de líneas agregadas o eliminadas
<del>* una línea de resumen con el número total de archivos y líneas cambiadas
<del>
<del>#### \--patch o -p
<del>
<del>`git log --patch`
<del>
<del>o, la versión más corta
<del>
<del>`git log -p`
<del>
<del>La `--patch` hace que se muestre el `git log`
<del>
<del>* los archivos que modificaste
<del>* la ubicación de las líneas que agregó o eliminó
<del>* Los cambios específicos que hiciste.
<del>
<del>### Ver número especificado de confirmaciones por autor
<del>
<del>Para ver un número específico de confirmaciones por un autor en el repositorio actual (opcionalmente en un formato prettified), se puede usar el siguiente comando
<del>
<del>`git log --pretty=format:"%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset" -n {NUMBER_OF_COMMITS} --author="{AUTHOR_NAME}" --all`
<del>
<del>#### Comenzar en un compromiso específico
<del>
<del>Para iniciar el `git log` en una confirmación específica, agregue el SHA:
<del>
<del>`git log 7752b22`
<del>
<del>Esto mostrará la confirmación con el SHA 7752b22 y todas las confirmaciones realizadas antes de esa confirmación. Puedes combinar esto con cualquiera de las otras banderas.
<del>
<del>#### \--grafico
<del>
<del>`git log --graph`
<del>
<del>La `--graph` permite ver su `git log` como un gráfico. Para hacer las cosas más interesantes, puede combinar este comando con la opción `--oneline` que aprendió de arriba.
<del>
<del>`git log --graph --oneline`
<del>
<del>La salida sería similar a,
<del>```
<del>* 64e6db0 Update index.md
<del> * b592012 Update Python articles (#5030)
<del> * ecbf9d3 Add latest version and remove duplicate link (#8860)
<del> * 7e3934b Add hint for Compose React Components (#8705)
<del> * 99b7758 Added more frameworks (#8842)
<del> * c4e6a84 Add hint for "Create a Component with Composition" (#8704)
<del> * 907b004 Merge branch 'master' of github.com:freeCodeCamp/guide
<del> |\
<del> | * 275b6d1 Update index.md
<del> * | cb74308 Merge branch 'dogb3rt-patch-3'
<del> |\ \
<del> | |/
<del> |/|
<del> | * 98015b6 fix merge conflicts after folder renaming
<del> | |\
<del> |/ /
<del> | * fa83460 Update index.md
<del> * | 6afb3b5 rename illegally formatted folder name (#8762)
<del> * | 64b1fe4 CSS3: border-radius property (#8803)
<del>```
<del>
<del>Una de las ventajas de usar este comando es que le permite obtener una visión general de cómo se han fusionado los compromisos y cómo se creó el historial de git.
<del>
<del>Puede haber otras opciones que podría usar en combinación con `--graph` . Par de ellos son `--decorate` y `--all` . Asegúrese de probar estos también. Y consulte la [documentación](https://git-scm.com/docs/git-log) para obtener más información útil.
<del>
<del>#### Más información:
<del>
<del>* [Conceptos básicos de Git - Viendo el historial de Commit](https://git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-History)
<del>* [Git Log](https://git-scm.com/docs/git-log)
<del>
<del>##### Otros recursos en Git en guide.freecodecamp.org
<del>
<del>* [Git Merge](../git-merge/index.md)
<del>* [Git Checkout](../git-checkout/index.md)
<del>* [Git Commit](../git-commit/index.md)
<del>* [Git Stash](../git-stash/index.md)
<del>* [Git Branch](../git-branch/index.md)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/git/git-merge/index.md
<del>---
<del>title: Git Merge
<del>localeTitle: Git Merge
<del>---
<del>## Git Merge
<del>
<del>El comando `git merge` fusionará cualquier cambio que se haya realizado en la base del código en una rama separada de su rama actual.
<del>
<del>La sintaxis del comando es la siguiente:
<del>
<del>```shell
<del>git merge BRANCH-NAME
<del>```
<del>
<del>Por ejemplo, si actualmente está trabajando en una rama llamada `dev` y le gustaría fusionar los cambios nuevos que se hicieron en una rama llamada `new-features` , emitiría el siguiente comando:
<del>
<del>```shell
<del>git merge new-features
<del>```
<del>
<del>**Tenga en cuenta:** Si hay cambios no confirmados en su sucursal actual, Git no le permitirá fusionarse hasta que se hayan confirmado todos los cambios en su sucursal actual. Para manejar esos cambios, puede:
<del>
<del>* Crea una nueva rama y confirma los cambios.
<del>
<del>```shell
<del>git checkout -b new-branch-name
<del> git add .
<del> git commit -m "<your commit message>"
<del>```
<del>
<del>* Esconderlos
<del>
<del>```shell
<del>git stash # add them to the stash
<del> git merge new-features # do your merge
<del> git stash pop # get the changes back into your working tree
<del>```
<del>
<del>* Abandonarlo todo
<del>
<del>```shell
<del>git reset --hard # removes all pending changes
<del>```
<del>
<del>## Conflicto de fusión
<del>
<del>Un conflicto de combinación es cuando realiza confirmaciones en ramas separadas que alteran la misma línea de manera conflictiva. Por lo tanto, Git no sabrá qué versión del archivo mantener
<del>
<del>dando como resultado el mensaje de error:
<del>
<del>CONFLICTO (contenido): Combinar conflicto en resumé.txt La fusión automática falló; Solucionar conflictos y luego cometer el resultado.
<del>
<del>En el editor de código, Git usa marcas para indicar la versión HEAD (maestra) del archivo y la otra versión del archivo.
<del>
<del>`<<<<<<< HEAD`
<del>
<del>`>>>>>>> OTHER`
<del>
<del>Desde el editor de código, elimine / actualice para resolver conflictos y elimine las marcas especiales, incluidos los nombres de archivos HEAD y OTHER, vuelva a cargar su archivo, luego vuelva a agregar y vuelva a confirmar los cambios.
<del>
<del>Para obtener más información sobre el comando `git merge` y todas las opciones disponibles, consulte la [documentación de Git](https://git-scm.com/docs/git-merge) .
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/git/git-pull/index.md
<del>---
<del>title: Git Pull
<del>localeTitle: Git Pull
<del>---
<del>## Git Pull
<del>
<del>`git pull` es un comando de Git utilizado para actualizar la versión local de un repositorio desde un remoto.
<del>
<del>Es uno de los cuatro comandos que solicita la interacción de red por Git. Por defecto, `git pull` hace dos cosas.
<del>
<del>1. Actualiza la rama de trabajo local actual (rama actualmente retirada)
<del>2. Actualiza las sucursales de seguimiento remoto para todas las demás sucursales.
<del>
<del>`git pull` obtiene ( `git fetch` ) los nuevos compromisos y fusiona [( `git merge` )](https://guide.freecodecamp.org/git/git-merge) estos en su sucursal local.
<del>
<del>La sintaxis de este comando es la siguiente:
<del>
<del>```shell
<del># General format
<del> git pull OPTIONS REPOSITORY REFSPEC
<del>
<del> # Pull from specific branch
<del> git pull REMOTE-NAME BRANCH-NAME
<del>```
<del>
<del>en el cual:
<del>
<del>* **OPCIONES** son las opciones de comando, como `--quiet` o `--verbose` . Puedes leer más sobre las diferentes opciones en la [documentación de Git.](https://git-scm.com/docs/git-pull)
<del>* **REPOSITORY** es la URL de tu repositorio. Ejemplo: https://github.com/freeCodeCamp/freeCodeCamp.git
<del>* **REFSPEC** especifica qué **refs** buscar y qué **refs** locales actualizar
<del>* **REMOTE-NAME** es el nombre de su repositorio remoto. Por ejemplo: _origen_ .
<del>* **BRANCH-NAME** es el nombre de tu sucursal. Por ejemplo: _desarrollar_ .
<del>
<del>**Nota**
<del>
<del>Si tiene cambios no confirmados, la parte de combinación del comando `git pull` fallará y su rama local quedará intacta.
<del>
<del>Por lo tanto, _siempre_ debe _confirmar sus cambios en una rama antes de extraer_ nuevas confirmaciones de un repositorio remoto.
<del>
<del>**Tabla de contenido**
<del>
<del>* [Usando `git pull`](#using-git-pull)
<del>* [Control de versiones distribuido](#distributed-version-control)
<del>* [`git fetch` + `git merge`](#git-fetch-plus-git-merge)
<del>* [`git pull` en IDEs](#git-pull-in-IDEs)
<del>
<del>### Usando git pull
<del>
<del>Use `git pull` para actualizar un repositorio local desde el repositorio remoto correspondiente. Ej: mientras trabaja localmente en el `master` , ejecute `git pull` para actualizar la copia local del `master` y actualizar las otras ramas de seguimiento remoto. (Más información sobre las sucursales de seguimiento remoto en la siguiente sección.)
<del>
<del>Pero hay algunas cosas que se deben tener en cuenta para que ese ejemplo sea verdadero:
<del>
<del>* El repositorio local tiene un repositorio remoto vinculado
<del>* Comprueba esto ejecutando `git remote -v`
<del>* Si hay varios controles remotos, `git pull` podría no ser suficiente información. Es posible que deba ingresar el `git pull origin` `git pull upstream` o `git pull upstream` .
<del>* La sucursal en la que está prestado actualmente tiene una sucursal de seguimiento remoto correspondiente
<del>* Comprueba esto ejecutando el `git status` . Si no hay una sucursal de seguimiento remoto, Git no sabe dónde obtener información _de._
<del>
<del>### Control de versiones distribuido
<del>
<del>Git es un **sistema de control de versiones distribuido** (DVCS). Con DVCS, los desarrolladores pueden trabajar en el mismo archivo al mismo tiempo en entornos separados. Después de _enviar el_ código al repositorio remoto compartido, otros desarrolladores pueden _extraer el_ código modificado.
<del>
<del>#### Interacciones de red en Git
<del>
<del>Solo hay cuatro comandos que solicitan interacciones de red en Git. Un repositorio local no tiene conocimiento de los cambios realizados en el repositorio remoto hasta que haya una solicitud de información. Y, un repositorio remoto no tiene conocimiento de los cambios locales hasta que se empujan las confirmaciones.
<del>
<del>Los cuatro comandos de red son:
<del>
<del>* `git clone`
<del>* `git fetch`
<del>* `git pull`
<del>* `git push`
<del>
<del>#### Sucursales en DVCS
<del>
<del>Cuando trabajas con Git, puedes sentir que hay muchas copias del mismo código flotando por todas partes. Hay diferentes versiones del mismo archivo en cada rama. Y, diferentes copias de las mismas ramas en la computadora de cada desarrollador y en el control remoto. Para hacer un seguimiento de esto, Git usa algo llamado **ramas de seguimiento remoto** .
<del>
<del>Si ejecuta `git branch --all` dentro de un repositorio de Git, las ramas de seguimiento remoto aparecen en rojo. Estas son copias de solo lectura del código tal como aparece en el control remoto. (¿Cuándo fue la última interacción de red que habría traído información localmente? Recuerde cuándo se actualizó por última vez esta información. La información en las ramas de seguimiento remoto refleja la información de esa interacción).
<del>
<del>Con **las sucursales de seguimiento remoto** , puede trabajar en Git en varias sucursales sin interacción de red. Cada vez que ejecuta los comandos `git pull` o `git fetch` , actualiza **las ramas de seguimiento remoto** .
<del>
<del>### git fetch plus git merge
<del>
<del>`git pull` es un comando de combinación, igual a `git fetch` + `git merge` .
<del>
<del>#### git fetch
<del>
<del>Por sí solo, `git fetch` actualiza todas las sucursales de seguimiento remoto en el repositorio local. Ningún cambio se refleja realmente en ninguna de las ramas locales de trabajo.
<del>
<del>#### git merge
<del>
<del>Sin ningún argumento, `git merge` fusionará la rama de seguimiento remoto correspondiente a la rama de trabajo local.
<del>
<del>#### git pull
<del>
<del>`git fetch` actualiza las sucursales de seguimiento remoto. `git merge` actualiza la rama actual con la rama de seguimiento remoto correspondiente. Usando `git pull` , obtienes ambas partes de estas actualizaciones. Pero, esto significa que si se le presta atención a la rama de `feature` y ejecuta `git pull` , cuando se retira a `master` , no se incluirán nuevas actualizaciones. Siempre que realice el pago en otra sucursal que pueda tener nuevos cambios, siempre es una buena idea ejecutar `git pull` .
<del>
<del>### git pull en IDEs
<del>
<del>El lenguaje común en otros IDES no puede incluir la palabra `pull` . Si buscas las palabras `git pull` pero no las ves, busca la palabra `sync` lugar.
<del>
<del>### forzando un PR remoto (solicitud de extracción) en el repositorio local
<del>
<del>Para propósitos de revisión y similares, los RP en remoto deben ser buscados en el repositorio local. Puede usar el comando `git fetch` siguiente manera para lograr esto.
<del>
<del>`git fetch origin pull/ID/head:BRANCHNAME`
<del>
<del>ID es el ID de solicitud de extracción y BRANCHNAME es el nombre de la rama que desea crear. Una vez que se haya creado la rama, puede utilizar `git checkout` para cambiar a ese brach.
<del>
<del>### Otros recursos en git pull
<del>
<del>* [git-scm](https://git-scm.com/docs/git-pull)
<del>* [GitHub Help Docs](https://help.github.com/articles/fetching-a-remote/#pull)
<del>* [Entrenamiento GitHub On Demand](https://services.github.com/on-demand/intro-to-github/create-pull-request)
<del>* [Tutoriales de sincronización](https://www.atlassian.com/git/tutorials/syncing)
<del>
<del>### Otros recursos en git en guide.freecodecamp.org
<del>
<del>* [Git fusionar](../git-merge/index.md)
<del>* [Git checkout](../git-checkout/index.md)
<del>* [Git commit](../git-commit/index.md)
<del>* [Git stash](../git-stash/index.md)
<del>* [Rama de git](../git-branch/index.md)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/git/git-push/index.md
<del>---
<del>title: Git Push
<del>localeTitle: Git Push
<del>---
<del>## Git Push
<del>
<del>El comando `git push` permite enviar (o _enviar_ ) las confirmaciones desde su sucursal local en su repositorio Git local al repositorio remoto.
<del>
<del>Para poder ingresar a su repositorio remoto, debe asegurarse de que **todos los cambios en el repositorio local estén confirmados** .
<del>
<del>La sintaxis de este comando es la siguiente:
<del>
<del>```bash
<del>git push <repo name> <branch name>
<del>```
<del>
<del>Hay una serie de opciones diferentes que puede pasar con el comando, puede aprender más sobre ellas en la [documentación de Git](https://git-scm.com/docs/git-push#_options_a_id_options_a) o ejecutar `git push --help` .
<del>
<del>### Empuje a un repositorio remoto y sucursal específicos
<del>
<del>Para insertar código, primero debe clonar un repositorio en su máquina local.
<del>
<del>```bash
<del># Once a repo is cloned, you'll be working inside of the default branch (the default is `master`)
<del> git clone https://github.com/<git-user>/<repo-name> && cd <repo-name>
<del> # make changes and stage your files (repeat the `git add` command for each file, or use `git add .` to stage all)
<del> git add <filename>
<del> # now commit your code
<del> git commit -m "added some changes to my repo!"
<del> # push changes in `master` branch to github
<del> git push origin master
<del>```
<del>
<del>Para obtener más información sobre las sucursales, consulte los enlaces a continuación:
<del>
<del>* [git checkout](https://github.com/renington/guides/blob/master/src/pages/git/git-checkout/index.md)
<del>* [rama de git](https://github.com/renington/guides/blob/master/src/pages/git/git-branch/index.md)
<del>
<del>### Empuje a un repositorio remoto específico y todas las ramas en él
<del>
<del>Si desea enviar todos sus cambios al repositorio remoto y todas las ramas en él, puede usar:
<del>
<del>```bash
<del>git push --all <REMOTE-NAME>
<del>```
<del>
<del>en el cual:
<del>
<del>* `--all` es el indicador que indica que desea enviar todas las ramas al repositorio remoto
<del>* `REMOTE-NAME` es el nombre del repositorio remoto al que desea enviar
<del>
<del>### Empujar a una rama específica con el parámetro de fuerza
<del>
<del>Si desea ignorar los cambios locales realizados en el repositorio Git en GitHub (lo que la mayoría de los desarrolladores hacen para una solución para el servidor de desarrollo), puede usar el comando --force para presionar ignorando esos cambios.
<del>
<del>```bash
<del>git push --force <REMOTE-NAME> <BRANCH-NAME>
<del>```
<del>
<del>en el cual:
<del>
<del>* `REMOTE-NAME` es el nombre del repositorio remoto al que desea enviar los cambios
<del>* `BRANCH-NAME` es el nombre de la rama remota a la que desea enviar sus cambios
<del>
<del>### Empuje ignorando el gancho pre-empuje de Git
<del>
<del>De forma predeterminada, `git push` activará el `--verify` toggle. Esto significa que git ejecutará cualquier script de envío previo del lado del cliente que se haya configurado. Si los scripts pre-push fallan, también lo hará el git push. (Los ganchos previos al empuje son buenos para hacer cosas como, verificar si los mensajes de confirmación confirman los estándares de la compañía, ejecutar pruebas unitarias, etc.). Ocasionalmente, es posible que desee ignorar este comportamiento predeterminado, por ejemplo, en el escenario en el que desea enviar sus cambios a una rama de características para que otro colaborador los tire, pero los cambios en el trabajo en curso están superando las pruebas unitarias. Para ignorar el gancho, simplemente ingrese su comando push y agregue la bandera `--no-verify`
<del>
<del>```bash
<del>git push --no-verify
<del>```
<del>
<del>### Más información:
<del>
<del>* [Documentación Git - Push](https://git-scm.com/docs/git-push)
<del>* [Ganchos de Git](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks)
<ide><path>mock-guide/spanish/git/git-rebase/index.md
<del>---
<del>title: Git Rebase
<del>localeTitle: Ir rebase
<del>---
<del>## Git Rebase
<del>
<del>Volver a marcar una rama en Git es una forma de mover la totalidad de una rama a otro punto del árbol. El ejemplo más simple es mover una rama más arriba en el árbol. Digamos que tenemos una rama que divergió de la rama maestra en el punto A:
<del>```
<del> /o-----o---o--o-----o--------- branch
<del> --oo--A--o---o---o---o----o--ooo--- master
<del>```
<del>
<del>Cuando cambies de base puedes moverlo así:
<del>```
<del> /o-----o---o--o-----o------ branch
<del> --oo--A--o---o---o---o----o--ooo master
<del>```
<del>
<del>Para reajustar, asegúrese de tener todas las confirmaciones que desea en el rebase en su rama maestra. Echa un vistazo a la sucursal que deseas reajustar y escribe `git rebase master` (donde master es la sucursal en la que deseas reajustar).
<del>
<del>También es posible cambiar de base en una rama diferente, de modo que, por ejemplo, una rama que se basó en otra rama (llamémosla característica) se vuelva a basar en el maestro:
<del>```
<del> /---oo branch
<del> /---oooo---o--o------ feature
<del> ----o--ooA----o---o--ooo--o--o- master
<del>```
<del>
<del>Después de `git rebase master branch` o `git rebase master` cuando hayas verificado la sucursal, obtendrás:
<del>```
<del> /---oooo---o--o------ feature
<del> ----o--ooA----o---o--ooo--o--o- master
<del> \---oo branch
<del>```
<del>
<del>### Git rebase interactivo en la consola.
<del>
<del>Para utilizar `git rebase` en la consola con una lista de confirmaciones, puede elegir, editar o soltar en la rebase:
<del>
<del>* Ingrese `git rebase -i HEAD~5` con el último número como cualquier número de confirmaciones del `git rebase -i HEAD~5` más reciente que desea revisar.
<del>* En vim, presione `esc` , luego `i` para comenzar a editar la prueba.
<del>* En el lado izquierdo puede sobrescribir la `pick` con uno de los siguientes comandos. Si desea aplastar una confirmación en una anterior y descartar el mensaje de confirmación, ingrese `f` en el lugar de la `pick` de la confirmación.
<del>```
<del>pick 452b159 <message for this commit>
<del> pick 7fd4192 <message for this commit>
<del> pick c1af3e5 <message for this commit>
<del> pick 5f5e8d3 <message for this commit>
<del> pick 5186a9f <message for this commit>
<del>
<del> # Rebase 0617e63..5186a9f onto 0617e63 (30 commands)
<del> #
<del> # Commands:
<del> # p, pick = use commit
<del> # r, reword = use commit, but edit the commit message
<del> # e, edit = use commit, but stop for amending
<del> # s, squash = use commit, but meld into previous commit
<del> # f, fixup = like "squash", but discard this commit's log message
<del> # x, exec = run command (the rest of the line) using shell
<del> # d, drop = remove commit
<del> #
<del> # These lines can be re-ordered; they are executed from top to bottom.
<del> #
<del> # If you remove a line here THAT COMMIT WILL BE LOST.
<del> #
<del> # However, if you remove everything, the rebase will be aborted.
<del> #
<del> # Note that empty commits are commented out
<del>```
<del>
<del>* Ingrese `esc` seguido de `:wq` para guardar y salir.
<del>* Si se rebasa con éxito, entonces debes forzar los cambios con `git push -f` para agregar la versión rebasada a tu repositorio de github.
<del>* Si hay un conflicto de fusión, hay varias formas de solucionarlo, incluso siguiendo las sugerencias de [esta guía](https://help.github.com/enterprise/2.11/user/articles/resolving-a-merge-conflict-using-the-command-line/) . Una forma es abrir los archivos en un editor de texto y eliminar las partes del código que no desea. Luego use `git add <file name>` seguido de `git rebase --continue` . Puede omitir la confirmación en conflicto ingresando `git rebase --skip` , salga de git rebase ingresando `git rebase --abort` en su consola.
<del>
<del>### Más información:
<del>
<del>* [Documentación Git: Rebase](https://git-scm.com/docs/git-rebase)
<del>* [Thoughbot guía interactiva para git rebase](https://robots.thoughtbot.com/git-interactive-rebase-squash-amend-rewriting-history)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/git/git-remote/index.md
<del>---
<del>title: Git Remote
<del>localeTitle: Git Remote
<del>---
<del>## Git Remote
<del>
<del>El comando `git remote` permite administrar sus repositorios remotos Git. Los repositorios remotos son referencias a otros repositorios Git que operan en la misma base de código.
<del>
<del>Usted puede [tirar de](https://guide.freecodecamp.org/git/git-pull/) y [empujar](https://guide.freecodecamp.org/git/git-push/) repositorios remotos.
<del>
<del>Puede insertar o arrastrar a una URL HTTPS, como `https://github.com/user/repo.git` , o una URL SSH, como `git@github.com:user/repo.git` .
<del>
<del>No se preocupe, cada vez que presione algo, no necesita escribir la URL completa. Git asocia una URL remota con un nombre, y el nombre que la mayoría de la gente usa es `origin` .
<del>
<del>### Listar todos los repositorios remotos configurados
<del>
<del>```bash
<del>git remote -v
<del>```
<del>
<del>Este comando enumera todos los repositorios remotos junto con su ubicación.
<del>
<del>Los repositorios remotos son referidos por nombre. Como se señaló anteriormente, el repositorio principal de un proyecto generalmente se llama `origin` .
<del>
<del>Cuando tu usas [git clon](https://guide.freecodecamp.org/git/git-clone/) para obtener una copia de un repositorio, Git configura la ubicación original como el repositorio remoto de _origen_ .
<del>
<del>### Añadir un repositorio remoto
<del>
<del>Para agregar un repositorio remoto a su proyecto, ejecutaría el siguiente comando:
<del>
<del>```bash
<del>git remote add REMOTE-NAME REMOTE-URL
<del>```
<del>
<del>La `REMOTE-URL` puede ser HTTPS o SSH. Puede encontrar la URL en GitHub haciendo clic en el menú desplegable "Clonar o descargar" en su repositorio.
<del>
<del>Por ejemplo, si desea agregar un repositorio remoto y llamarlo `example` , ejecutaría:
<del>
<del>```bash
<del>git remote add example https://example.org/my-repo.git
<del>```
<del>
<del>### Actualizar una URL remota
<del>
<del>Si la URL de un repositorio remoto cambia, puede actualizarla con el siguiente comando, donde `example` es el nombre del remoto:
<del>
<del>```bash
<del>git remote set-url example https://example.org/my-new-repo.git
<del>```
<del>
<del>### Eliminar mandos a distancia
<del>
<del>Eliminar mandos a distancia se hace así:
<del>
<del>```bash
<del>git remote rm REMOTE-NAME
<del>```
<del>
<del>Puede confirmar que el control remoto se ha ido viendo la lista de sus controles remotos existentes:
<del>
<del>```bash
<del>git remote -v
<del>```
<del>
<del>### Más información:
<del>
<del>* [Git documentación remota](https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/git/git-reset/index.md
<del>---
<del>title: Git Reset
<del>localeTitle: Git Reset
<del>---
<del>## Git Reset
<del>
<del>El comando `git reset` te permite RESTAURAR tu cabeza actual a un estado específico. Puede restablecer el estado de archivos específicos, así como una rama completa.
<del>
<del>### Restablecer un archivo o conjunto de archivos
<del>
<del>El siguiente comando le permite elegir de forma selectiva fragmentos de contenido y revertirlo o deseleccionarlo.
<del>
<del>```shell
<del>git reset (--patch | -p) [tree-ish] [--] [paths]
<del>```
<del>
<del>### Unstage un archivo
<del>
<del>Si movió un archivo al área de preparación con `git add` , pero ya no quiere que forme parte de una confirmación, puede usar `git reset` para eliminar el escenario de ese archivo:
<del>
<del>```shell
<del>git reset HEAD FILE-TO-UNSTAGE
<del>```
<del>
<del>Los cambios que realizó aún estarán en el archivo, este comando simplemente elimina ese archivo de su área de preparación.
<del>
<del>### Restablecer una rama a una confirmación previa
<del>
<del>El siguiente comando restablece la CABEZA de su sucursal actual al `COMMIT` dado y actualiza el índice. Básicamente, rebobina el estado de su rama, luego todas las confirmaciones que haga adelante, escriben sobre todo lo que vino después del punto de reinicio. Si omite el `MODE` , el valor predeterminado es - `--mixed` :
<del>
<del>```shell
<del>git reset MODE COMMIT
<del>```
<del>
<del>Las opciones para `MODE` son:
<del>
<del>* `--soft` : no restablece el archivo de índice o el árbol de trabajo, pero restablece HEAD para `commit` . Cambia todos los archivos a "Cambios para ser comprometidos"
<del>* `--mixed` : restablece el índice pero no el árbol de trabajo e informa lo que no se ha actualizado
<del>* `--hard` : restablece el índice y el árbol de trabajo. Cualquier cambio en los archivos rastreados en el árbol de trabajo desde `commit` se desecha la `commit`
<del>* `--merge` : restablece el índice y actualiza los archivos en el árbol de trabajo que son diferentes entre `commit` y HEAD, pero mantiene aquellos que son diferentes entre el índice y el árbol de trabajo
<del>* `--keep` : restablece las entradas de índice y actualiza los archivos en el árbol de trabajo que son diferentes entre `commit` y HEAD. Si un archivo que es diferente entre `commit` y HEAD tiene cambios locales, el reinicio se cancela
<del>
<del>### Más información:
<del>
<del>* [Git restablecer documentación](https://git-scm.com/docs/git-reset)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/git/git-revert/index.md
<del>---
<del>title: Git Revert
<del>localeTitle: Git Revert
<del>---
<del>## Git Revert
<del>
<del>El comando `git revert` deshace una confirmación, pero a diferencia de `git reset` , que elimina la confirmación del historial de confirmación, agrega una nueva confirmación con el contenido resultante. Esto evita que Git pierda el historial, lo cual es importante para la integridad de su historial de revisiones y para una colaboración confiable. Cuando está trabajando en un repositorio con otros desarrolladores, usar `git reset` es altamente peligroso porque altera el historial de confirmaciones, lo que hace que sea muy difícil mantener un historial consistente de confirmaciones con otros desarrolladores.
<del>
<del>### Opciones comunes
<del>
<del>1.) Esta es una opción predeterminada y no necesita ser especificada. Esta opción abrirá el editor del sistema configurado y le pedirá que edite el mensaje de confirmación antes de confirmar la reversión.
<del>
<del>```shell
<del> -e
<del> --edit
<del>```
<del>
<del>2.) Este es el inverso de la opción -e. El `revert` no abrirá el editor.
<del>
<del>```shell
<del> --no-edit
<del>```
<del>
<del>3.) Pasar esta opción evitará que `git revert` cree un nuevo commit que invierta el target target. En lugar de crear la nueva confirmación, esta opción agregará los cambios inversos al Índice de transición y al Directorio de trabajo.
<del>
<del>```shell
<del> -n
<del> --no-edit
<del>```
<del>
<del>### Ejemplo.
<del>
<del>Imaginemos la siguiente situación. 1.) Está trabajando en un archivo y agrega y confirma sus cambios. 2.) Luego trabajas en algunas otras cosas, y haces más confirmaciones. 3.) Ahora te das cuenta, hace tres o cuatro confirmaciones, hiciste algo que te gustaría deshacer. ¿Cómo puedes hacer esto?
<del>
<del>Puede que estés pensando, solo usa `git reset` , pero esto eliminará todos los confirmaciones después de la que te gustaría cambiar: ¡ `git revert` al rescate! Veamos este ejemplo:
<del>
<del>```shell
<del>mkdir learn_revert # Create a folder called `learn_revert`
<del> cd learn_revert # `cd` into the folder `learn_revert`
<del> git init # Initialize a git repository
<del>
<del> touch first.txt # Create a file called `first.txt`
<del> echo Start >> first.txt # Add the text "Start" to `first.txt`
<del>
<del> git add . # Add the `first.txt` file
<del> git commit -m "adding first" # Commit with the message "Adding first.txt"
<del>
<del> echo WRONG > wrong.txt # Add the text "WRONG" to `wrong.txt`
<del> git add . # Add the `wrong.txt` file
<del> git commit -m "adding WRONG to wrong.txt" # Commit with the message "Adding WRONG to wrong.txt"
<del>
<del> echo More >> first.txt # Add the text "More" to `first.txt`
<del> git add . # Add the `first.txt` file
<del> git commit -m "adding More to first.txt" # Commit with the message "Adding More to first.txt"
<del>
<del> echo Even More >> first.txt # Add the text "Even More" to `first.txt`
<del> git add . # Add the `first.txt` file
<del> git commit -m "adding Even More to First.txt" # Commit with the message "Adding More to first.txt"
<del>
<del> # OH NO! We want to undo the commit with the text "WRONG" - let's revert! Since this commit was 2 from where we are not we can use git revert HEAD~2 (or we can use git log and find the SHA of that commit)
<del>
<del> git revert HEAD~2 # this will put us in a text editor where we can modify the commit message.
<del>
<del> ls # wrong.txt is not there any more!
<del> git log --oneline # note that the commit history hasn't been altered, we've just added a new commit reflecting the removal of the `wrong.txt`
<del>```
<del>
<del>#### Más información:
<del>
<del>* [Git revertir documentación](https://git-scm.com/docs/git-revert)
<del>* [Git revertir tutorial interactivo](https://www.atlassian.com/git/tutorials/undoing-changes/git-revert)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/git/git-show/index.md
<del>---
<del>title: Git Show
<del>localeTitle: Git Show
<del>---
<del>## Git Show
<del>
<del>`git show` es un comando útil que le permite ver en detalle la vista de un objeto determinado (confirmaciones, etiquetas, manchas y árboles).
<del>
<del>La sintaxis de este comando es la siguiente:
<del>
<del>```bash
<del>git show [<options>] [<object>…]
<del>```
<del>
<del>Para diferentes objetos `git show` da diferentes salidas.
<del>
<del>* confirma muestra el mensaje de registro de confirmación con una diferencia de cambios que se confirmaron.
<del>* Para las etiquetas, muestra el mensaje de la etiqueta y los objetos referenciados.
<del>* Para los árboles, muestra los nombres.
<del>* Para blobs lisos, muestra los contenidos lisos.
<del>
<del>El uso más común de `git show` sería en asociación con el objeto git commit
<del>
<del>```bash
<del>git show 3357d63
<del>```
<del>
<del>Obtendrías una salida similar a
<del>```
<del>commit 3357d63d8f44104940e568a1ba89fa88a16dc753
<del> Author: John Doe <johndoe@acme.com>
<del> Date: Tue Oct 2 00:57:38 2018 +0530
<del>
<del> add a section on git commit --amend --author
<del>
<del> diff --git a/src/pages/git/git-commit/index.md b/src/pages/git/git-commit/index.md
<del> index fc9f568..8f1c8eb 100644
<del> --- a/src/pages/git/git-commit/index.md
<del> +++ b/src/pages/git/git-commit/index.md
<del> Premature commits happen all the time in the course of your day-to-day developme
<del>
<del> Amended commits are actually entirely new commits and the previous commit will no longer be on your current branch. When you're working with others, you should try to avoid amending commits if the last commit is already pushed into the repository.
<del>
<del> +With `--amend`, one of the useful flag you could use is `--author` which enables you to change the author of the last commit you've made. Imagine a situation you haven't properly set up your name or email in git configurations but you already made a commit. With `--author` flag you can simply change them without resetting the last commit.
<del> +
<del> +```
<del> +git commit --amend --author="John Doe <johndoe@email.com>"
<del> +```
<del> +
<del> ### More Information:
<del> - Git documentation: [commit](https://git-scm.com/docs/git-commit)
<del>```
<del>
<del>Puede usar `git show` y se mostrará el contenido del último git commit.
<del>
<del>### Más información:
<del>
<del>* [Documentación Git - Mostrar](https://git-scm.com/docs/git-show)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/git/git-squash/index.md
<del>---
<del>title: Git Squash
<del>localeTitle: Git Squash
<del>---
<del>## Git Squash
<del>
<del>Una de las cosas que los desarrolladores escuchan a menudo con respecto a sus solicitudes de extracción es algo como "Eso me parece bien, por favor, aplastar y fusionar". La parte divertida es que no existe un comando como `git squash` (a menos que le crees un [alias](https://guide.freecodecamp.org/git/git-rebase) ). `squash` solicitud de extracción significa comúnmente compactar todas las confirmaciones en esta solicitud en una (rara vez a otro número) para hacerla más concisa, legible y no para contaminar el historial de la rama principal. Para lograrlo, el desarrollador debe utilizar **el modo interactivo** del comando [Git Rebase](https://guide.freecodecamp.org/git/git-rebase) .
<del>
<del>Muy a menudo, cuando desarrollas alguna característica nueva, terminas con varias confirmaciones intermitentes en tu historial, después de todo, desarrollas incrementalmente. Eso podría ser sólo algunos errores tipográficos o pasos para la solución final. La mayoría de las veces no sirve de nada tener todos estos compromisos en la versión pública final del código, por lo que es más beneficioso tener todos ellos compactados en uno, único y final.
<del>
<del>Así que supongamos que tiene el siguiente registro de confirmación en la rama que desea fusionar como parte de la solicitud de extracción:
<del>
<del>```shell
<del>$ git log --pretty=oneline --abbrev-commit
<del> 30374054 Add Jupyter Notebook stub to Data Science Tools
<del> 8490f5fc Minor formatting and Punctuation changes
<del> 3233cb21 Prototype for Notebook page
<del>```
<del>
<del>Claramente, preferiríamos tener un solo compromiso aquí, ya que no hay ningún beneficio en saber qué empezamos a escribir y qué errores tipográficos corregimos allí más adelante, solo el resultado final es importante.
<del>
<del>Entonces, lo que hacemos es iniciar una sesión de rebase interactiva desde **HEAD** actual (commit **30374054** ) para cometer **3233cb21** , con la intención de combinar **3** confirmaciones más recientes en una:
<del>
<del>```shell
<del>$ git rebase -i HEAD~3
<del>```
<del>
<del>Eso abrirá un editor con algo como lo siguiente:
<del>
<del>```shell
<del>pick 3233cb21 Prototype for Notebook page
<del> pick 8490f5fc Minor formatting and Punctuation changes
<del> pick 30374054 Add Jupyter Notebook to Data Science Tools
<del> # Rebase
<del> #
<del> # Commands:
<del> # p, pick = use commit
<del> # r, reword = use commit, but edit the commit message
<del> # e, edit = use commit, but stop for amending
<del> # s, squash = use commit, but meld into previous commit
<del> # f, fixup = like "squash", but discard this commit's log message
<del> # x, exec = run command (the rest of the line) using shell
<del> #
<del> # These lines can be re-ordered; they are executed from top to bottom.
<del> #
<del> # If you remove a line here THAT COMMIT WILL BE LOST.
<del> #
<del> # However, if you remove everything, the rebase will be aborted.
<del> #
<del> # Note that empty commits are commented out
<del>```
<del>
<del>Como siempre, Git nos da un mensaje de ayuda muy agradable en el que puede ver esta opción de `squash` que estamos buscando.
<del>
<del>Actualmente, las instrucciones para el rebase interactivo dicen que debe `pick` cada confirmación específica **y** conservar el mensaje de confirmación correspondiente. Es decir, no cambies nada. Pero queremos tener un solo commit al final. Simplemente edite el texto en su editor reemplazando `pick` con `squash` (o simplemente `s` ) al lado de cada compromiso que deseemos eliminar y guardar / salir del editor. Eso podría verse así:
<del>
<del>```shell
<del>s 3233cb21 Prototype for Notebook page
<del> s 8490f5fc Minor formatting and Punctuation changes
<del> pick 30374054 Add Jupyter Notebook to Data Science Tools
<del>```
<del>
<del>Cuando cierre su editor, guardando estos cambios, se volverá a abrir inmediatamente, lo que sugiere elegir y reformular los mensajes de confirmación. Algo como
<del>
<del>```shell
<del># This is a combination of 3 commits.
<del> # The first commit's message is:
<del> Prototype for Notebook page
<del>
<del> # This is the 2nd commit message:
<del>
<del> Minor formatting and Punctuation changes
<del>
<del> # This is the 3rd commit message:
<del>
<del> Add Jupyter Notebook to Data Science Tools
<del>
<del> # Please enter the commit message for your changes. Lines starting
<del> # with '#' will be ignored, and an empty message aborts the commit.
<del>```
<del>
<del>En este punto, puede eliminar todos los mensajes que no desea que se incluyan en la versión final de confirmación, reformularlos o simplemente escribir un mensaje de confirmación desde cero. Solo recuerda que la nueva versión incluirá todas las líneas que no comienzan con `#` carácter `#` . Una vez más, guarde y salga de su editor.
<del>
<del>Ahora su terminal debería mostrar un mensaje de éxito que incluya el `Successfully rebased and updated <branch name>` y el registro de git debe mostrar un historial agradable y compacto con solo un compromiso. ¡Todos los compromisos intermedios se han ido y estamos listos para fusionarnos!
<del>
<del>### Advertencia sobre la discrepancia del historial de confirmaciones local y remota
<del>
<del>Esta operación es ligeramente peligrosa si ya tiene su sucursal publicada en un repositorio remoto; después de todo, está modificando el historial de confirmación. Así que es mejor hacer la operación de squash en la sucursal local antes de **empujar** . A veces, ya se enviará. ¿Cómo crearía una solicitud de extracción después de todo? En este caso, tendrá que **forzar** los cambios en la rama remota después de hacer el aplastamiento, ya que su historial local y el historial de la rama en el repositorio remoto son diferentes:
<del>
<del>`shell $ git push origin +my-branch-name`
<del>
<del>Haz lo mejor para asegurarte de que eres el único que usa esta rama remota en este momento, o harás su vida más difícil si no coinciden con el historial. Pero dado que el **aplastamiento** generalmente se realiza como la operación final en una rama antes de deshacerse de él, generalmente no es una preocupación tan grande.
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/git/git-stash/index.md
<del>---
<del>title: Git Stash
<del>localeTitle: Git Stash
<del>---
<del>## Git Stash
<del>
<del>Git tiene un área llamada el alijo donde puede almacenar temporalmente una instantánea de sus cambios sin confirmarlos en el repositorio. Es independiente del directorio de trabajo, el área de preparación o el repositorio.
<del>
<del>Esta funcionalidad es útil cuando ha realizado cambios en una rama que no está listo para realizar, pero necesita cambiar a otra rama.
<del>
<del>### Cambios de Stash
<del>
<del>Para guardar sus cambios en el alijo, ejecute el comando:
<del>
<del>```shell
<del>git stash save "optional message for yourself"
<del>```
<del>
<del>Esto guarda sus cambios y revierte el directorio de trabajo a lo que parecía para la última confirmación. Los cambios ocultos están disponibles desde cualquier sucursal en ese repositorio.
<del>
<del>Tenga en cuenta que los cambios que desea ocultar deben estar en archivos rastreados. Si creó un nuevo archivo e intenta guardar los cambios, puede obtener el error `No local changes to save` .
<del>
<del>### Ver cambios ocultos
<del>
<del>Para ver lo que está en su alijo, ejecute el comando:
<del>
<del>```shell
<del>git stash list
<del>```
<del>
<del>Esto devuelve una lista de sus instantáneas guardadas en el formato `stash@{0}: BRANCH-STASHED-CHANGES-ARE-FOR: MESSAGE` . La parte de `stash@{0}` es el nombre del alijo, y el número entre las llaves ( `{ }` ) es el índice de ese alijo. Si tiene varios conjuntos de cambios ocultos, cada uno tendrá un índice diferente.
<del>
<del>Si olvidó qué cambios se hicieron en el alijo, puede ver un resumen de ellos con el `git stash show NAME-OF-STASH` . Si desea ver el diseño típico de parches de estilo dif (con los + y - para los cambios de línea por línea), puede incluir la opción `-p` (para parche). Aquí hay un ejemplo:
<del>
<del>```shell
<del>git stash show -p stash@{0}
<del>
<del> # Example result:
<del> diff --git a/PathToFile/fileA b/PathToFile/fileA
<del> index 2417dd9..b2c9092 100644
<del> --- a/PathToFile/fileA
<del> +++ b/PathToFile/fileA
<del>
<del> -What this line looks like on branch
<del> +What this line looks like with stashed changes
<del>```
<del>
<del>### Recuperar cambios ocultos
<del>
<del>Para recuperar los cambios fuera del alijo y aplicarlos a la rama actual en la que está, tiene dos opciones:
<del>
<del>1. `git stash apply STASH-NAME` aplica los cambios y deja una copia en el stash
<del>2. `git stash pop STASH-NAME` aplica los cambios y elimina los archivos del alijo
<del>
<del>Puede haber conflictos al aplicar cambios. Puede resolver los conflictos similares a una combinación ( [consulte la combinación de Git para obtener detalles](https://guide.freecodecamp.org/git/git-merge/) ).
<del>
<del>### Eliminar cambios ocultos
<del>
<del>Si desea eliminar los cambios ocultos sin aplicarlos, ejecute el comando:
<del>
<del>```shell
<del>git stash drop STASH-NAME
<del>```
<del>
<del>Para borrar todo el alijo, ejecute el comando:
<del>
<del>```shell
<del>git stash clear
<del>```
<del>
<del>### Más información:
<del>
<del>* El comando `git merge` : [fCC Guide](https://guide.freecodecamp.org/git/git-merge/)
<del>* Documentación Git: [Stash](https://git-scm.com/docs/git-stash)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/git/git-status/index.md
<del>---
<del>title: Git Status
<del>localeTitle: Estado de Git
<del>---
<del>## Estado de Git
<del>
<del>Los comandos de `git status` muestran el estado del directorio de trabajo y el área de preparación. Muestra las rutas que tienen diferencias entre el archivo de `index` y la confirmación `HEAD` actual, las rutas que tienen diferencias entre el árbol de trabajo y el archivo de `index` , y las rutas en el árbol de trabajo que Git no rastrea (y que no se ignoran por [gitignore).](https://git-scm.com/docs/gitignore)
<del>
<del>`git status` salida del comando `git status` no muestra ninguna información sobre el historial de proyectos confirmado. Para esto, necesitas usar `git log` .
<del>
<del>### Uso
<del>
<del>```shell
<del>git status
<del>```
<del>
<del>Enumere qué archivos se almacenan, no se organizan y no se rastrean.
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/git/git-verifying-commits/index.md
<del>---
<del>title: Git Verifying Commits
<del>localeTitle: Git verificación de compromisos
<del>---
<del>## Git verificación de compromisos
<del>
<del>Cuando está creando software con personas de todo el mundo, a veces es importante validar que las confirmaciones y las etiquetas provienen de una fuente identificada. Git admite la firma de confirmaciones y etiquetas con GPG. GitHub muestra cuando se comprometen y las etiquetas están firmadas.
<del>
<del>
<del>
<del>Cuando vea una confirmación o etiqueta firmada, verá una credencial que indica si la firma se pudo verificar mediante alguna de las claves GPG del contribuyente cargadas en GitHub. Puede cargar sus claves GPG visitando la página de configuración de claves.
<del>
<del>Muchos proyectos y compañías de código abierto quieren estar seguros de que un compromiso proviene de una fuente verificada. La verificación de firma GPG en confirmaciones y etiquetas hace que sea fácil ver cuándo una confirmación o etiqueta está firmada por una clave verificada que GitHub conoce.
<del>
<del>
<del>
<del>### Más información:
<del>
<del>* [Firmando tu trabajo](https://git-scm.com/book/en/v2/Git-Tools-Signing-Your-Work)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/git/gitignore/index.md
<del>---
<del>title: Gitignore
<del>localeTitle: .gitignore
<del>---
<del>## Gitignore
<del>
<del>El archivo `.gitignore` es un archivo de texto que le dice a Git qué archivos o carpetas debe ignorar en un proyecto.
<del>
<del>Un archivo `.gitignore` local generalmente se coloca en el directorio raíz de un proyecto. También puede crear un archivo `.gitignore` global y cualquier entrada en ese archivo se ignorará en todos sus repositorios Git.
<del>
<del>Para crear un archivo `.gitignore` local, cree un archivo de texto y `.gitignore` nombre `.gitignore` (recuerde incluir el `.` Al principio). Luego edite este archivo según sea necesario. Cada nueva línea debe incluir un archivo o carpeta adicional que desee que Git ignore.
<del>
<del>Las entradas en este archivo también pueden seguir un patrón coincidente.
<del>
<del>* `*` se utiliza como una coincidencia de comodín
<del>* `/` se usa para ignorar las `.gitignore` acceso relativas al archivo `.gitignore`
<del>* `#` se usa para agregar comentarios a un archivo `.gitignore`
<del>
<del>Este es un ejemplo de cómo podría verse el archivo `.gitignore` :
<del>```
<del># Ignore Mac system files
<del> .DS_store
<del>
<del> # Ignore node_modules folder
<del> node_modules
<del>
<del> # Ignore all text files
<del> *.txt
<del>
<del> # Ignore files related to API keys
<del> .env
<del>
<del> # Ignore SASS config files
<del> .sass-cache
<del>```
<del>
<del>Para agregar o cambiar su archivo .gitignore global, ejecute el siguiente comando:
<del>
<del>```bash
<del>git config --global core.excludesfile ~/.gitignore_global
<del>```
<del>
<del>Esto creará el archivo `~/.gitignore_global` . Ahora puede editar ese archivo de la misma manera que un archivo `.gitignore` local. Todos los repositorios de Git ignorarán los archivos y carpetas enumerados en el archivo `.gitignore` global.
<del>
<del>### Más información:
<del>
<del>* Documentación Git: [Gitignore](https://git-scm.com/docs/gitignore)
<del>* Ignorando archivos: [GitHub](https://help.github.com/articles/ignoring-files/)
<del>* Plantillas útiles `.gitignore` : [GitHub](https://github.com/github/gitignore)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/git/gui-options/index.md
<del>---
<del>title: GUI Options
<del>localeTitle: Opciones de GUI
<del>---
<del>## Opciones de GUI para Git
<del>
<del>La mayoría de la gente prefiere usar Git como una herramienta [CLI (interfaz de línea de comando)](https://en.wikipedia.org/wiki/Command-line_interface) , pero hay muchas herramientas [GUI (interfaz gráfica de usuario)](https://en.wikipedia.org/wiki/Graphical_user_interface) que le permiten usar Git de una manera gráfica. Las herramientas de la GUI pueden ser útiles para obtener una mejor vista del estado de su repositorio Git, y algunas pueden encontrarlas más fáciles de usar que la CLI. Sin embargo, es muy recomendable saber cómo usar la CLI porque será la misma interfaz en todas las plataformas, ya que generalmente se considera más eficiente y porque se requiere tan pronto como quiera hacer algo incluso un poco complejo. .
<del>
<del>## Lista de soluciones basadas en GUI de Git
<del>
<del>* [GitKraken](https://www.gitkraken.com) es una popular GUI de Git para Windows, Mac y Linux. Es propietario pero gratuito para uso no comercial.
<del>* [GitHub Desktop](https://desktop.github.com/) es la aplicación cliente de Git proporcionada por GitHub, que permite una mejor integración con GitHub que otras soluciones. Está disponible para Windows y Mac, pero todavía no para Linux. Es gratis y de código abierto.
<del>* [SourceTree](https://www.sourcetreeapp.com/) es otra GUI Git para Windows y Mac de Atlassian. Tiene muchas características, como el rebase interactivo, diseñado para facilitar el uso de Git para principiantes.
<del>* [Git Tower](https://www.git-tower.com/mac/) está disponible para Mac y Windows.
<del>* [TortoiseGit](https://tortoisegit.org/) es una interfaz de shell de Windows para Git basada en TortoiseSVN. Es de código abierto y se puede construir con software de libre acceso.
<del>* [SmartGit](https://www.syntevo.com/smartgit/) es un cliente Git gratuito para uso no comercial para Windows, Mac y Linux.
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/git/index.md
<del>---
<del>title: Git
<del>localeTitle: ir
<del>---
<del>## Git
<del>
<del>Git es un sistema de control de versiones distribuido de código abierto creado en 2005 por Linus Torvalds y otros de la comunidad de desarrollo de Linux. Git puede trabajar con muchos tipos de proyectos, pero se usa más comúnmente para el código fuente del software.
<del>
<del>El control de versiones es un sistema que realiza un seguimiento de los cambios en un archivo o grupo de archivos a lo largo del tiempo. Cuando tiene un historial de estos cambios, le permite encontrar versiones específicas más adelante, comparar cambios entre versiones, recuperar archivos que haya eliminado o revertir archivos a versiones anteriores.
<del>
<del>Un sistema de control de versiones _distribuido_ significa que diferentes usuarios mantienen sus propios repositorios de un proyecto, en lugar de trabajar desde un repositorio central. Los usuarios tienen automáticamente capacidades completas de seguimiento de archivos y el historial completo de la versión del proyecto sin necesidad de acceder a un servidor o red central.
<del>
<del>Cuando Git se inicializa en el directorio de un proyecto, comienza a rastrear los cambios en los archivos y los almacena como "conjuntos de cambios" o "parches". Los usuarios que trabajan juntos en un proyecto envían sus conjuntos de cambios que luego se incluyen (o se rechazan) en el proyecto.
<del>
<del>**Tabla de contenido**
<del>
<del>* [Comprender las tres secciones de un proyecto Git](#understand-the-three-sections-of-a-git-project)
<del>* [Instalar git](#install-git)
<del>* [Configurar el entorno Git](#configure-the-git-environment)
<del>* [Inicializar Git en un proyecto](#initialize-git-in-a-project)
<del>* [Obtén ayuda en Git](#get-help-in-git)
<del>* [Fuentes](#sources)
<del>* [Más información](#more-information)
<del>
<del>### Comprender las tres secciones de un proyecto Git
<del>
<del>Un proyecto Git tendrá las siguientes tres secciones principales:
<del>
<del>1. Directorio de git
<del>2. Directorio de trabajo (o árbol de trabajo)
<del>3. Área de ensayo
<del>
<del>El **directorio de Git** (ubicado en `YOUR-PROJECT-PATH/.git/` ) es donde Git almacena todo lo que necesita para realizar un seguimiento preciso del proyecto. Esto incluye metadatos y una base de datos de objetos que incluye versiones comprimidas de los archivos del proyecto.
<del>
<del>El **directorio de trabajo** es donde un usuario realiza cambios locales en un proyecto. El directorio de trabajo extrae los archivos del proyecto de la base de datos de objetos del directorio Git y los coloca en la máquina local del usuario.
<del>
<del>El **área de preparación** es un archivo (también llamado "índice", "etapa" o "caché") que almacena información sobre lo que ingresará en su próxima confirmación. Un compromiso es cuando le dice a Git que guarde estos cambios en etapas. Git toma una instantánea de los archivos tal como son y almacena permanentemente esa instantánea en el directorio de Git.
<del>
<del>Con tres secciones, hay tres estados principales en los que un archivo puede estar en un momento dado: confirmado, modificado o por etapas. Usted _modifica_ un archivo cada vez que lo modifica en su directorio de trabajo. A continuación, se _pone_ en _escena_ cuando lo mueves al área de preparación. Finalmente, se _compromete_ después de un commit.
<del>
<del>### Instalar git
<del>
<del>* Ubuntu: `sudo apt-get install git`
<del>* Windows: [Descargar](https://git-scm.com/download/win)
<del>* Mac: [Descargar](https://git-scm.com/download/mac)
<del>
<del>### Configurar el entorno Git
<del>
<del>Git tiene una herramienta de `git config` que te permite personalizar tu entorno Git. Puede cambiar la apariencia y funciones de Git configurando ciertas variables de configuración. Ejecute estos comandos desde una interfaz de línea de comandos en su máquina (Terminal en Mac, Símbolo del sistema o PowerShell en Windows).
<del>
<del>Hay tres niveles donde se almacenan estas variables de configuración:
<del>
<del>1. Sistema: ubicado en `/etc/gitconfig` , aplica la configuración predeterminada a todos los usuarios de la computadora. Para realizar cambios en este archivo, use la opción `--system` con el comando `git config` .
<del>2. Usuario: ubicado en `~/.gitconfig` o `~/.config/git/config` , aplica la configuración a un solo usuario. Para realizar cambios en este archivo, use la opción `--global` con el comando `git config` .
<del>3. Proyecto: ubicado en `YOUR-PROJECT-PATH/.git/config` , aplica la configuración solo al proyecto. Para realizar cambios en este archivo, use el comando `git config` .
<del>
<del>Si hay configuraciones que entran en conflicto entre sí, las configuraciones de nivel de proyecto anularán las de nivel de usuario y las configuraciones de nivel de usuario anularán las de nivel de sistema.
<del>
<del>Nota para los usuarios de Windows: Git busca el archivo de configuración de nivel de usuario ( `.gitconfig` ) en su directorio `$HOME` ( `C:\Users\$USER` ). Git también busca `/etc/gitconfig` , aunque es relativo a la raíz de MSys, que es donde usted decide instalar Git en su sistema Windows cuando ejecuta el instalador. Si está utilizando la versión 2.x o posterior de Git para Windows, también hay un archivo de configuración de nivel de sistema en `C:\Documents and Settings\All Users\Application Data\Git\config` en Windows XP y en `C:\ProgramData\Git\config` en Windows Vista y más reciente. Este archivo de configuración solo se puede cambiar con `git config -f FILE` como administrador.
<del>
<del>#### Añada su nombre y correo electrónico
<del>
<del>Git incluye el nombre de usuario y el correo electrónico como parte de la información en un compromiso. Querrá configurar esto bajo su archivo de configuración de nivel de usuario con estos comandos:
<del>
<del>```shell
<del>git config --global user.name "My Name"
<del> git config --global user.email "myemail@example.com"
<del>```
<del>
<del>#### Cambia tu editor de texto
<del>
<del>Git usa automáticamente tu editor de texto predeterminado, pero puedes cambiarlo. Aquí hay un ejemplo para usar el editor Atom (la opción `--wait` le dice al shell que espere al editor de texto para que pueda hacer su trabajo antes de que el programa avance):
<del>
<del>```shell
<del>git config --global core.editor "atom --wait"
<del>```
<del>
<del>#### Añadir color a la salida Git
<del>
<del>Puedes configurar tu shell para agregar color a la salida de Git con este comando:
<del>
<del>```shell
<del>git config --global color.ui true
<del>```
<del>
<del>Para ver todos sus ajustes de configuración, use el comando `git config --list` .
<del>
<del>### Inicializar Git en un proyecto
<del>
<del>Una vez que Git esté instalado y configurado en su computadora, debe inicializarlo en su proyecto para comenzar a usar sus poderes de control de versiones. En la línea de comandos, use el comando `cd` para navegar a la carpeta de nivel superior (o raíz) de su proyecto. A continuación, ejecute el comando `git init` . Esto instala una carpeta de directorio Git con todos los archivos y objetos que Git necesita para rastrear su proyecto.
<del>
<del>Es importante que el directorio Git esté instalado en la carpeta raíz del proyecto. Git puede rastrear archivos en subcarpetas, pero no rastrear archivos ubicados en una carpeta principal relacionada con el directorio de Git.
<del>
<del>### Obtén ayuda en Git
<del>
<del>Si olvida cómo funciona cualquier comando en Git, puede acceder a la ayuda de Git desde la línea de comandos de varias maneras:
<del>
<del>```shell
<del>git help COMMAND
<del> git COMMAND --help
<del> man git-COMMAND
<del>```
<del>
<del>Esto muestra la página de manual para el comando en su ventana de shell. Para navegar, desplácese con las teclas de flecha arriba y abajo o use los siguientes métodos abreviados de teclado:
<del>
<del>* `f` o `spacebar` a la página hacia adelante
<del>* `b` para volver a la página
<del>* `q` para dejar de fumar
<del>
<del>### Fuentes
<del>
<del>Este artículo utiliza información del libro [Pro Git](https://github.com/progit/progit2) , escrito por Scott Chacon y Ben Straub y publicado por Apress. El libro se muestra en su totalidad en la [documentación de Git](https://git-scm.com/book/en/v2) .
<del>
<del>### Más información:
<del>
<del>* Para descargas, documentación y un tutorial basado en navegador: [sitio web oficial de Git](https://git-scm.com/)
<del>* La mayoría de los comandos útiles cuando estás en una situación GIT mala: [¡Oh, mierda, git!](http://ohshitgit.com/)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/git/tagging-in-git/index.md
<del>---
<del>title: Tagging in Git
<del>localeTitle: Etiquetado en Git
<del>---
<del>El etiquetado permite a los desarrolladores marcar puntos de control importantes en el curso del desarrollo de sus proyectos. Por ejemplo, las versiones de lanzamiento de software se pueden etiquetar. (Ej: v1.3.2) Esencialmente le permite asignar un nombre especial (etiqueta) a un commit.
<del>
<del>Para ver todas las etiquetas creadas en orden alfabético:
<del>
<del>```bash
<del>git tag
<del>```
<del>
<del>Para obtener más información en una etiqueta:
<del>
<del>```bash
<del>git show v1.4
<del>```
<del>
<del>Hay dos tipos de etiquetas:
<del>
<del>1. Anotado
<del>
<del>```bash
<del>git tag -a v1.2 -m "my version 1.4"
<del>```
<del>
<del>2. Ligero
<del>
<del>```bash
<del>git tag v1.2
<del>```
<del>
<del>Se diferencian en la forma en que se almacenan.
<del>Estos crean etiquetas en su confirmación actual.
<del>
<del>En el caso, le gustaría etiquetar una confirmación anterior, especifique el ID de confirmación que desea etiquetar:
<del>
<del>```bash
<del>git tag -a v1.2 9fceb02
<del>```
<del>
<del>Los nombres de las etiquetas se pueden usar en lugar de las ID de confirmación al retirar y enviar las confirmaciones a un repositorio remoto.
<del>
<del>#### Más información:
<del>
<del>* Documentación Git: [Documentación](https://git-scm.com/docs/git-tag)
<del>* Capítulo Git Tagging: [Libro](https://git-scm.com/book/en/v2/Git-Basics-Tagging)
<del>
<del>Puede enumerar todas las etiquetas disponibles en un proyecto con el comando `git tag` (indique que aparecerán en orden alfabético):
<del>```
<del>$ git tag
<del> v1.0
<del> v2.0
<del> v3.0
<del>```
<del>
<del>Esta forma de enumerar etiquetas es ideal para proyectos pequeños, pero los proyectos más grandes pueden tener cientos de etiquetas, por lo que es posible que deba filtrarlas cuando busque un punto importante en el historial. Puede encontrar etiquetas que contengan caracteres específicos agregando un `-l` al comando de `git tag` :
<del>```
<del>$ git tag -l "v2.0*"
<del> v2.0.1
<del> v2.0.2
<del> v2.0.3
<del> v2.0.4
<del>```
<del>
<del>## Crear una etiqueta
<del>
<del>Puede crear dos tipos de etiquetas: anotadas y ligeras. Los primeros son objetos de la competencia en la base de datos GIT: son suma de comprobación, requieren un mensaje (como confirmaciones) y almacenan otros datos importantes como nombre, correo electrónico y fecha. Por otro lado, las etiquetas ligeras no requieren un mensaje o almacenar otros datos, trabajando solo como un puntero a un punto específico del proyecto.
<del>
<del>### Crear una etiqueta anotada
<del>
<del>Para crear una etiqueta anotada, agregue `-a tagname -m "tag message"` al comando de `git tag` :
<del>```
<del>$ git tag -a v4.0 -m "release version 4.0"
<del> $ git tag
<del> v1.0
<del> v2.0
<del> v3.0
<del> v4.0
<del>```
<del>
<del>Como puede ver, la `-a` especifica que está creando una etiqueta anotada, después aparece el nombre de la etiqueta y, finalmente, la `-m` seguida del mensaje de la etiqueta para almacenar en la base de datos de Git.
<del>
<del>### Crear una etiqueta ligera
<del>
<del>Las etiquetas ligeras contienen solo la suma de verificación de confirmación (no se almacena ninguna otra información). Para crear uno, simplemente ejecute el comando `git tag` sin ninguna otra opción (los caracteres -lw al final del nombre se usan para indicar etiquetas ligeras, pero puede marcarlos como desee):
<del>```
<del>$ git tag v4.1-lw
<del> $ git tag
<del> v1.0
<del> v2.0
<del> v3.0
<del> v4.0
<del> v4.1-lw
<del>```
<del>
<del>Esta vez no especificó un mensaje u otros datos relevantes, por lo que la etiqueta solo contiene la suma de verificación del compromiso referido.
<del>
<del>## Ver los datos de la etiqueta
<del>
<del>Puede ejecutar el comando `git show` para ver los datos almacenados en una etiqueta. En el caso de etiquetas anotadas, verá los datos de la etiqueta y los datos de confirmación:
<del>```
<del>$ git show v4.0
<del> tag v4.0
<del> Tagger: John Cash <john@cash.com>
<del> Date: Mon Sat 28 15:00:25 2017 -0700
<del>
<del> release version 4.0
<del>
<del> commit da43a5fss745av88d47839247990022a98419093
<del> Author: John Cash <john@cash.com>
<del> Date: Fri Feb 20 20:30:05 2015 -0700
<del>
<del> finished details
<del>```
<del>
<del>Si la etiqueta que está viendo es una etiqueta liviana, solo verá los datos de confirmación referidos:
<del>```
<del>$ git show v1.4-lw
<del> commit da43a5f7389adcb9201ab0a289c389ed022a910b
<del> Author: John Cash <john@cash.com>
<del> Date: Fri Feb 20 20:30:05 2015 -0700
<del>
<del> finished details
<del>```
<del>
<del>## Etiquetado de confirmaciones antiguas
<del>
<del>También puede etiquetar confirmaciones pasadas usando la confirmación de etiqueta git. Para hacer esto, deberá especificar la suma de verificación de la confirmación (o al menos una parte de ella) en la línea del comando.
<del>
<del>Primero, ejecute git log para averiguar la suma de comprobación de confirmación requerida:
<del>```
<del>$ git log --pretty=oneline
<del> ac2998acf289102dba00823821bee04276aad9ca added products section
<del> d09034bdea0097726fd8383c0393faa0072829a7 refactorization
<del> a029ac120245ab012bed1ca771349eb9cca01c0b modified styles
<del> da43a5f7389adcb9201ab0a289c389ed022a910b finished details
<del> 0adb03ca013901c1e02174924486a08cea9293a2 small fix in search textarea styles
<del>```
<del>
<del>Cuando tenga la suma de comprobación necesaria, agréguela al final de la línea de creación de la etiqueta:
<del>```
<del>$ git tag -a v3.5 a029ac
<del>```
<del>
<del>Verás que la etiqueta se agregó correctamente ejecutando la `git tag` :
<del>```
<del>$ git tag
<del> v1.0
<del> v2.0
<del> v3.0
<del> v3.5
<del> v4.0
<del> v4.1-lw
<del>```
<del>
<del>## Etiquetas de empuje
<del>
<del>Git no empuja las etiquetas de manera predeterminada cuando ejecuta el comando git push. Por lo tanto, para insertar con éxito una etiqueta en un servidor, tendrá que `git push origin` comando de `git push origin` :
<del>```
<del>$ git push origin v4.0
<del> Counting objects: 14, done.
<del> Delta compression using up to 8 threads.
<del> Compressing objects: 100% (16/16), done.
<del> Writing objects: 100% (18/18), 3.15 KiB | 0 bytes/s, done.
<del> Total 18 (delta 4), reused 0 (delta 0)
<del> To git@github.com:jcash/gitmanual.git
<del> * [new tag] v4.0 -> v4.0
<del> ```
<del>
<del> You can also use the ```--tags``` option to add multiple tags at once with the ```git push origin``` command:
<del>```
<del>
<del>origen de $ git push --tags Contando objetos: 1, hecho. Objetos de escritura: 100% (1/1), 160 bytes | 0 bytes / s, hecho. Total 1 (delta 0), reutilizado 0 (delta 0) Para git@github.com: jcash / gitmanual.git
<del>
<del>* \[nueva etiqueta\] v4.0 -> v4.0
<del>* \[nueva etiqueta\] v4.1-lw -> v4.1-lw
<del>```
<del>## Checking out Tags
<del>
<del> You can use ```git checkout``` to checkout to a tag like you would normally do. But you need to keep in mind that this would result a *detached HEAD* state.
<del>```
<del>
<del>$ git checkout v0.0.3 Nota: revisar 'v0.0.3'.
<del>
<del>Usted está en estado de 'cabeza desapegada'. Puedes mirar alrededor, hacer experimental. Cambia y confirma, y puedes descartar cualquier confirmación que hagas en este Estado sin afectar a ninguna rama mediante la realización de otra comprobación.
<del>```
<del>## Deleting a Tag
<del>
<del> You may find a situation were you want to delete a certain tag. There's a very useful command for this situations:
<del>```
<del>
<del>$ git tag --delete v0.0.2 $ git tag v0.0.1 v0.0.3 v0.0.4 \`\` \`
<del>
<del>### Más información
<del>
<del>* [Git Pro - Conceptos básicos de etiquetado](https://git-scm.com/book/en/v2/Git-Basics-Tagging)
<del>* [Git Pro - Documentación](https://git-scm.com/docs/git-tag)
<del>* [Git HowTo](https://githowto.com/tagging_versions)
<del>* [Git tip: Tags](http://alblue.bandlem.com/2011/04/git-tip-of-week-tags.html)
<del>* [Creando una etiqueta](https://www.drupal.org/node/1066342)
<del>
<del>### Fuentes
<del>
<del>Documentación Git: [Etiquetas](https://git-scm.com/book/en/v2/Git-Basics-Tagging)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/go/index.md
<del>---
<del>title: Go
<del>localeTitle: Ir
<del>---
<del>## Ir
<del>
<del>
<del>
<del>**Go** (o **golang** ) es un lenguaje de programación creado en Google en 2007 por Robert Griesemer, Rob Pike y Ken Thompson. Es un lenguaje compilado, de tipo estático, en la tradición de Algol y C. Se han agregado funciones de recolección de basura, tipificación estructural limitada, seguridad de memoria y programación concurrente de estilo CSP. El compilador y otras herramientas de lenguaje originalmente desarrolladas por Google son gratuitas y de código abierto. Su popularidad está aumentando rápidamente. Es una gran opción para construir aplicaciones web.
<del>
<del>Para más información diríjase a [la página de inicio de Go.](https://golang.org/)
<del>
<del>¿Quieres un rápido [Tour de Go?](https://tour.golang.org/welcome/1)
<del>
<del>## \## Pre-instalaciones:
<del>
<del>#### Instale Golang con Homebrew:
<del>
<del>```bash
<del>$ brew update
<del> $ brew install golang
<del>```
<del>
<del>#### Cuando esté instalado, intente ejecutar la versión go para ver la versión instalada de Go.
<del>
<del>## \### Configurar el espacio de trabajo:
<del>
<del>##### Añadir variables de entorno:
<del>
<del>Primero, deberá indicar a Go la ubicación de su área de trabajo.
<del>
<del>Agregaremos algunas variables de entorno en la configuración de shell. Uno de los archivos ubicados en su directorio de inicio bash\_profile, bashrc o .zshrc (para Oh My Zsh Army)
<del>
<del>```bash
<del>$ vi .bashrc
<del>```
<del>
<del>\`
<del>
<del>Luego agrega esas líneas para exportar las variables requeridas.
<del>
<del>#### Este es en realidad su archivo .bashrc
<del>
<del>```bash
<del>export GOPATH=$HOME/go-workspace # don't forget to change your path correctly!
<del> export GOROOT=/usr/local/opt/go/libexec
<del> export PATH=$PATH:$GOPATH/bin
<del> export PATH=$PATH:$GOROOT/bin
<del>```
<del>
<del>## \#### Crea tu espacio de trabajo:
<del>
<del>##### Crea el árbol de directorios del espacio de trabajo:
<del>
<del>```bash
<del>$ mkdir -p $GOPATH $GOPATH/src $GOPATH/pkg $GOPATH/bin
<del> $GOPATH/src : Where your Go projects / programs are located
<del> $GOPATH/pkg : contains every package objects
<del> $GOPATH/bin : The compiled binaries home
<del>```
<del>
<del>### Inicio rápido
<del>
<del>Para un proyecto Go de arranque rápido y repetitivo, pruebe [Alloy](https://www.growthmetrics.io/open-source/alloy)
<del>
<del>1. Repositorio de Aleaciones Clonales
<del>```
<del>git clone https://github.com/olliecoleman/alloy
<del> cd alloy
<del>```
<del>
<del>2. Instala las dependencias
<del>```
<del>glide install
<del> npm install
<del>```
<del>
<del>3. Iniciar el servidor de desarrollo
<del>```
<del>go install
<del> alloy dev
<del>```
<del>
<del>4. Visite el sitio web en `http://localhost:1212`
<del>
<del>_Alloy usa Node, NPM y Webpack_
<del>
<del>### Ir al patio de recreo
<del>
<del>[Ir al patio de recreo](https://play.golang.org/)
<del>
<del>Aprender a instalar go en su máquina local es importante, pero si desea comenzar a jugar vaya directamente a su navegador, entonces Go Playground es la caja de arena perfecta para comenzar de inmediato. Para obtener más información sobre Go Playground, consulte su artículo titulado [Inside the Go Playground](https://blog.golang.org/playground)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/groovy/index.md
<del>---
<del>title: Groovy
<del>localeTitle: Maravilloso
<del>---
<del>## Maravilloso
<del>
<del>Apache Groovy o Groovy es un lenguaje poderoso y dinámico con capacidades de compilación y escritura estáticas para la plataforma Java y fue diseñado para aumentar la productividad con su sintaxis concisa y familiar. Se integra con cualquier programa de Java con facilidad.
<del>
<del>#### Más información:
<del>
<del>Para obtener documentación y más información, visite [el sitio web oficial de Groovy](http://groovy-lang.org)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/attributes/a-href-attribute/index.md
<del>---
<del>title: A Href Attribute
<del>localeTitle: Un atributo de Href
<del>---
<del>## Un atributo de Href
<del>
<del>El atributo `<a href>` refiere a un destino proporcionado por un enlace. La `a` etiqueta (ancla) no funciona sin el `<href>` atributo. A veces, en su flujo de trabajo, no desea un enlace en vivo o aún no sabrá el destino del enlace. En este caso, es útil establecer el atributo `href` en `"#"` para crear un enlace muerto. El atributo `href` se puede usar para vincular archivos locales o archivos en Internet.
<del>
<del>Por ejemplo:
<del>
<del>```html
<del>
<del><html>
<del> <head>
<del> <title>Href Attribute Example</title>
<del> </head>
<del> <body>
<del> <h1>Href Attribute Example</h1>
<del> <p>
<del> <a href="https://www.freecodecamp.org/contribute/">The freeCodeCamp Contribution Page</a> shows you how and where you can contribute to freeCodeCamp's community and growth.
<del> </p>
<del> </h1>
<del> </body>
<del> </html>
<del>```
<del>
<del>El atributo `<a href>` es compatible con todos los navegadores.
<del>
<del>#### Más atributos:
<del>
<del>`hreflang` : especifica el idioma del recurso vinculado. `target` : especifica el contexto en el que se abrirá el recurso vinculado. `title` : define el título de un enlace, que aparece para el usuario como información sobre herramientas.
<del>
<del>### Ejemplos
<del>
<del>```html
<del>
<del><a href="#">This is a dead link</a>
<del> <a href="https://www.freecodecamp.org">This is a live link to freeCodeCamp</a>
<del> <a href="https://html.com/attributes/a-href/">more with a href attribute</a>
<del>```
<del>
<del>### Anclajes en página
<del>
<del>También es posible establecer un ancla a cierto lugar de la página. Para hacer esto, primero debe colocar una pestaña en la ubicación de la página con la etiqueta y el atributo necesario "nombre" con cualquier descripción de palabra clave, como esta:
<del>
<del>```html
<del>
<del><a name="top"></a>
<del>```
<del>
<del>No se requiere ninguna descripción entre etiquetas. Después de eso, puede colocar un enlace que conduce a este ancla en cualquier lugar de la misma página. Para hacer esto, debe usar la etiqueta con el atributo necesario "href" con el símbolo # (marcado) y la descripción de la palabra clave del ancla, como esto:
<del>
<del>```html
<del>
<del><a href="#top">Go to Top</a>
<del>```
<del>
<del>### Enlaces de imagen
<del>
<del>El `<a href="#">` también puede aplicarse a imágenes y otros elementos HTML.
<del>
<del>### Ejemplo
<del>
<del>```html
<del>
<del><a href="#"><img itemprop="image" style="height: 90px;" src="http://www.chatbot.chat/assets/images/header-bg_y.jpg" alt="picture"> </a>
<del>```
<del>
<del>### Ejemplo
<del>
<del>[](#)
<del>
<del>### Algunos ejemplos más de href
<del>
<del>```html
<del>
<del><base href="https://www.freecodecamp.org/a-href/">This gives a base url for all further urls on the page</a>
<del> <link href="style.css">This is a live link to an external stylesheet</a>
<del>
<del>```
<ide><path>mock-guide/spanish/html/attributes/a-target-attribute/index.md
<del>---
<del>title: A Target Attribute
<del>localeTitle: Un atributo de destino
<del>---
<del>## Un atributo de destino
<del>
<del>El `<a target>` atributo especifica dónde abrir el documento vinculado en una `a` etiqueta (ancla).
<del>
<del>#### Ejemplos:
<del>
<del>Un atributo de destino con el valor de "\_blank" abre el documento vinculado en una nueva ventana o pestaña.
<del>
<del>```html
<del>
<del> <a href="https://www.freecodecamp.org" target="_blank">freeCodeCamp</a>
<del>```
<del>
<del>Un atributo de destino con el valor de "\_self" abre el documento vinculado en el mismo marco en el que se hizo clic (este es el valor predeterminado y, por lo general, no es necesario especificarlo).
<del>
<del>```html
<del>
<del> <a href="https://www.freecodecamp.org" target="_self">freeCodeCamp</a>
<del>```
<del>
<del>```html
<del>
<del> <a href="https://www.freecodecamp.org">freeCodeCamp</a>
<del>```
<del>
<del>Un atributo de destino con el valor de "\_parent" abre el documento vinculado en el marco principal.
<del>
<del>```html
<del>
<del> <a href="https://www.freecodecamp.org" target="_parent">freeCodeCamp</a>
<del>```
<del>
<del>Un atributo de destino con el valor de "\_top" abre el documento vinculado en el cuerpo completo de la ventana.
<del>
<del>```html
<del>
<del> <a href="https://www.freecodecamp.org" target="_top">freeCodeCamp</a>
<del>```
<del>
<del>Un atributo de destino con el valor de _"nombre de marco"_ Abre el documento vinculado en un marco con nombre específico.
<del>
<del>```html
<del>
<del> <a href="https://www.freecodecamp.org" target="framename">freeCodeCamp</a>
<del>```
<del>
<del>#### Más información:
<del>
<del>Atributo de destino: [w3schools](https://www.w3schools.com/tags/att_a_target.asp)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/attributes/autofocus-attribute/index.md
<del>---
<del>title: Autofocus Attribute
<del>localeTitle: Atributo de Autofocus
<del>---
<del>## Atributo de Autofocus | HTML5
<del>
<del>El atributo **autofocus** es un atributo booleano.
<del>
<del>Cuando está presente, especifica que el elemento debe obtener automáticamente el enfoque de entrada cuando se carga la página.
<del>
<del>Solo un elemento de formulario en un documento puede tener el atributo **autofocus** . No se puede aplicar a `<input type="hidden">` .
<del>
<del>### Se aplica a
<del>
<del>| Elemento | Atributo | | : - | : - | | `<button>` | enfoque automático | | `<input>` | enfoque automático | | `<select>` | enfoque automático | | `<textarea>` | enfoque automático |
<del>
<del>### Ejemplo
<del>
<del>```html
<del>
<del><form>
<del> <input type="text" name="fname" autofocus>
<del> <input type="text" name="lname">
<del> </form>
<del>```
<del>
<del>### Compatibilidad
<del>
<del>Este es un atributo HTML5.
<del>
<del>#### Más información:
<del>
<del>[Atributo de autofocus HTML](https://www.w3schools.com/tags/att_autofocus.asp) en w3schools.com
<del>
<del>[<input> atributo de enfoque automático](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input) en documentos web de MDN
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/attributes/body-background-attribute/index.md
<del>---
<del>title: Body Background Attribute
<del>localeTitle: Atributo de fondo del cuerpo
<del>---
<del>## Atributo de fondo del cuerpo
<del>
<del>Si desea agregar una imagen de fondo en lugar de un color, una solución es el atributo `<body background>` . Especifica una imagen de fondo para un documento HTML.
<del>
<del>Sintaxis:
<del>
<del>`<body background="URL">`
<del>
<del>Atributo:
<del>
<del>`background - URL for background image`
<del>
<del>Ejemplo:
<del>
<del>```html
<del>
<del><html>
<del> <body background="https://assets.digitalocean.com/blog/static/hacktoberfest-is-back/hero.png">
<del> </body>
<del> </html>
<del>```
<del>
<del>## El atributo de fondo del cuerpo se deprecia
<del>
<del>El atributo de fondo del cuerpo ha quedado en desuso en HTML5. La forma correcta de estilo de la etiqueta `<body>` es con CSS.
<del>
<del>Hay varias propiedades CSS utilizadas para configurar el fondo de un elemento. Estos pueden ser utilizados en para establecer el fondo de una página entera.
<del>
<del>## Echale un vistazo:
<del>
<del>* [CSS de fondo de propiedad](https://github.com/freeCodeCamp/guides/blob/master/src/pages/css/background/index.md)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/attributes/body-bgcolor-attribute/index.md
<del>---
<del>title: Body Bgcolor Attribute
<del>localeTitle: Cuerpo Bgcolor Atributo
<del>---
<del>## Cuerpo Bgcolor Atributo
<del>
<del>El atributo `<body bgcolor>` asigna un color de fondo para un documento HTML.
<del>
<del>**Sintaxis** :
<del>
<del>`<body bgcolor="color">` El valor de color puede ser un nombre de color (como, `purple` ) o un valor hexadecimal (como, `#af0000` ).
<del>
<del>Para agregar un color de fondo a una página web puede usar el atributo `<body bgcolor="######">` . Especifica un color para que se muestre el documento HTML.
<del>
<del>**Por ejemplo:**
<del>
<del>```html
<del>
<del><html>
<del> <head>
<del> <title>Body bgcolor Attribute example</title>
<del> </head>
<del> <body bgcolor="#afafaf">
<del> <h1>This webpage has colored background.</h1>
<del> </body>
<del> </html>
<del>```
<del>
<del>Puede cambiar el color reemplazando ###### con un valor hexadecimal. Para colores simples también puede usar la palabra, como "rojo" o "negro".
<del>
<del>Todos los principales navegadores admiten el atributo `<body bgcolor>` .
<del>
<del>_Nota:_
<del>
<del>* HTML 5 no admite el atributo `<body bgcolor>` . Usa CSS para este propósito. ¿Cómo? Usando el siguiente código: `<body style="background-color: color">` Por supuesto, también puede hacerlo en un documento separado en lugar de en un método en línea.
<del>
<del>* No use el valor RGB en el atributo `<body bgcolor>` porque `rgb()` es solo para CSS, es decir, no funcionará en HTML.
<del>
<del>
<del>**Véalo en acción:** https://repl.it/Mwht/2
<del>
<del>**Otros recursos:**
<del>
<del>* Nombres de colores HTML: https://www.w3schools.com/colors/colors\_names.asp
<del>* Propiedad CSS de color de fondo: https://www.w3schools.com/cssref/pr\_background-color.asp
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/attributes/div-align-attribute/index.md
<del>---
<del>title: Div Align Attribute
<del>localeTitle: Atributo de alineación de div
<del>---
<del>## Div align atributos
<del>
<del>La `<div align="">` atributo se utiliza para alinear el texto en una etiqueta div a la izquierda, derecha, centro o justificar.
<del>
<del>Por ejemplo:
<del>
<del>```html
<del>
<del><html>
<del> <head>
<del> <title> Div Align Attribbute </title>
<del> </head>
<del> <body>
<del> <div align="left">
<del> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
<del> </div>
<del> <div align="right">
<del> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
<del> </div>
<del> <div align="center">
<del> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
<del> </div>
<del> <div align="justify">
<del> Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
<del> </div>
<del> </body>
<del> </html>
<del>```
<del>
<del>## Importante!
<del>
<del>Este atributo ya no se admite en HTML5. CSS es el camino a seguir.
<del>
<del>El atributo DIV align se puede utilizar para alinear horizontalmente los contenidos dentro de un div. En el siguiente ejemplo, el texto se centra en el div.
<del>
<del>```html
<del>
<del><div align="center">
<del> This Text Will Be Centered
<del> </div>
<del>```
<del>
<del>\*\* Este atributo no es compatible con HTML5 y [texto CSS Align](https://github.com/freeCodeCamp/guides/blob/f50b7370be514b2a03ee707cd0f0febe2bb713ae/src/pages/css/text-align/index.md) debe utilizarse en lugar
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/attributes/font-color-attribute/index.md
<del>---
<del>title: Font Color Attribute
<del>localeTitle: Atributo de color de fuente
<del>---
<del>## Atributo de color de fuente
<del>
<del>Este atributo se utiliza para establecer un color en el texto incluido en una etiqueta de `<font>` .
<del>
<del>### Sintaxis:
<del>
<del>\`\` html \`\` \`
<del>
<del>### Importante:
<del>
<del>Este atributo no es compatible con HTML5. En su lugar, este [artículo de freeCodeCamp](https://guide.freecodecamp.org/css/colors) especifica un método CSS, que puede usarse.
<del>
<del>### Nota:
<del>
<del>También se puede especificar un color utilizando un 'código hexadecimal' o un 'código rgb', en lugar de usar un nombre.
<del>
<del>### Ejemplo:
<del>
<del>1. Atributo de nombre de color
<del>
<del>```html
<del>
<del><html>
<del> <body>
<del> <font color="green">Font color example using color attribute</font>
<del> </body>
<del> </html>
<del>```
<del>
<del>2. Atributo de código hexadecimal
<del>
<del>```html
<del>
<del><html>
<del> <body>
<del> <font color="#00FF00">Font color example using color attribute</font>
<del> </body>
<del> </html>
<del>```
<del>
<del>3. Atributo RGB
<del>
<del>```html
<del>
<del><html>
<del> <body>
<del> <font color="rgb(0,255,0)">Font color example using color attribute</font>
<del> </body>
<del> </html>
<del>
<del>```
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/attributes/font-size-attribute/index.md
<del>---
<del>title: Font Size Attribute
<del>localeTitle: Atributo de tamaño de fuente
<del>---
<del>## Atributo de tamaño de fuente
<del>
<del>Este atributo especifica el tamaño de fuente como un valor numérico o relativo. Los valores numéricos varían de `1` a `7` siendo `1` el más pequeño y `3` el predeterminado. También se puede definir utilizando un valor relativo, como `+2` o `-3` , que lo establece en relación con el valor del atributo de tamaño del elemento `<basefont>` , o en relación con `3` , el valor predeterminado, si no existe ninguno.
<del>
<del>Sintaxis:
<del>
<del>`<font size="number">`
<del>
<del>Ejemplo:
<del>
<del>```html
<del>
<del><html>
<del> <body>
<del> <font size="6">This is some text!</font>
<del> </body>
<del> </html>
<del>```
<del>
<del>Nota: `The size attribute of <font> is not supported in HTML5. Use CSS instead.`
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/attributes/href-attribute/index.md
<del>---
<del>title: Href Attribute
<del>localeTitle: Atributo Href
<del>---
<del>## Atributo Href
<del>
<del>Href es la abreviatura de "Referencia de hipertexto" y es un atributo HTML. El atributo href se usa principalmente para que las etiquetas `<a>` especifiquen la URL de una página web a la que conduce el enlace (ya sea en una sección diferente de la misma página o en una página web completamente diferente).
<del>
<del>#### Cómo utilizar
<del>
<del>`<a href="URL"></a>`
<del>
<del>#### Ejemplos
<del>
<del>```html
<del>
<del><a href="https://www.freecodecamp.org">This is an absolute URL</a>
<del>
<del> <a href="index.html">This is a relative URL</a>
<del>```
<del>
<del>#### Más información:
<del>
<del>[Escuelas w3](https://www.w3schools.com/tags/att_href.asp)
<del>
<del>[HTMLElementReference](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/attributes/href/index.md
<del>---
<del>title: Href
<del>localeTitle: Href
<del>---
<del>## Href
<del>
<del>La referencia de hipertexto (HREF) es un atributo HTML que se usa para especificar un destino de enlace o un Localizador uniforme de recursos (URL). Más comúnmente verá el atributo HREF emparejado con una etiqueta de anclaje `<a>` .
<del>
<del>El atributo HREF obtiene el significado exacto de un enlace según el elemento que lo esté utilizando. Por ejemplo, cuando se utiliza con la etiqueta `<a>` , hace referencia a la ubicación de un objeto expreso como una URL. Cuando se usa el atributo HREF con la etiqueta `<image>` , el atributo HREF hace referencia a la URL de la imagen a representar.
<del>
<del>### Ejemplos:
<del>
<del>Enlace a la página principal de Google:
<del>
<del>\-> El texto "Visitar la página de inicio de Google actúa como el enlace a la página de inicio
<del>
<del>```html
<del>
<del><a href="https://www.google.com">Visit Google's Homepage</a>
<del>```
<del>
<del>La imagen como enlace:
<del>
<del>\-> Logotipo de Google que hace referencia a la página principal de Google
<del>
<del>```html
<del>
<del><a href="https://www.google.com">
<del> <img border="0" alt="Google" src="https://www.google.com/logos/doodles/2015/googles-new-logo-5078286822539264.3-hp2x.gif" width="100" height="100">
<del>```
<del>
<del>Etiquetas que utilizan HREF:
<del>
<del>```html
<del>
<del><a>
<del> <area>
<del> <base>
<del> <cursor>
<del> <discard>
<del> <feImage>
<del> <hatch>
<del> <image>
<del> <link>
<del> <mesh>
<del> <meshgradient>
<del> <mpath>
<del> <pattern>
<del> <script>
<del> <textPath>
<del> <use>
<del>```
<del>
<del>#### Más información:
<del>
<del>[WTF es un href de todos modos](https://tomayko.com/blog/2008/wtf-is-an-href-anyway) [MDN](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/href)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/attributes/img-align-attribute/index.md
<del>---
<del>title: Img Align Attribute
<del>localeTitle: Img Align Attribute
<del>---
<del>## Img Align Attribute
<del>
<del>El atributo de alineación de una imagen especifica dónde se debe alinear la imagen de acuerdo con el elemento circundante.
<del>
<del>Valores de atributo:
<del>derecha - alinear imagen a la derecha izquierda - alinear imagen a la izquierda
<del>superior: alinear la imagen con la parte superior
<del>inferior: alinear la imagen con la parte inferior
<del>medio - alinea la imagen con el medio
<del>
<del>Por ejemplo:
<del>
<del>```html
<del>
<del><!DOCTYPE html>
<del> <html lang="en">
<del> <head>
<del> <title>Img Align Attribute</title>
<del> </head>
<del> <body>
<del> <p>This is an example. <img src="image.png" alt="Image" align="middle"> More text right here
<del> <img src="image.png" alt="Image" width="100"/>
<del> </body>
<del> </html>
<del>```
<del>
<del>También podemos alinearnos a la derecha si queremos:
<del>
<del>```html
<del>
<del><p>This is another example<img src="image.png" alt="Image" align="right"></p>
<del>```
<del>
<del>**Tenga en cuenta que el atributo de alineación no es compatible con HTML5, y debería usar CSS en su lugar. Sin embargo, todavía es compatible con todos los principales navegadores.**
<del>
<del>#### Más información:
<del>
<del>[Artículo de MDN sobre la etiqueta img y sus atributos.](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/attributes/img-src-attribute/index.md
<del>---
<del>title: Img Src Attribute
<del>localeTitle: Atributo Img Src
<del>---
<del>## Atributo Img Src
<del>
<del>El atributo `<img src>` refiere a la fuente de la imagen que desea mostrar. La etiqueta `img` no mostrará una imagen sin el atributo `src` . Sin embargo, si configura la fuente en la ubicación de la imagen, puede mostrar cualquier imagen.
<del>
<del>Hay una imagen del logotipo de freeCodeCamp ubicado en `https://avatars0.githubusercontent.com/u/9892522?v=4&s=400`
<del>
<del>Puedes establecer eso como la imagen usando el atributo `src` .
<del>
<del>```html
<del>
<del><html>
<del> <head>
<del> <title>Img Src Attribute Example</title>
<del> </head>
<del> <body>
<del> <img src="https://avatars0.githubusercontent.com/u/9892522?v=4&s=400">
<del> </body>
<del> </html>
<del>```
<del>
<del>El código de arriba se muestra así:
<del>
<del>
<del>
<del>El atributo `src` es compatible con todos los navegadores.
<del>
<del>También puede tener un archivo alojado localmente como su imagen.
<del>
<del>Por ejemplo, `<img src="images/freeCodeCamp.jpeg>` funcionaría si tuviera una carpeta llamada `images` que tuviera `freeCodeCamp.jpeg` dentro, siempre y cuando la carpeta 'images' estuviera en la misma ubicación que el archivo `index.html` .
<del>
<del>`../files/index.html`
<del>
<del>`..files/images/freeCodeCamp.jpeg`
<del>
<del>### Más información:
<del>
<del>* [HTML.com](https://html.com/attributes/img-src/)
<del>* [Escuelas w3](https://www.w3schools.com/tags/att_img_src.asp)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/attributes/img-width-attribute/index.md
<del>---
<del>title: Img Width Attribute
<del>localeTitle: Atributo de ancho de img
<del>---
<del>## Atributo de ancho de img
<del>
<del>El atributo HTML 'ancho' se refiere al ancho de una imagen. El valor en las citas es la cantidad de píxeles.
<del>
<del>Por ejemplo, si ya tiene un enlace a una configuración de imagen a través del atributo `src` , puede agregar el atributo de ancho así:
<del>
<del>```html
<del>
<del><!DOCTYPE html>
<del> <html lang="en">
<del> <head>
<del> <title>Img Width Attribute</title>
<del> </head>
<del> <body>
<del> <img src="image.png" alt="Image" width="100"/>
<del> </body>
<del> </html>
<del>```
<del>
<del>En el fragmento de código de arriba hay una etiqueta de imagen y la imagen se establece en un ancho de 100 píxeles. `width="100"`
<del>
<del>#### Más información:
<del>
<del>[Artículo de MDN en la etiqueta img](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/attributes/index.md
<del>---
<del>title: Attributes
<del>localeTitle: Atributos
<del>---
<del># Atributos HTML
<del>
<del>Los elementos HTML pueden tener atributos, que contienen información adicional sobre el elemento.
<del>
<del>Los atributos HTML generalmente vienen en pares nombre-valor, y siempre van en la etiqueta de apertura de un elemento. El nombre del atributo indica qué tipo de información está proporcionando sobre el elemento, y el valor del atributo es la información real.
<del>
<del>Por ejemplo, un elemento de anclaje ( `<a>` ) en un documento HTML crea enlaces a otras páginas u otras partes de la página. Utiliza el atributo `href` en la etiqueta de apertura `<a>` para indicar al navegador a dónde envía el enlace un usuario.
<del>
<del>Aquí hay un ejemplo de un enlace que envía a los usuarios a la página de inicio de freeCodeCamp:
<del>
<del>```html
<del>
<del><a href="www.freecodecamp.org">Click here to go to freeCodeCamp!</a>
<del>```
<del>
<del>Observe que el nombre del atributo ( `href` ) y el valor ("www.freeCodeCamp.org") están separados con un signo igual, y las comillas rodean el valor.
<del>
<del>Hay muchos atributos HTML diferentes, pero la mayoría de ellos solo funcionan en ciertos elementos HTML. Por ejemplo, el atributo `href` no funcionará si se coloca en una etiqueta de apertura `<h1>` .
<del>
<del>En el ejemplo anterior, el valor proporcionado al atributo `href` podría ser cualquier enlace válido. Sin embargo, algunos atributos solo tienen un conjunto de opciones válidas que puede usar, o los valores deben estar en un formato específico. El atributo `lang` le dice al navegador el idioma predeterminado de los contenidos en un elemento HTML. Los valores para el `lang` atributo deben utilizar códigos de idioma o país estándar, como `en` de Inglés, o `it` para el italiano.
<del>
<del>## Atributos booleanos
<del>
<del>Algunos atributos HTML no necesitan un valor porque solo tienen una opción. Estos se llaman atributos booleanos. La presencia del atributo en una etiqueta lo aplicará a ese elemento HTML. Sin embargo, está bien escribir el nombre del atributo y establecerlo igual a la opción del valor. En este caso, el valor suele ser el mismo que el nombre del atributo.
<del>
<del>Por ejemplo, el elemento `<input>` en un formulario puede tener un atributo `required` . Esto requiere que los usuarios completen ese elemento antes de que puedan enviar el formulario.
<del>
<del>Aquí hay ejemplos que hacen lo mismo:
<del>
<del>```html
<del>
<del><input type="text" required >
<del> <input type="text" required="required" >
<del>```
<del>
<del>## Otros recursos
<del>
<del>[Enlaces HTML](#) [Atributo Href](#) [Atributo Lang](#) [Elemento de entrada HTML](#) [Atributo Requerido](#)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/attributes/input-checked-attribute/index.md
<del>---
<del>title: Input Checked Attribute
<del>localeTitle: Atributo comprobado de entrada
<del>---
<del>## Atributo comprobado de entrada
<del>
<del>El atributo verificado es un atributo booleano.
<del>
<del>Cuando está presente, especifica que un El elemento debe estar preseleccionado (marcado) cuando se carga la página.
<del>
<del>El atributo comprobado se puede utilizar con y .
<del>
<del>El atributo verificado también se puede configurar después de la carga de la página, a través de JavaScript.
<del>
<del>## Echa un vistazo al siguiente ejemplo:
<del>
<del>```html
<del>
<del><form action="/action_page.php">
<del> <input type="checkbox" name="vehicle" value="Bike"> I have a bike<br>
<del> <input type="checkbox" name="vehicle" value="Car" checked> I have a car<br>
<del> <input type="submit" value="Submit">
<del> </form>
<del>```
<del>
<del>En el ejemplo anterior, cuando la página web se carga de forma predeterminada, la primera casilla de verificación se seleccionará automáticamente debido al atributo marcado.
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/attributes/input-type-attribute/index.md
<del>---
<del>title: Input Type Attribute
<del>localeTitle: Atributo de tipo de entrada
<del>---
<del>## Atributo de tipo de entrada
<del>
<del>El atributo de tipo de entrada especifica el tipo de entrada que el usuario debe poner en su formulario.
<del>
<del>### texto
<del>
<del>Una línea de un texto.
<del>
<del>```html
<del>
<del> <form>
<del> <label for="login">Login:</label>
<del> <input type="text" name="login">
<del> </form>
<del>```
<del>
<del>### contraseña
<del>
<del>Una línea de un texto. El texto se muestra automáticamente como una serie de puntos o asteriscos (depende del navegador y del sistema operativo).
<del>
<del>```html
<del>
<del> <form>
<del> <label for="password">Password:</label>
<del> <input type="password" name="password">
<del> </form>
<del>```
<del>
<del>### correo electrónico
<del>
<del>El HTML comprueba si la entrada coincide con el formato de la dirección de correo electrónico (algo @ algo).
<del>
<del>```html
<del>
<del> <form>
<del> <label for="email">E-mail address:</label>
<del> <input type="email" name="email">
<del> </form>
<del>```
<del>
<del>### número
<del>
<del>Permitir sólo la entrada numérica. También puede especificar el valor mínimo y máximo permitido. El siguiente ejemplo comprueba que la entrada es un número entre 1 y 120.
<del>
<del>```html
<del>
<del> <form>
<del> <label for="age">Age:</label>
<del> <input type="number" name="age" min="1" max="120">
<del> </form>
<del>```
<del>
<del>### radio
<del>
<del>El usuario solo puede seleccionar una opción. El grupo de botones de opción debe tener el mismo atributo de nombre. Puede seleccionar automáticamente una opción utilizando la propiedad `checked` (en el ejemplo debajo del valor Azul seleccionado).
<del>
<del>```html
<del>
<del> <form>
<del> <label><input type="radio" name="color" value="red">Red</label>
<del> <label><input type="radio" name="color" value="green">Green</label>
<del> <label><input type="radio" name="color" value="blue" checked>Blue</label>
<del> </form>
<del>```
<del>
<del>### caja
<del>
<del>El usuario puede seleccionar cero o más opciones del grupo de casillas de verificación. También puede utilizar la propiedad `checked` aquí para una o más opciones.
<del>
<del>```html
<del>
<del> <form>
<del> <label><input type="checkbox" name="lang" value="english">english</label>
<del> <label><input type="checkbox" name="lang" value="spanish">spanish</label>
<del> <label><input type="checkbox" name="lang" value="french">french</label>
<del> </form>
<del>```
<del>
<del>### botón
<del>
<del>La entrada se muestra como un botón, el texto que se debe mostrar en el botón está en el atributo de valor.
<del>
<del>```html
<del>
<del> <form>
<del> <input type="button" value="click here">
<del> </form>
<del>```
<del>
<del>### enviar
<del>
<del>Muestra el botón de envío. El texto que debe mostrarse en el botón está en atributo de valor. Después de hacer clic en el botón, el HTML realiza la validación y, si se aprueba, se envía el formulario.
<del>
<del>```html
<del>
<del> <form>
<del> <input type="submit" value="SUBMIT">
<del> </form>
<del>```
<del>
<del>### Reiniciar
<del>
<del>Muestra el botón de reinicio. El texto que debe mostrarse en el botón está en atributo de valor. Después de hacer clic en el botón, todos los valores del formulario se eliminan.
<del>
<del>```html
<del>
<del> <form>
<del> <input type="reset" value="CANCEL">
<del> </form>
<del>```
<del>
<del>Hay más tipos de elementos. Para obtener más información, visite MSDN o w3schools .
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/attributes/input/index.md
<del>---
<del>title: Input
<del>localeTitle: Entrada
<del>---
<del>## Entrada
<del>
<del>La etiqueta HTML `<input>` se usa dentro de un formulario para declarar un elemento de entrada. Permite al usuario introducir datos.
<del>
<del>## Ejemplo
<del>
<del>```html
<del>
<del><!DOCTYPE html>
<del> <html>
<del>
<del> <head>
<del> <title>HTML input Tag</title>
<del> </head>
<del>
<del> <body>
<del> <form action = "/cgi-bin/hello_get.cgi" method = "get">
<del> First name:
<del> <input type = "text" name = "first_name" value = "" maxlength = "100" />
<del> <br />
<del>
<del> Last name:
<del> <input type = "text" name = "last_name" value = "" maxlength = "100" />
<del> <input type = "submit" value = "Submit" />
<del> </form>
<del> </body>
<del>
<del> </html>
<del>```
<del>
<del>En el ejemplo anterior, hay dos campos de entrada que le piden al usuario que ingrese su nombre y apellido de acuerdo con las etiquetas especificadas. Enviar `<button type="submit">` es otro tipo de entrada que se utiliza para incluir los datos ingresados por el usuario en el formulario y enviarlos a otra ubicación especificada en el código.
<del>
<del>#### Más información:
<del>
<del>[Youtube](https://www.youtube.com/watch?v=qJ9ZkxmVf5s)
<del>
<del>## Entrada
<del>
<del>La etiqueta HTML `<input>` es de muchos tipos para ingresar datos. Algunos de ellos son: Tipo: Texto (este es el tipo más común que se utiliza para crear cuadros de texto generales) Tipo: Contraseña (este tipo se utiliza para la creación de contraseñas de contraseña) Tipo: Oculto (este es un tipo especial de entrada que no se muestra al usuario pero se usa para pasar información de una página a otra mientras se usa la etiqueta)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/attributes/lang/index.md
<del>---
<del>title: Lang
<del>localeTitle: Lang
<del>---
<del>## Lang
<del>
<del>En HTML, la etiqueta Lang se usa para declarar el idioma de la totalidad o parte de una página web.
<del>
<del>### Ejemplos
<del>
<del>```html
<del>
<del><html lang="en">
<del> </html>
<del>```
<del>
<del>El atributo lang también se puede usar para especificar el idioma de un elemento específico:
<del>
<del>```html
<del>
<del><p lang="hi">
<del> फ्री कोड कैंप
<del> </p>
<del>```
<del>
<del>En el ejemplo anterior, "hola" denota el idioma hindi. Del mismo modo, puede utilizar "en" para inglés, "es" para español, "fr" para francés, etc.
<del>
<del>Consulte [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes) para obtener el código de idioma de dos dígitos apropiado.
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/attributes/links/index.md
<del>---
<del>title: Links
<del>localeTitle: Campo de golf
<del>---
<del>## Campo de golf
<del>
<del>Esto es un talón. [Ayuda a nuestra comunidad a expandirla](https://github.com/freecodecamp/guides/tree/master/src/pages/html/attributes/links/index.md) .
<del>
<del>[Esta guía rápida de estilo ayudará a asegurar que su solicitud de extracción sea aceptada](https://github.com/freecodecamp/guides/blob/master/README.md) .
<del>
<del>Los enlaces se utilizan en cualquier lugar de la web, con el fin de dirigir a los usuarios a diversos elementos de contenido. Por lo general, se indican mediante el cursor que se convierte en un icono de mano. Los enlaces pueden ser texto, imágenes u otros elementos contenidos en su HTML o página web.
<del>
<del>Utiliza una etiqueta de `code <a>` o un elemento de ancla para definir su enlace, que también necesita una dirección de destino a la que accederá con el atributo `code href` . Aquí hay un fragmento de código que hace que la frase 'the freeCodeCamp Guide' sea un enlace:
<del>
<del>```html
<del>
<del><a href="https://guide.freecodecamp.org">the freeCodeCamp Guide</a>
<del>```
<del>
<del>Si desea que su enlace se abra en una nueva pestaña, usará el atributo de `code target` junto con el valor del `code "_blank"` dentro de su etiqueta de `code <a>` apertura `code <a>` . Eso se parece a esto:
<del>
<del>```html
<del>
<del><a href="https://guide.freecodecamp.org" target="_blank">the freeCodeCamp Guide</a>
<del>```
<del>
<del>Cuando necesite guiar a los usuarios a una parte específica de su página web, asumamos la parte inferior, primero debe asignar el símbolo `code #` hash al atributo `code href` del `code href` , como este
<del>
<del>```html
<del>
<del><a href="#footer>More about us<a/>
<del>```
<del>
<del>luego deberá usar un atributo de `code id` en el elemento al que desea dirigir a su usuario, en este caso, el `code <footer>` en la parte inferior de la página web.
<del>
<del>```html
<del>
<del><footer id="footer">Powered by freeCodeCamp</footer>
<del>```
<del>
<del>#### Más información:
<del>
<del>[w3sschools - Enlaces HTML](https://www.w3schools.com/html/html_links.asp)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/attributes/onclick-event-attribute/index.md
<del>---
<del>title: Onclick Event Attribute
<del>localeTitle: Onclick atributo de evento
<del>---
<del>## Onclick atributo de evento
<del>
<del>Cuando se hace clic en el elemento se dispara un evento.
<del>
<del>Funciona igual que el _método onclick_ o `addEventListener('click')` al elemento.
<del>
<del>```html
<del>
<del><element onclick="event"></element>
<del>```
<del>
<del>> `event` puede ser una función de JavaScript o puede escribir JavaScript en bruto
<del>
<del>### Ejemplos
<del>
<del>Cambiar el color de un elemento `<p>` al hacer clic
<del>
<del>```html
<del>
<del><p id="text" onclick="redify()">Change my color</p>
<del>
<del> <script>
<del> function redify(){
<del> let text = document.querySelector('#text');
<del> text.style.color = "red";
<del> }
<del> </script>
<del>```
<del>
<del>Usando el atributo onclick en bruto de JavaScript:
<del>
<del>```html
<del>
<del><button onclick="alert('Hello')">Hello World</button>
<del>```
<del>
<del>#### Más información:
<del>
<del>* [MDN](https://developer.mozilla.org/pt-BR/docs/Web/API/GlobalEventHandlers/onclick)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/attributes/p-align-attribute/index.md
<del>---
<del>title: P Align Attribute
<del>localeTitle: P Alinear atributo
<del>---
<del>## P Alinear atributo
<del>
<del>### Importante
<del>
<del>Este atributo no es compatible con HTML5. Se recomienda utilizar la [propiedad CSS de `text-align`](https://guide.freecodecamp.org/css/text-align) .
<del>
<del>Para alinear el texto dentro de una etiqueta `<p>` , este atributo ayudará.
<del>
<del>### Sintaxis
<del>
<del>```html
<del>
<del><p align="position">Lorem Ipsum...</p>
<del>```
<del>
<del>### Atributos
<del>
<del>* **izquierda** - el texto se alinea a la izquierda
<del>* **derecha** - el texto se alinea a la derecha
<del>* **centro** - el texto se alinea con el centro
<del>* **justificar** - Todas las líneas de texto tienen el mismo ancho
<del>
<del>### Ejemplo
<del>
<del>```html
<del>
<del><html>
<del> <body>
<del> <p align="center">Paragraph align attribute example</p>
<del> </body>
<del> </html>
<del>```
<del>
<del>#### Más información:
<del>
<del>* [CSS `text-align`](https://guide.freecodecamp.org/css/text-align)
<del>* [W3 - Especificación HTML 4.01](https://www.w3.org/TR/html401/struct/text.html#h-9.3.1)
<del>* [MDN - Alinear Texto CSS](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/attributes/placeholder-attribute/index.md
<del>---
<del>title: Placeholder Attribute
<del>localeTitle: Atributo de marcador de posición
<del>---
<del>## Atributo de marcador de posición | HTML5
<del>
<del>Especifica una sugerencia corta que describe el valor esperado de un control de formulario `<input>` o `<textarea>` .
<del>
<del>El atributo de marcador de posición no debe contener retornos de carro o avances de línea.
<del>
<del>NOTA: No utilice el atributo de marcador de posición en lugar de un elemento <label>, sus propósitos son diferentes. El atributo <label> describe la función del elemento de formulario (es decir, indica qué tipo de información se espera), y el atributo de marcador de posición es una sugerencia sobre el formato que debe tomar el contenido.
<del>
<del>### Ejemplo
<del>
<del>Ejemplo de entrada
<del>
<del>```html
<del>
<del><form>
<del> <input type="text" name="fname" placeholder="First Name">
<del> <input type="text" name="lname" placeholder="Last Name">
<del> </form>
<del>```
<del>
<del>Ejemplo de Textarea
<del>
<del>```html
<del>
<del><textarea placeholder="Describe yourself here..."></textarea>
<del>```
<del>
<del>### Compatibilidad
<del>
<del>Este es un atributo HTML5.
<del>
<del>#### Más información:
<del>
<del>[Atributo de marcador de posición HTML](https://www.w3schools.com/tags/att_placeholder.asp) en w3schools.com
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/attributes/required/index.md
<del>---
<del>title: Required
<del>localeTitle: Necesario
<del>---
<del>## Necesario
<del>
<del>El atributo HTML requerido se usa en un elemento de entrada para hacer que el campo de entrada sea un formulario requerido para enviar el formulario. Si el usuario no completa el campo de entrada, el formulario no se enviará y mostrará un mensaje pidiéndole al usuario que complete el campo. El atributo `< Required>` es aplicable a `<input>` , `<select>` , `<textarea>` .
<del>
<del>Por ejemplo:
<del>
<del>```html
<del>
<del><!DOCTYPE html>
<del> <html>
<del> <head>
<del> <title>HTML Required Attribute</title>
<del> </head>
<del> <body>
<del> <form action="/">
<del> Text Field: <input type="text" name="textfield" required>
<del> <input type="submit" value="Submit">
<del> </form>
<del> </body>
<del> </html>
<del>```
<del>
<del>Seleccione Ejemplo:
<del>
<del>```html
<del>
<del><form action="/action.php">
<del> <select required>
<del> <option value="">None</option>
<del> <option value="volvo">Volvo</option>
<del> <option value="saab">Saab</option>
<del> <option value="mercedes">Mercedes</option>
<del> <option value="audi">Audi</option>
<del> </select>
<del> </form>
<del>```
<del>
<del>Ejemplo de área de texto:
<del>
<del>```html
<del>
<del><form action="/action.php">
<del> <textarea name="comment" required></textarea>
<del> <input type="submit">
<del> </form>
<del>```
<del>
<del>Simplemente agregue `required` a un elemento de entrada
<del>
<del>#### Más información:
<del>
<del>[Artículo de MDN sobre el elemento de entrada.](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/attributes/role-attribute/index.md
<del>---
<del>title: Role Attribute
<del>localeTitle: Atributo de rol
<del>---
<del>## Atributo de rol
<del>
<del>El atributo de `role` , describe la función de un elemento para los programas que pueden utilizarlo, como los lectores de pantalla o las lupas.
<del>
<del>Ejemplo de uso:
<del>
<del>```html
<del>
<del><a href="#" role="button">Button Link</a>
<del>```
<del>
<del>Los lectores de pantalla leerán este elemento como "botón" en lugar de "enlace".
<del>
<del>Hay cuatro categorías de roles:
<del>
<del>* Roles abstractos
<del>* Roles de Widget
<del>* Funciones de la estructura del documento
<del>* Roles de referencia
<del>
<del>Para obtener una lista completa de las funciones existentes, consulte la [documentación de las funciones de aria](https://www.w3.org/TR/wai-aria/roles) .
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/attributes/script-src-attribute/index.md
<del>---
<del>title: Script Src Attribute
<del>localeTitle: Atributo Src Script
<del>---
<del>## Atributo Src Script
<del>
<del>El atributo 'src' en un etiqueta es la ruta a un archivo o recurso externo que desea vincular a su documento HTML.
<del>
<del>Por ejemplo, si tuviera su propio archivo JavaScript personalizado llamado 'script.js' y quisiera agregar su funcionalidad a su página HTML, lo agregaría así:
<del>
<del>```html
<del>
<del><!DOCTYPE html>
<del> <html lang="en">
<del> <head>
<del> <title>Script Src Attribute Example</title>
<del> </head>
<del> <body>
<del>
<del> <script src="./script.js"></script>
<del> </body>
<del> </html>
<del>```
<del>
<del>Esto apuntaría a un archivo llamado 'script.js' que está en el mismo directorio que el archivo .html. También puede enlazar a otros directorios utilizando '..' en la ruta del archivo.
<del>
<del>```html
<del>
<del><script src="../public/js/script.js"></script>
<del>```
<del>
<del>Esto salta a un nivel de directorio y luego a un directorio 'público', luego a un directorio 'js' y luego al archivo 'script.js'.
<del>
<del>También puede usar el atributo 'src' para vincular a archivos .js externos alojados por un tercero. Se utiliza si no desea descargar una copia local del archivo. Solo tenga en cuenta que si el enlace cambia o si el acceso a la red está inactivo, entonces el archivo externo al que se está vinculando no funcionará.
<del>
<del>Este ejemplo se enlaza a un archivo jQuery.
<del>
<del>```html
<del>
<del><script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script>
<del>```
<del>
<del>#### Más información:
<del>
<del>[Artículo de MDN sobre el HTML](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#attr-src) tag</a></p></x-turndown>
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/attributes/table-border-attribute/index.md
<del>---
<del>title: Table Border Attribute
<del>localeTitle: Atributo de borde de tabla
<del>---
<del>## Atributo de borde de tabla
<del>
<del>El atributo de borde de etiqueta `<table>` es una forma de ordenar un borde a una tabla HTML. Los valores admitidos son `0` (sin borde) y `1` (borde). El atributo de borde no es compatible con HTML 5, la última versión de HTML. Se recomienda usar CSS para agregar un borde a una tabla en HTML 5.
<del>
<del>#### Más información:
<del>
<del>* [MDN - Referencia de atributos HTML](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes)
<del>* [MDN - CSS Border](https://developer.mozilla.org/en-US/docs/Web/CSS/border)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/block-and-inline-elements/index.md
<del>---
<del>title: Block and Inline Elements
<del>localeTitle: Bloque y elementos en línea
<del>---
<del>## Bloque y elementos en línea
<del>
<del>Vamos a entenderlos usando los siguientes ejemplos:
<del>
<del>#### Ejemplo de código con salida:
<del>
<del>
<del>
<del>#### Elemento de nivel de bloque:
<del>
<del>Un elemento de nivel de bloque ocupa todo el espacio del elemento principal (contenedor) como `<div>` y `<p>` en el ejemplo.
<del>
<del>Tenga en cuenta que tanto `<div>` como `<p>` comienzan desde una nueva línea cada vez, formando una estructura de **bloque** . Los elementos a nivel de bloque comienzan en nuevas líneas.
<del>
<del>Los **elementos** comunes **a nivel de bloque** son `<div>` , `<p>` , `<article>` , `<section>` , `<figure>` , `<footer>` etc.
<del>
<del>#### Elemento en línea:
<del>
<del>En línea como el nombre dice "incluido como parte del texto principal y no como una sección separada". Los elementos en línea ocupan el espacio según sea necesario dentro del espacio definido por el elemento principal. A diferencia de los elementos a nivel de bloque, no comienzan en nuevas líneas.
<del>
<del>Algunos de los **elementos en línea** son `<a>` , `<span>` , `<img>` , `<code>` , `<cite>` , `<button>` , `<input>` etc.
<del>
<del>#### Ejemplo de código con salida:
<del>
<del>
<del>
<del>**_Nota_** : Los elementos de nivel de bloque pueden contener otros elementos de nivel de bloque o elementos en línea. Los elementos en línea **no pueden** contener elementos a nivel de bloque.
<del>
<del>#### Cambios en HTML5
<del>
<del>Si bien la comprensión de los elementos de bloque y en línea sigue siendo relevante, debe tener en cuenta que estos términos se definieron en versiones anteriores de la especificación HTML. En HTML5, un conjunto más complejo de "categorías de contenido" reemplaza los elementos de nivel de bloque y en línea. Los elementos de nivel de bloque se ubican en gran parte en la categoría "contenido de flujo" en HTML5, mientras que los elementos en línea corresponden a la categoría de "contenido de frases". Para obtener más información sobre las nuevas categorías de contenido en HTML5, incluido el contenido de flujo y el contenido de frases, consulte la [página de categorías de contenido en la red de desarrolladores de Mozilla.](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories)
<del>
<del>#### Más información:
<del>
<del>Por favor refiérase a [Mozilla Docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Block-level_elements#Block-level_vs._inline)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/comments-in-html/index.md
<del>---
<del>title: Comments in HTML
<del>localeTitle: Comentarios en HTML
<del>---
<del>## Comentarios en HTML
<del>
<del>La etiqueta de comentario es un elemento que se utiliza para dejar notas, principalmente relacionadas con el proyecto o el sitio web. Esta etiqueta se usa con frecuencia para explicar algo en el código o dejar algunas recomendaciones sobre el proyecto. La etiqueta de comentario también hace que sea más fácil para el desarrollador regresar y comprender el código que ha escrito en una etapa posterior. Los comentarios también se pueden utilizar para comentar líneas de código con fines de depuración.
<del>
<del>Es una buena práctica agregar comentarios a su código, especialmente cuando trabaja con un equipo o en una empresa.
<del>
<del>Los comentarios comienzan con `<!--` y finalizan con `-->` , y pueden abarcar varias líneas. Pueden contener código o texto, y no aparecerán en la parte delantera del sitio web cuando un usuario visite una página. Puede ver los comentarios a través de la Consola del inspector, o viendo el Origen de la página.
<del>
<del>### Ejemplo
<del>
<del>```html
<del>
<del><!-- You can comment out a large number of lines like this.
<del> Author: xyz
<del> Date: xx/xx/xxxx
<del> Purpose: abc
<del> -->
<del> Read more: https://html.com/tags/comment-tag/#ixzz4vtZHu5uR
<del> <!DOCTYPE html>
<del> <html>
<del> <body>
<del> <h1>FreeCodeCamp web</h1>
<del> <!-- Leave some space between the h1 and the p in order to understand what are we talking about-->
<del> <p>FreeCodeCamp is an open-source project that needs your help</p>
<del> <!-- For readability of code use proper indentation -->
<del> </body>
<del> </html>
<del>```
<del>
<del>## Comentarios condicionales
<del>
<del>Los comentarios condicionales definen algunas etiquetas HTML que se deben suprimir cuando se cumple una determinada codificación.
<del>
<del>Los comentarios condicionales solo son reconocidos por la versión 5 de Internet Explorer hasta la versión 9 - IE5 - IE9.
<del>
<del>### Ejemplo
<del>
<del>```html
<del>
<del><!DOCTYPE html>
<del> <html>
<del> <body>
<del> <!--[if IE 9]>
<del> <h1>FreeCodeCamp web</h1>
<del> <p>FreeCodeCamp is an open-source project that needs your help</p>
<del> <![endif]-->
<del> </body>
<del> </html>
<del>```
<del>
<del>### Comentarios Condicionales de IE
<del>
<del>Estos comentarios solo están disponibles en Internet Explorer y pueden usarse hasta IE9. En los tiempos actuales, hay un buen cambio que nunca los verás, pero es bueno saber acerca de su existencia. Los comentarios condicionales son una forma de ofrecer una experiencia diferente para diferentes navegadores de clientes. Por ejemplo:
<del>
<del>```html
<del>
<del><!--[if lt IE 9]> <p>Your browser is lower then IE9</p> <![endif]-->
<del> <!--[if IE 9]> <p>Your browser is IE9</p> <![endif]-->
<del> <!--[if gt IE 9]> <p>Your browser is greater then IE9</p> <![endif]-->
<del>```
<del>
<del>[Sobre los comentarios condicionales.](https://msdn.microsoft.com/en-us/library/ms537512(v=vs.85).aspx)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/css-classes/index.md
<del>---
<del>title: CSS Classes
<del>localeTitle: Clases de CSS
<del>---
<del>## Clases de CSS
<del>
<del>Las clases son una forma eficiente de agrupar elementos HTML para que puedan compartir los mismos estilos. Las clases de CSS (hojas de estilo en cascada) se pueden utilizar para organizar y decorar elementos de páginas web.
<del>
<del>Al escribir HTML, puede agregar clases a un elemento. Simplemente agregue el atributo `class="myclass"` al elemento. Varios elementos pueden tener la misma clase y un elemento puede tener varias clases. Puede asignar varias clases a un elemento agregando todos los nombres de clase deseados separados por un espacio al atributo de `class` en HTML.
<del>
<del>```html
<del>
<del><h1 class="super-man other-class third-class">"Here I come to save the day!"</h1>
<del> <p>is a popular catchphrase that <span class="super-man">Super Man</span> often said.</p>
<del>```
<del>
<del>A continuación, puede diseñar estos elementos con CSS. Se hace referencia a las clases con punto (.) Delante de ellas en CSS, pero no debe poner puntos en su HTML.
<del>
<del>```css
<del>.super-man {
<del> color: red;
<del> background-color: blue;
<del> }
<del>```
<del>
<del>Este código da un fondo azul y un color rojo texto a todos los elementos que tienen el `super-man` clase. [Ver este ejemplo en CodePen](https://codepen.io/Tlandis/pen/RLvomV) .
<del>
<del>También puede declarar más de una clase a su elemento, como:
<del>
<del>```html
<del>
<del><div class="ironMan alfred">
<del> We're going to save you.
<del> </div>
<del>```
<del>
<del>Luego en tu archivo css:
<del>
<del>```css
<del>.ironMan{
<del> color:red;
<del> }
<del>
<del> .alfred{
<del> background-color: black;
<del> }
<del>```
<del>
<del>**Nota:** los nombres de las clases son tradicionalmente en minúsculas, con cada palabra en un nombre de clase de varias palabras separadas por guiones (por ejemplo, "super-man").
<del>
<del>También puedes combinar clases en la misma línea:
<del>
<del>```css
<del>.superMan .spiderMan {
<del> color: red;
<del> background-color: blue;
<del> }
<del>```
<del>
<del>Puedes ver el resultado del código anterior [aquí](https://codepen.io/Tlandis/pen/RLvomV) . Aprende cómo combinar clases de css usando selectores [aquí](https://www.w3schools.com/css/css_combinators.asp) .
<del>
<del>#### Más información:
<del>
<del>* [Selector de clases CSS, escuelas w3](https://www.w3schools.com/cssref/sel_class.asp)
<del>* [Clases de HTML, Escuelas w3](https://www.w3schools.com/html/html_classes.asp)
<del>* [trucos css](https://css-tricks.com/how-css-selectors-work/)
<del>* [Cómo codificar en HTML5 y CSS3](http://howtocodeinhtml.com/chapter7.html)
<del>* [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/class)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/doctype-declaration/index.md
<del>---
<del>title: Doctype Declaration
<del>localeTitle: Declaración de Doctype
<del>---
<del>## Declaración de Doctype
<del>
<del>La declaración de tipo de documento HTML, también conocida como `DOCTYPE` , es la primera línea de código requerida en cada documento HTML o XHTML. La declaración `DOCTYPE` es una instrucción para el navegador web sobre la versión de HTML en la que está escrita la página. Esto garantiza que la página web sea analizada de la misma manera por diferentes navegadores web.
<del>
<del>En HTML 4.01, la declaración `DOCTYPE` refiere a una definición de tipo de documento (DTD). Una DTD define la estructura y los elementos legales de un documento XML. Debido a que HTML 4.01 se basó en el lenguaje de marcado generalizado estándar (SGML), era necesario referirse a una DTD en la declaración `DOCTYPE` .
<del>
<del>Además, doctypes para HTML 4.01 requería la declaración de DTD `strict` , de `transitional` o de `frameset` , cada uno con un caso de uso diferente, como se describe a continuación.
<del>
<del>* **DTD estricta** : se usa para páginas web que _excluyen_ atributos y elementos que W3C espera eliminar gradualmente a medida que crece el soporte de CSS
<del>* **DTD de transición** : se utiliza para páginas web que _incluyen_ atributos y elementos que W3C espera eliminar gradualmente a medida que crece el soporte de CSS
<del>* **Frameset DTD** : Se utiliza para páginas web con marcos.
<del>
<del>En contraste, la declaración de HTML5 `DOCTYPE` es mucho más simple: ya no requiere una referencia a las DTD ya que ya no se basa en SGML. Vea los ejemplos a continuación para una comparación entre HTML 4.01 y HTML5 `DOCTYPE` s.
<del>
<del>### Ejemplos
<del>
<del>Sintaxis de Doctype para HTML5 y más allá:
<del>
<del>```html
<del>
<del><!DOCTYPE html>
<del>```
<del>
<del>Sintaxis de Doctype para HTML 4.01 estricto:
<del>
<del>```html
<del>
<del><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<del>```
<del>
<del>Sintaxis de Doctype para transitional HTML 4.01:
<del>
<del>```html
<del>
<del><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<del>```
<del>
<del>Sintaxis de doctype para frameset HTML 4.01:
<del>
<del>```html
<del>
<del><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<del>```
<del>
<del>## Historia
<del>
<del>Durante los años formativos de HTML, los estándares web aún no se habían acordado. Los proveedores de navegadores crearían nuevas características de la forma que quisieran. Había poca preocupación por los navegadores de la competencia. El resultado fue que los desarrolladores web tuvieron que elegir un navegador para desarrollar sus sitios. Esto significaba que los sitios no se rendirían bien en navegadores no compatibles. Esta situación no pudo continuar.
<del>
<del>El W3C (World Wide Web Consortium) escribió un conjunto de estándares web para manejar esta situación. Todos los proveedores de navegadores y desarrolladores web deben cumplir con estos estándares. Esto aseguraría que los sitios web se mostrarían bien en todos los navegadores. Los cambios requeridos por los estándares eran bastante diferentes de algunas prácticas existentes. La adhesión a ellos rompería los sitios web existentes que no cumplen con las normas.
<del>
<del>Para manejar este problema, los proveedores comenzaron a programar los modos de representación en sus navegadores. Los desarrolladores web necesitarían agregar una declaración doctype en la parte superior de un documento HTML. La declaración doctype indicaría al navegador qué modo de representación usar para ese documento. Tres modos de representación separados estaban generalmente disponibles en todos los navegadores. **El modo de estándares completos** representa las páginas de acuerdo con los estándares web de W3C. **El modo Quirks** hace que las páginas no cumplan con los estándares. **El modo casi estándar** está cerca del modo estándar completo, pero cuenta con soporte para una pequeña cantidad de peculiaridades.
<del>
<del>En la era moderna de HTML5, los estándares web se implementan completamente en todos los navegadores principales. Los sitios web se desarrollan generalmente de manera compatible con los estándares. Debido a esto, la declaración de doctype HTML5 solo existe para indicar al navegador que rinda el documento en modo de estándares completos.
<del>
<del>## Uso
<del>
<del>La Declaración de Doctype debe ser la primera línea de código en un documento HTML, además de los comentarios, que pueden ir antes si es necesario. Para documentos HTML5 modernos, la declaración doctype debe ser como sigue:
<del>
<del>`<!DOCTYPE html>`
<del>
<del>#### Más información:
<del>
<del>Aunque ya no se usa en general, hay varios otros tipos de declaración de tipo de documento de versiones anteriores de HTML. También hay versiones específicas para documentos XML. Para leer más sobre estos y ver ejemplos de código para cada uno, eche un vistazo al [artículo de Wikipedia](https://en.wikipedia.org/wiki/Document_type_declaration) .
<del>
<del>[Una nota de la W3](https://www.w3.org/QA/Tips/Doctype)
<del>
<del>[Entrada del glosario de MDN](https://developer.mozilla.org/en-US/docs/Glossary/Doctype)
<del>
<del>[Escuelas w3](https://www.w3schools.com/tags/tag_doctype.asp)
<del>
<del>[Una explicación rápida del "Modo de las bromas" y el "Modo de estándares"](https://developer.mozilla.org/en-US/docs/Quirks_Mode_and_Standards_Mode)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/a-tag/index.md
<del>---
<del>title: A Tag
<del>localeTitle: Un dia
<del>---
<del>## Una etiqueta
<del>
<del>La etiqueta `<a>` o el elemento de _anclaje_ crea un hipervínculo a otra página o archivo. Para enlazar a una página o archivo diferente, la etiqueta `<a>` también debe contener un atributo `href` , que indica el destino del enlace.
<del>
<del>El texto entre las etiquetas de apertura y cierre `<a>` convierte en el enlace.
<del>
<del>De forma predeterminada, una página vinculada se muestra en la ventana del navegador actual a menos que se especifique otro objetivo.
<del>
<del>#### Ejemplo:
<del>
<del>```html
<del>
<del> <a href= "https://guide.freecodecamp.org/">freeCodeCamp</a>
<del>```
<del>
<del>Una imagen también se puede convertir en un enlace encerrando la etiqueta `<img>` en una etiqueta `<a>` .
<del>
<del>#### Ejemplo:
<del>
<del>```html
<del>
<del> <a href= "https://guide.freecodecamp.org/"><img src="logo.svg"></a>
<del>```
<del>
<del>También es posible determinar el objetivo de la etiqueta `<a>` . Esto se hace utilizando el atributo de `target` . El atributo de `target` tiene los siguientes valores disponibles `_blank|_self|_parent|_top|framename` .
<del>
<del>`_blank` : abre el enlace en una nueva pestaña o en una nueva ventana según las preferencias del usuario. `_self` : abre el enlace en el mismo marco (comportamiento predeterminado). `_parent` : abre el enlace en el marco principal, por ejemplo, cuando el usuario hace clic en un enlace en un iframe. `_top` : abre el enlace en el cuerpo completo de la ventana. `framename` : abre el enlace en el cuadro especificado.
<del>
<del>#### Ejemplo:
<del>
<del>```html
<del>
<del> <a href= "https://guide.freecodecamp.org/" target="_blank">freeCodeCamp</a>
<del>```
<del>
<del>[freeCodeCamp](https://guide.freecodecamp.org/) Este enlace se crea de la misma manera que sugiere el bloque de código de ejemplo. Haz clic para ver cómo funciona.
<del>
<del>#### Más información:
<del>
<del>* [El elemento HTML <a>: MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a)
<del>* [Una etiqueta: w3schools](https://www.w3schools.com/tags/tag_a.asp)
<del>* [Una etiqueta: htmlreference.io](http://htmlreference.io/element/a/)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/abbr-tag/index.md
<del>---
<del>title: Abbr Tag
<del>localeTitle: Abbr Tag
<del>---
<del>## Abbr Tag
<del>
<del>La etiqueta `<abbr>` significa "abreviatura". Puede tomar atributo de `title` , para explicar la abreviatura.
<del>
<del>Ejemplo de uso:
<del>
<del>```html
<del>
<del><abbr title="Free Code Camp">FCC</abbr>
<del>```
<del>
<del>#### Más información:
<del>
<del>* [El elemento HTML <abbr>: MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/abbr)
<del>* [Formato de texto avanzado: Abreviaturas](https://developer.mozilla.org/en-US/docs/Learn/HTML/Introduction_to_HTML/Advanced_text_formatting#Abbreviations)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/address-tag/index.md
<del>---
<del>title: Address Tag
<del>localeTitle: Etiqueta de dirección
<del>---
<del>## Etiqueta de dirección
<del>
<del>Los controles de formulario de Bootstrap se expanden en nuestros estilos de formulario reiniciados con clases. Utilice estas clases para optar por sus pantallas personalizadas para una representación más coherente en los navegadores y dispositivos.
<del>
<del>Asegúrese de usar un atributo de tipo apropiado en todas las entradas (por ejemplo, correo electrónico para la dirección de correo electrónico o número para obtener información numérica) para aprovechar los controles de entrada más nuevos, como la verificación de correo electrónico, la selección de números y más.
<del>
<del>Aquí hay un ejemplo rápido para demostrar los estilos de forma de Bootstrap. Sigue leyendo para obtener documentación sobre las clases requeridas, el diseño del formulario y más.
<del>
<del>#### Uso
<del>
<del>```html
<del>
<del><form>
<del> <div class="form-group">
<del> <label for="exampleInputEmail1">Email address</label>
<del> <input type="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp" placeholder="Enter email">
<del> <small id="emailHelp" class="form-text text-muted">We'll never share your email with anyone else.</small>
<del> </div>
<del> <div class="form-group">
<del> <label for="exampleInputPassword1">Password</label>
<del> <input type="password" class="form-control" id="exampleInputPassword1" placeholder="Password">
<del> </div>
<del> <div class="form-check">
<del> <label class="form-check-label">
<del> <input type="checkbox" class="form-check-input">
<del> Check me out
<del> </label>
<del> </div>
<del> <button type="submit" class="btn btn-primary">Submit</button>
<del> </form>
<del>
<del>```
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/area-tag/index.md
<del>---
<del>title: Area Tag
<del>localeTitle: Etiqueta de área
<del>---
<del>## Etiqueta de área
<del>
<del>Esto es un talón. [Ayuda a nuestra comunidad a expandirla](https://github.com/freecodecamp/guides/tree/master/src/pages/html/elements/area-tag/index.md) .
<del>
<del>[Esta guía rápida de estilo ayudará a asegurar que su solicitud de extracción sea aceptada](https://github.com/freecodecamp/guides/blob/master/README.md) .
<del>
<del>#### Más información:
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/article-tag/index.md
<del>---
<del>title: Article Tag
<del>localeTitle: Etiqueta del artículo
<del>---
<del>## Etiqueta del artículo
<del>
<del>La etiqueta `<article>` representa contenido independiente en un documento. El artículo debe ser independiente del resto de la página, destinado a ser distribuible y reutilizable.
<del>
<del>La etiqueta `<article>` se agregó en HTML5 y es compatible con los principales navegadores.
<del>
<del>### Ejemplo
<del>
<del>Aquí hay un ejemplo de cómo usar la etiqueta del artículo en la página web:
<del>
<del>```html
<del>
<del><article>
<del> <h1>FreeCodeCamp</h1>
<del> <p>
<del> Learn to code with a community of programmers and contribute to open source projects.
<del> </p>
<del> </article>
<del>```
<del>
<del>#### Más información:
<del>
<del>[MDN](https://developer.mozilla.org/tr/docs/Web/HTML/Element/article)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/aside-tag/index.md
<del>---
<del>title: Aside Tag
<del>localeTitle: Etiqueta aparte
<del>---
<del>## Etiqueta aparte
<del>
<del>Esto es un talón. [Ayuda a nuestra comunidad a expandirla](https://github.com/freecodecamp/guides/tree/master/src/pages/html/elements/aside-tag/index.md) .
<del>
<del>[Esta guía rápida de estilo ayudará a asegurar que su solicitud de extracción sea aceptada](https://github.com/freecodecamp/guides/blob/master/README.md) .
<del>
<del>#### Más información:
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/audio-tag/index.md
<del>---
<del>title: Audio Tag
<del>localeTitle: Etiqueta de audio
<del>---
<del>## Etiqueta de audio
<del>
<del>La etiqueta < **_audio_** > define un elemento de audio, que se puede usar para agregar recursos de medios de audio a un documento HTML que se reproducirá mediante el soporte nativo para la reproducción de audio integrada en el navegador en lugar de un complemento del navegador.
<del>
<del>La etiqueta de audio actualmente admite tres formatos de archivo OGG, MP3 y WAV que se pueden agregar a su html de la siguiente manera.
<del>
<del>##### Añadiendo un OGG
<del>```
<del><audio controls>
<del> <source src="file.ogg" type="audio/ogg">
<del> </audio>
<del>```
<del>
<del>##### Añadiendo un MP3
<del>```
<del><audio controls>
<del> <source src="file.mp3" type="audio/mpeg">
<del> </audio>
<del>```
<del>
<del>##### Añadiendo un WAV
<del>```
<del><audio controls>
<del> <source src="file.wav" type="audio/wav">
<del> </audio>
<del>```
<del>
<del>Puede contener una o más fuentes de audio, representadas mediante el atributo src o el elemento fuente.
<del>
<del>##### Añadiendo múltiples archivos de audio
<del>```
<del><audio controls>
<del> <source src="file-1.wav" type="audio/wav">
<del> <source src="file-2.ogg" type="audio/ogg">
<del> <source src="file-3.mp3" type="audio/mpeg">
<del> </audio>
<del>```
<del>
<del>#### El soporte del navegador para diferentes tipos de archivos es el siguiente
<del>
<del>| Navegador | Mp3 | Wav | Ogg | |: -------: |: ---: |: ---: |: ---: | Internet Explorer | Si | No | No | Google Chrome | Si | Si | Si | | Mozilla Firefox | Si | Si | Si | | Safari | Si | Si | No | | Ópera | Si | Si | Sí
<del>
<del>### Atributos Soportados
<del>
<del>| Atributo | Valor | Descripción | |: -------: |: ---: |: ---: | | reproducción automática | reproducción automática | El audio comenzará a reproducirse tan pronto como esté listo | | controles | controles | se mostrará el audio (como un botón de reproducción / pausa, etc.) | | loop | loop | audio comenzará de nuevo, cada vez que termine | | silenciado | silenciado | la salida de audio se silenciará | | src | URL | Especifica la URL del archivo de audio |
<del>
<del>#### Más información:
<del>
<del>[https://www.w3schools.com/tags/tag\_audio.asp](https://www.w3schools.com/tags/tag_audio.asp) [https://html.com/tags/audio/](https://html.com/tags/audio/) [https://html.com/tags/audio/#ixzz5Sg4QbtH8](https://html.com/tags/audio/#ixzz5Sg4QbtH8)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/b-tag/index.md
<del>---
<del>title: B Tag
<del>localeTitle: Dia b
<del>---
<del>## Etiqueta B
<del>
<del>La etiqueta `<b>` se utiliza para especificar texto en negrita, sin transmitir ninguna importancia o relevancia especial. Cuando esté en negrita texto de especial importancia o relevancia, se recomienda que use la etiqueta `<strong>` .
<del>
<del>### Ejemplo:
<del>
<del>```html
<del>
<del><b>This text is bold</b>
<del>```
<del>
<del>Esto aparecería como:
<del>
<del>**Este texto es negrita**
<del>
<del>#### Más información:
<del>
<del>1. [w3schools](https://www.w3schools.com/tags/tag_b.asp "<b> Etiqueta: w3schools")
<del>
<del>2. [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/b)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/base-tag/index.md
<del>---
<del>title: Base Tag
<del>localeTitle: Etiqueta Base
<del>---
<del>## Etiqueta Base
<del>
<del>Esto es un talón. [Ayuda a nuestra comunidad a expandirla](https://github.com/freecodecamp/guides/tree/master/src/pages/html/elements/base-tag/index.md) .
<del>
<del>[Esta guía rápida de estilo ayudará a asegurar que su solicitud de extracción sea aceptada](https://github.com/freecodecamp/guides/blob/master/README.md) .
<del>
<del>#### Más información:
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/blockquote-tag/index.md
<del>---
<del>title: Blockquote Tag
<del>localeTitle: Etiqueta Blockquote
<del>---
<del>## Etiqueta Blockquote
<del>
<del>### Propósito
<del>
<del>El elemento HTML `<blockquote>` rompe una cita del contenido circundante. Esto permite al lector ver claramente la cita como material atribuido a su autor original.
<del>
<del>### Uso
<del>
<del>Al igual que las etiquetas "H" envían señales a un lector de que la información es importante, blockquote alerta al lector de que la información que están leyendo proviene de una fuente externa. La etiqueta `<blockquote>` puede incluir una URL para la fuente de la cita que se puede obtener usando el atributo cite, mientras que una representación de texto de la fuente se puede dar usando el elemento `<cite>` .
<del>
<del>### Ejemplo
<del>
<del>```html
<del>
<del><blockquote cite="https://www.cnet.com/news/tim-cook-maintains-steve-jobs-beatles-business-model/">
<del> “My model for business is The Beatles. They were four guys who kept each other's kind of negative tendencies in check.
<del> They balanced each other and the total was greater than the sum of the parts.
<del> That's how I see business: great things in business are never done by one person, they're done by a team of people.”
<del> </blockquote>
<del> <cite>Steve Jobs</cite>
<del>```
<del>
<del>#### Más información:
<del>
<del>[blockquote MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/blockquote)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/body-tag/index.md
<del>---
<del>title: Body Tag
<del>localeTitle: Dia del cuerpo
<del>---
<del>## Etiqueta del cuerpo
<del>
<del>La etiqueta `<body>` contiene el contenido de una página web. Junto con `<head>` , es uno de los dos elementos requeridos de un documento HTML. `<body>` debe ser el segundo hijo de un elemento `<html>` . Solo puede haber un elemento `<body>` en una página.
<del>
<del>El elemento `<body>` debe contener todo el contenido de una página, incluidos todos los elementos de visualización. El elemento `<body>` también puede contener etiquetas `<script>` , generalmente scripts que deben ejecutarse después de que se haya cargado el contenido de una página.
<del>
<del>```html
<del>
<del><html>
<del> <head>
<del> <title>Document Titles Belong in the Head</title>
<del> </head>
<del> <body>
<del> <p>This paragraph is content. It goes in the body!</p>
<del> </body>
<del> </html>
<del>```
<del>
<del>#### Más información:
<del>
<del>[MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/body)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/br-tag/index.md
<del>---
<del>title: Br Tag
<del>localeTitle: Br día
<del>---
<del>## Br etiqueta
<del>
<del>La etiqueta `<br>` produce un salto de línea en un texto. Esto es útil para poemas y direcciones.
<del>
<del>### Ejemplo
<del>
<del>```html
<del>
<del><!DOCTYPE html>
<del> <html>
<del> <body>
<del> Mozilla Foundation<br>
<del> 1981 Landings Drive<br>
<del> Building K<br>
<del> Mountain View, CA 94043-0801<br>
<del> USA
<del> </body>
<del> </html>
<del>```
<del>
<del>#### Más información:
<del>
<del>[MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/br)
<del>
<del>[etiqueta br: w3schools](https://www.w3schools.com/tags/tag_br.asp)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/button-tag/index.md
<del>---
<del>title: Button Tag
<del>localeTitle: Etiqueta de botón
<del>---
<del>## Etiqueta de botón
<del>
<del>Una etiqueta `<button>` especifica un botón en el que se puede hacer clic en el documento HTML. Entre las etiquetas `<button>` , puede poner contenido, como texto o imágenes. Esto es diferente del botón creado usando la etiqueta `<input>` , que solo toma el texto como contenido.
<del>
<del>**Sintaxis:**
<del>
<del>`<button type="submit">Click Here!</button>`
<del>
<del>**Atributos:**
<del>
<del>Los siguientes son los atributos asociados soportados por HTML 4:
<del>
<del>| **Atributos** | **Valor** | **Lo que hace** | | --- | --- | --- | | discapacitado | discapacitado | Desactiva el botón | | nombre | nombre | Especifica un nombre para el botón. El nombre es para hacer referencia al botón en forma HTML, JS, etc. | tipo | botón o restablecer o enviar | Establece el tipo de botón. Un botón con `button` tipo es un simple botón puede hacer clic, con el `submit` tipo se somete form-data, y con el `reset` tipo se restablece form-data. | | valor | texto | Establece un valor inicial para el botón. Este valor se envía junto con los datos de formulario. |
<del>
<del>HTML 5 soporta los siguientes atributos adicionales:
<del>
<del>| **Atributos** | **Valor** | **Lo que hace** | | --- | --- | --- | | enfoque automático | enfoque automático | Si el botón se enfoca automáticamente cuando se carga la página. Por ejemplo, ver Google. A medida que la página se carga completamente, el cuadro de texto se enfoca automáticamente. | | forma | form\_id | Especifica una o más formas a las que pertenece el botón. | | formaccion URL | Especifica a dónde enviar los datos del formulario una vez que se presiona el botón de tipo de `submit` . | | formmethod | obtener o publicar | Especifica cómo enviar los datos del formulario. Sólo para el botón de tipo de `submit` . | | formtarget | `_blank` o `_self` o `_parent` o `_top` o framename | Especifica la ubicación donde se mostrará el resultado después de enviar los datos del formulario. |
<del>
<del>**Ejemplo:**
<del>
<del>```html
<del>
<del><html>
<del> <head>
<del> <title>Button Tag example</title>
<del> </head>
<del> <body>
<del> <form>
<del> First name:<br>
<del> <input type="text" name="firstname" value="Free">
<del> <br>
<del> Last name:<br>
<del> <input type="text" name="lastname" value="CodeCamp">
<del> <br><br>
<del> <input type="submit" value="Submit" formtarget="_self">
<del> </form>
<del> </body>
<del> </html>
<del>```
<del>
<del>Todos los principales navegadores admiten la etiqueta `<button>` . `<button>` etiqueta `<button>` también admite atributos de eventos en HTML. **Nota: los** diferentes navegadores pueden enviar valores diferentes si utiliza el elemento `<button>` . Se recomienda especificar el valor del botón o usar la etiqueta `<input>` para crear el botón en un formulario HTML.
<del>
<del>**Otros recursos:**
<del>
<del>* Otros atributos:
<del>
<del>| **Atributos** | **Enlace** | | --- | --- | | formenctype | https://www.w3schools.com/TAgs/att _button_ formenctype.asp | | formnovalidate | https://www.w3schools.com/TAgs/att _button_ formnovalidate.asp |
<del>
<del>* Etiqueta `<input>` : https://www.w3schools.com/TAgs/tag\_input.asp
<del>* Atributos del evento: https://www.w3schools.com/TAgs/ref\_eventattributes.asp
<del>* `formtarget` atributo `formtarget` : https://www.w3schools.com/TAgs/att _button_ formtarget.asp
<del>* Formulario HTML:
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/canvas-tag/index.md
<del>---
<del>title: Canvas Tag
<del>localeTitle: Etiqueta de lienzo
<del>---
<del>## Etiqueta de lienzo
<del>
<del>Esto es un talón. [Ayuda a nuestra comunidad a expandirla](https://github.com/freecodecamp/guides/tree/master/src/pages/html/elements/canvas-tag/index.md) .
<del>
<del>[Esta guía rápida de estilo ayudará a asegurar que su solicitud de extracción sea aceptada](https://github.com/freecodecamp/guides/blob/master/README.md) .
<del>
<del>#### Más información:
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/center-tag/index.md
<del>---
<del>title: Center Tag
<del>localeTitle: Etiqueta central
<del>---
<del>## Etiqueta central
<del>
<del>En HTML, la etiqueta `<center>` se usa para centrar el texto en una página. Puede escribir una etiqueta `<center>` como `<center>My Text Here</center>` La función está obsoleta y no se recomienda su uso. La etiqueta `<center>` estaba en desuso en HTML 4, la característica se podía eliminar de los navegadores web en cualquier momento. Se recomienda utilizar `text-align` CSS para centrar el texto.
<del>
<del>#### Más información:
<del>
<del>* [MDN - Etiqueta de centro HTML](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/center)
<del>* [MDN - Alinear Texto CSS](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/code-tag/index.md
<del>---
<del>title: Code Tag
<del>localeTitle: Etiqueta de código
<del>---
<del>## Etiqueta de código
<del>
<del>La etiqueta `<code>` contiene el código de computadora para la página web. De forma predeterminada, la etiqueta `<code>` muestra en la fuente monoespaciada predeterminada del navegador.
<del>
<del>```html
<del>
<del><code>A piece of computer code</code>
<del>```
<del>
<del>#### Más información:
<del>
<del>[MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/code)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/comment-tag/index.md
<del>---
<del>title: Comment Tag
<del>localeTitle: Cómo etiquetar
<del>---
<del>## Etiqueta de comentario
<del>
<del>Los comentarios son etiquetas que se usan para dejar notas en el documento. Solo el desarrollador tiene acceso a los comentarios, el usuario final no lo ve a menos que verifique con el elemento de inspección del navegador.
<del>
<del>Cuando está trabajando en algún código, es útil dejar sugerencias a otros desarrolladores para comprender de qué se trata el trabajo.
<del>
<del>### Ejemplo
<del>
<del>```html
<del>
<del><!-- This is a comment -->
<del>```
<del>
<del>Los comentarios también se pueden utilizar para desactivar el código sin tener que eliminarlo por completo.
<del>
<del>### Ejemplo
<del>
<del>```html
<del>
<del><!--
<del> <h1>Hello Campers</h1>
<del> -->
<del> <h2>Hello Friends</h2>
<del> <!--
<del> <p>Hello Paragraph</p>
<del> -->
<del>
<del>```
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/div-tag/index.md
<del>---
<del>title: Div Tag
<del>localeTitle: Etiqueta div
<del>---
<del>## Etiqueta div
<del>
<del>La etiqueta `<div>` es un contenedor genérico que define una sección en su documento HTML. Un elemento `<div>` se utiliza para agrupar secciones de elementos HTML y formatearlos con CSS. Un `<div>` es un elemento de nivel de bloque. Esto significa que toma su propia línea en la pantalla. Los elementos justo después de `<div>` se empujarán hacia abajo a la línea de abajo. Para una agrupación y estilo similares que no estén a nivel de bloque, sino en línea, utilizaría la etiqueta `<span>` lugar. La etiqueta se utiliza para agrupar elementos en línea en un documento.
<del>
<del>### Ejemplo
<del>
<del>Aquí hay un ejemplo de cómo mostrar una sección en el mismo color:
<del>
<del>```html
<del>
<del><div style="color:#ff0000">
<del> <h3>my heading</h3>
<del> <p>my paragraph</p>
<del> </div>
<del>```
<del>
<del>#### Más información:
<del>
<del>[Tutorialspoint](https://www.tutorialspoint.com/html/html_div_tag.htm)
<del>
<del>[MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/div)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/doctype-tag/index.md
<del>---
<del>title: Doctype Tag
<del>localeTitle: Doctype Tag
<del>---
<del>## Doctype Tag
<del>
<del>El código HTML siempre está acompañado por su "boilerplate" de etiquetas. La primera etiqueta encontrada en cualquier archivo HTML debe ser una declaración de Doctype. El doctype html5 `<!DOCTYPE html>` es un preámbulo requerido que se utiliza para informar al navegador qué [modo de renderización](https://developer.mozilla.org/en-US/docs/Quirks_Mode_and_Standards_Mode) usar (HTML5 vs. XHTML). Asegúrese de colocar el doctype en la parte superior del documento.
<del>
<del>```html
<del>
<del><!DOCTYPE html>
<del> <html>
<del> <head>
<del> <meta charset=UTF-8>
<del> <title>Document Title</title>
<del> </head>
<del> <body>
<del> <p>Document content.</p>
<del> </body>
<del> </html>
<del>```
<del>
<del>#### Más información:
<del>
<del>* [Doctype: MDN](https://developer.mozilla.org/en-US/docs/Glossary/Doctype)
<del>* [Introducción a HTML5: MDN](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/Introduction_to_HTML5)
<del>* [Modo Quirks y Modo Estándar: MDN](https://developer.mozilla.org/en-US/docs/Quirks_Mode_and_Standards_Mode)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/em-tag/index.md
<del>---
<del>title: Em Tag
<del>localeTitle: En las etiquetas
<del>---
<del>## Em etiqueta
<del>
<del>La etiqueta `<em>` se usa para enfatizar el texto en un documento HTML. Esto se puede hacer envolviendo el texto que desea enfatizar en una etiqueta `<em>` . La mayoría de los navegadores mostrarán el texto envuelto en una etiqueta `<em>` en cursiva.
<del>
<del>Nota: la etiqueta `<em>` no se debe utilizar para poner cursiva con estilo en cursiva. La etiqueta `<em>` se usa para enfatizar el énfasis en el texto.
<del>
<del>### Ejemplo:
<del>```
<del><body>
<del> <p>
<del> Text that requires emphasis should go <em>here</em>.
<del> </p>
<del> </body>
<del>```
<del>
<del>#### Más información:
<del>
<del>* [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/em)
<del>* [em etiqueta: w3schools](https://www.w3schools.com/tags/tag_em.asp)
<del>* [etiqueta em: htmlreference.io](http://htmlreference.io/element/em/)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/fieldsets-and-legends/index.md
<del>---
<del>title: Fieldsets and Legends
<del>localeTitle: Fieldsets y leyendas
<del>---
<del>#### Lectura sugerida:
<del>
<del>Consulte el [sitio WebAIM](http://webaim.org/techniques/forms/controls) para ver ejemplos de formularios accesibles, específicamente la parte sobre los botones de [opción](http://webaim.org/techniques/forms/controls)
<del>
<del>#### Proyecto de artículo:
<del>
<del>Explicación y ejemplos para agrupar elementos relacionados en un formulario con los elementos `fieldset` y `legend`
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/font-tag/index.md
<del>---
<del>title: Font Tag
<del>localeTitle: Etiqueta de fuente
<del>---
<del>## Etiqueta de fuente
<del>
<del>_Esta característica está en desuso en HTML 4.01 y eliminada en HTML 5._
<del>
<del>El Elemento de fuente HTML `<font>` define el tamaño de fuente, el color y la cara de su contenido. Se normalizó en HTML 3.2, pero luego quedó obsoleto en HTML 4.01 y ahora está obsoleto en HTML5. Aunque todavía puede funcionar en algunos navegadores, se recomienda dejar de usarlo, ya que podría eliminarse en cualquier momento. Las fuentes de estilo pueden lograrse y controlarse mucho mejor a través de CSS, de hecho, todo estilo debe escribirse solo con CSS.
<del>
<del>El comportamiento **anterior** del elemento `<font>` :
<del>
<del>* **Color:** este atributo le permite establecer el color del texto en un color con nombre como 'azul' o un color hexadecimal en el formato de #RRGGBB.
<del>* **Cara:** este atributo le permite establecer la familia de fuentes y contendrá una lista separada por comas de uno o más nombres de fuentes. Si el navegador no admite la primera fuente de la lista, se moverá a la segunda fuente. Si no se admite o no se enumera ninguna fuente, el navegador usualmente predeterminará una fuente para ese sistema.
<del>* **Tamaño:** este atributo le permite especificar el tamaño de la fuente. Hay dos formas de hacer esto, ya sea configurando un valor numérico o un valor relativo. Los valores numéricos varían de 1 a 7, 1 es el más pequeño y 3 es el predeterminado. Los valores relativos, como -2 o +2, establecen el valor en relación con el tamaño del elemento `<basefont>` o '3' el valor predeterminado.
<del>
<del>Un ejemplo:
<del>
<del>```html
<del>
<del><font face="fontNameHere" size="7" color="blue">My Text Here</font>
<del>```
<del>
<del>#### Más información:
<del>
<del>* [MDN - etiqueta de fuente HTML](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/font)
<del>* [MDN - Fuente CSS](https://developer.mozilla.org/en-US/docs/Web/CSS/font)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/footer-tag/index.md
<del>---
<del>title: Footer Tag
<del>localeTitle: Etiqueta de pie de página
<del>---
<del>## Etiqueta de pie de página
<del>
<del>La etiqueta `<footer>` denota el pie de página de un documento o sección HTML. Normalmente, el pie de página contiene información sobre el autor, información de derechos de autor, información de contacto y un mapa del sitio. Cualquier información de contacto dentro de una etiqueta `<footer>` debe ir dentro de una etiqueta `<address>` .
<del>
<del>### Ejemplo
<del>
<del>```html
<del>
<del><html>
<del> <head>
<del> <title>Paragraph example</title>
<del> </head>
<del> <body>
<del> <footer>
<del> <p>© 2017 Joe Smith</p>
<del> </footer>
<del> </body>
<del> </html>
<del>```
<del>
<del>#### Más información:
<del>
<del>[MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/footer)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/form-tag/index.md
<del>---
<del>title: Form Tag
<del>localeTitle: Etiqueta de formulario
<del>---
<del>## Etiqueta de formulario
<del>
<del>La etiqueta `<form>` se usa para crear formularios en HTML que son para la entrada del usuario. Una vez que un usuario ingresa datos y los envía, los datos se envían al servidor para ser procesados.
<del>
<del>Aquí hay un ejemplo básico de cómo usar la etiqueta `<form>` :
<del>
<del>```html
<del>
<del><form action="/example.php" method="get">
<del> Name: <input type="text"><br>
<del> Email Address: <input type="text"><br>
<del> <input type="submit" value="Submit">
<del> </form>
<del>```
<del>
<del>### Atributo de acción
<del>
<del>Cada elemento `<form>` necesita un atributo de acción. El valor del atributo de acción es la URL en el servidor que recibirá los datos en el formulario cuando se envíe.
<del>
<del>Aquí hay un ejemplo usando el atributo de acción:
<del>
<del>```html
<del>
<del><form action="http://www.google.com/form.php" method="get">
<del> <p>Controls will appear inside here.</p>
<del> </form>
<del>```
<del>
<del>Como puede ver, el formulario está enviando sus datos a la URL [http://www.google.com/from.php](http://www.google.com/from.php) .
<del>
<del>### Método
<del>
<del>Los formularios se pueden enviar utilizando el método GET o POST.
<del>
<del>* El método GET es ideal para formularios más cortos, ya que adjunta datos al final de la URL especificada dentro del atributo de acción.
<del>
<del>* El método POST es ideal para formularios que son más largos, o cuando agrega o elimina información de una base de datos. Con el método POST, los valores del formulario se envían en encabezados HTTP.
<del>
<del>
<del>### Elementos
<del>
<del>El elemento `<form>` tendrá al menos uno de los siguientes elementos anidados dentro de él:
<del>
<del>* [`<input>`](https://guide.freecodecamp.org/html/elements/input "Entrada")
<del>* [`<button>`](https://guide.freecodecamp.org/html/elements/button-tag "Botón")
<del>* [`<label>`](https://guide.freecodecamp.org/html/elements/label-tag "Etiqueta")
<del>* [`<select>`](https://guide.freecodecamp.org/html/elements/select-tag "Seleccionar")
<del>* [`<textarea>`](https://guide.freecodecamp.org/html/elements/textarea-tag "Textarea")
<del>* [`<fieldset>`](https://guide.freecodecamp.org/html/elements/fieldsets-and-legends "Fieldset")
<del>
<del>### Recursos
<del>
<del>* [Recursos para el formulario W3 Schools](https://www.w3schools.com/tags/tag_form.asp "Escuelas w3")
<del>* [Recurso de Mozilla Form](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form "Mozilla Form")
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/head-tag/index.md
<del>---
<del>title: Head Tag
<del>localeTitle: Etiqueta de la cabeza
<del>---
<del>## Etiqueta de la cabeza
<del>
<del>La etiqueta `<head>` contiene información sobre una página web. Junto con `<body>` , es uno de los dos elementos requeridos de un documento HTML. `<head>` debe ser el primer elemento secundario de un elemento `<html>` . Solo puede haber un elemento `<head>` en una página.
<del>
<del>El elemento `<head>` contiene información sobre cómo se debe mostrar una página web, también conocida como metadatos. El título del documento, los enlaces a las hojas de estilo y las etiquetas `<script>` vinculan con los archivos JavaScript deben colocarse en el `<head>` . El `<head>` no debe contener ningún contenido de la página.
<del>
<del>`html <html> <head> <title>Document Titles Belong in the Head</title> </head> <body> <p>This paragraph is content. It goes in the body!</p> </body> </html>`
<del>
<del>#### Más información:
<del>
<del>* [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/head)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/header-tag/index.md
<del>---
<del>title: Header Tag
<del>localeTitle: Etiqueta de encabezado
<del>---
<del>## Etiqueta de encabezado
<del>
<del>La etiqueta `<header>` es un contenedor que se utiliza para enlaces de navegación o contenido introductorio. Por lo general, puede incluir elementos de encabezado, como `<h1>` , `<h2>` , pero también puede incluir otros elementos como un formulario de búsqueda, logotipo, información del autor, etc.
<del>
<del># Corresponde al rubro más importante. Mientras nos movemos a otras etiquetas como
<del>
<del>## ,
<del>
<del>### , etc disminuye el grado de importancia. Aunque no es obligatorio, la etiqueta `<header>` está diseñada para contener el encabezado de las secciones adyacentes. También se puede utilizar más de una vez en un documento HTML. Es importante tener en cuenta que la etiqueta `<header>` no introduce una nueva sección, sino que es simplemente el encabezado de una sección.
<del>
<del>Aquí hay un ejemplo usando la etiqueta `<header>` :
<del>
<del>```html
<del>
<del><article>
<del> <header>
<del> <h1>Heading of Page</h1>
<del> </header>
<del> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
<del> </article>
<del>```
<del>
<del>#### Más información:
<del>
<del>* [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/header)
<del>* [Escuelas w3](https://www.w3schools.com/tags/tag_header.asp)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/hr-tag/index.md
<del>---
<del>title: Hr Tag
<del>localeTitle: Día de la hora
<del>---
<del>## Etiqueta de la hora
<del>
<del>La regla horizontal o `<hr>` es una etiqueta que permite insertar una línea divisoria, definiendo el contenido de su documento. Es muy importante aclarar que esta etiqueta es una ruptura temática; en versiones anteriores de .html es una regla horizontal.
<del>
<del>### Ejemplo
<del>```
<del><!DOCTYPE html>
<del> <html>
<del> <body>
<del> <h2>FreeCodeCamp</h2>
<del> <p>FreeCodeCamp is a place where you can learn to code from scratch to professional</p>
<del>
<del> <hr>
<del>
<del> <h3>How to start</h3>
<del> <p>Just go to <a href="www.freecodecamp.com">FreeCodeCamp website and start learning!</a></p>
<del>
<del> <hr>
<del> </body
<del> </html>
<del>
<del>```
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/i-tag/index.md
<del>---
<del>title: I Tag
<del>localeTitle: Yo Etiqueta
<del>---
<del>## Yo Etiqueta
<del>
<del>El elemento `<i>` se utiliza para denotar el texto que está separado de su texto circundante de alguna manera. De forma predeterminada, el texto rodeado de etiquetas `<i>` se mostrará en cursiva.
<del>
<del>En las especificaciones HTML anteriores, la etiqueta `<i>` se usaba únicamente para denotar el texto en cursiva. Sin embargo, en el HTML semántico moderno, las etiquetas como `<em>` y `<strong>` deben usarse cuando sea apropiado. Puede usar el atributo "clase" del elemento `<i>` para indicar por qué el texto en las etiquetas es diferente del texto circundante. Es posible que desee mostrar que el texto o la frase es de un idioma diferente, como se muestra en el siguiente ejemplo.
<del>
<del>```HTML
<del><p>The French phrase <i class="french">esprit de corps</i> is often
<del> used to describe a feeling of group cohesion and fellowship.</p>
<del>```
<del>
<del>#### Más información:
<del>
<del>* [El elemento HTML <i>: MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/i)
<del>* [Etiqueta: w3schools](https://www.w3schools.com/tags/tag_i.asp)
<del>* [Etiqueta: htmlreference.io](http://htmlreference.io/element/i/)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/iframe-tag/index.md
<del>---
<del>title: Iframe Tag
<del>localeTitle: Etiqueta Iframe
<del>---
<del>## Etiqueta Iframe
<del>
<del>Las etiquetas iframe se utilizan para agregar una página web o aplicación existente a su sitio web dentro de un espacio establecido.
<del>
<del>Cuando se usan las etiquetas iframe, el atributo src se debe usar para indicar la ubicación de la página web o la aplicación para usar dentro del marco.
<del>
<del>```html
<del>
<del><iframe src="framesite/index.html"></iframe>
<del>```
<del>
<del>Puede configurar los atributos de ancho y alto para limitar el tamaño del marco.
<del>
<del>```html
<del>
<del><iframe src="framesite/index.html" height="500" width="200"></iframe>
<del>```
<del>
<del>Los iframes tienen un borde por defecto, si desea eliminar esto, puede hacerlo usando el atributo de estilo y configurando las propiedades de borde de CSS en ninguno.
<del>
<del>```html
<del>
<del><iframe src="framesite/index.html" height="500" width="200" style="border:none;"></iframe>
<del>```
<del>
<del>#### Más información:
<del>
<del>* [MDN - etiqueta iframe HTML](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe)
<del>* [W3 - especificación iframe HTML 5.2](https://www.w3.org/TR/html5/semantics-embedded-content.html#the-iframe-element)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/img-tag/index.md
<del>---
<del>title: Img Tag
<del>localeTitle: Etiqueta Img
<del>---
<del>## Etiqueta Img
<del>
<del>Un simple elemento de imagen HTML puede incluirse en un documento HTML como este:
<del>
<del>```html
<del>
<del><img src="path/to/image/file" alt="this is a cool picture">
<del>```
<del>
<del>`alt` etiquetas `alt` proporcionan texto alternativo para una imagen. Un uso de la etiqueta `alt` es para personas con discapacidad visual que utilizan un lector de pantalla; se puede leer la etiqueta `alt` de la imagen para comprender el significado de la imagen.
<del>
<del>Tenga en cuenta que la ruta al archivo de imagen puede ser relativa o absoluta. Además, recuerde que el elemento `img` se cierra automáticamente, lo que significa que no se cierra con la `<img />` y en su lugar se cierra con solo una `>` .
<del>
<del>Ejemplo:
<del>
<del>```html
<del>
<del><img src="https://example.com/image.png" alt="my picture">
<del>```
<del>
<del>(Esto es asumiendo que el archivo html está en https://example.com/index.html, por lo que está en la misma carpeta que el archivo de imagen)
<del>
<del>es lo mismo que:
<del>
<del>```html
<del>
<del><img src="image.png" alt="my picture">
<del>```
<del>
<del>#### Más información:
<del>
<del>[MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img) [Escuelas w3](https://www.w3schools.com/TAGs/tag_img.asp)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/index.md
<del>---
<del>title: Elements
<del>localeTitle: Elementos
<del>---
<del># Elementos HTML
<del>
<del>Los elementos son los componentes básicos de HTML que describen la estructura y el contenido de una página web. Son la parte de "marcado" del lenguaje de marcado de hipertexto (HTML).
<del>
<del>La sintaxis HTML utiliza los corchetes angulares ("<" y ">") para mantener el nombre de un elemento HTML. Los elementos suelen tener una etiqueta de apertura y una etiqueta de cierre, y proporcionan información sobre el contenido que contienen. La diferencia entre los dos es que la etiqueta de cierre tiene una barra diagonal.
<del>
<del>Aquí hay un ejemplo que usa el [elemento p](#) ( `<p>` ) para decirle al navegador que un grupo de texto es un párrafo:
<del>
<del>```html
<del>
<del><p>This is a paragraph.</p>
<del>```
<del>
<del>Las etiquetas de apertura y cierre deben coincidir; de lo contrario, el navegador puede mostrar el contenido de forma inesperada.
<del>
<del>
<del>
<del>## Elementos de cierre automático
<del>
<del>Algunos elementos HTML se cierran automáticamente, lo que significa que no tienen una etiqueta de cierre separada. Los elementos de cierre automático normalmente insertan algo en su documento.
<del>
<del>Un ejemplo es el [elemento br](#) ( `<br>` ), que inserta un salto de línea en el texto. Anteriormente, las etiquetas de cierre automático tenían la barra diagonal hacia adelante ( `<br />` ), sin embargo, la especificación de HTML5 ya no lo requiere.
<del>
<del>## Funcionalidad Elemento HTML
<del>
<del>Hay muchos elementos HTML disponibles. Aquí hay una lista de algunas de las funciones que realizan:
<del>
<del>* dar información sobre la propia página web (los metadatos)
<del>* Estructurar el contenido de la página en secciones.
<del>* incrustar imágenes, videos, clips de audio u otros archivos multimedia
<del>* Crea listas, tablas y formularios.
<del>* Dar más información sobre cierto contenido de texto.
<del>* enlace a las hojas de estilo que tienen reglas sobre cómo debe mostrar la página el navegador
<del>* Agrega scripts para hacer una página más interactiva y dinámica.
<del>
<del>## Elementos HTML de anidamiento
<del>
<del>Puede anidar elementos dentro de otros elementos en un documento HTML. Esto ayuda a definir la estructura de la página. Solo asegúrese de que las etiquetas se cierren primero desde el elemento más interior.
<del>
<del>Correcto: `<p>This is a paragraph that contains a <span>span element.</span></p>`
<del>
<del>Incorrecto: `<p>This is a paragraph that contains a <span>span element.</p></span>`
<del>
<del>## Elementos de nivel de bloque y en línea
<del>
<del>Los elementos vienen en dos categorías generales, conocidas como nivel de bloque y en línea. Los elementos de nivel de bloque se inician automáticamente en una nueva línea, mientras que los elementos en línea se ubican dentro del contenido circundante.
<del>
<del>Los elementos que ayudan a estructurar la página en secciones, como una barra de navegación, encabezados y párrafos, suelen ser elementos a nivel de bloque. Los elementos que insertan o dan más información sobre el contenido generalmente están en línea, como [enlaces](#) o [imágenes](#) .
<del>
<del>## El elemento HTML
<del>
<del>Hay un elemento `<html>` que se usa para contener la otra marca de un documento HTML. También se conoce como el elemento "raíz" porque es el elemento primario de los otros elementos HTML y el contenido de una página.
<del>
<del>Aquí hay un ejemplo de una página con un [elemento de encabezado](#the-head-element) , un [elemento de cuerpo](#the-body-element) y un [párrafo](#the-p-element) :
<del>
<del>```html
<del>
<del><!DOCTYPE html>
<del> <html>
<del> <head>
<del> </head>
<del> <body>
<del> <p>I'm a paragraph</p>
<del> </body>
<del> </html>
<del>```
<del>
<del>## El elemento HEAD
<del>
<del>Este es el contenedor para procesar información y metadatos de un documento HTML.
<del>
<del>```html
<del>
<del><head>
<del> <meta charset="utf-8">
<del> </head>
<del>```
<del>
<del>## El elemento del cuerpo
<del>
<del>Este es un contenedor para el contenido visualizable de un documento HTML.
<del>
<del>```html
<del>
<del><body>...</body>
<del>```
<del>
<del>## El elemento p
<del>
<del>Crea un párrafo, quizás el elemento de nivel de bloque más común.
<del>
<del>```html
<del>
<del><p>...</p>
<del>```
<del>
<del>## El elemento A (enlace)
<del>
<del>Crea un hipervínculo para dirigir a los visitantes a otra página o recurso.
<del>
<del>```html
<del>
<del><a href="#">...</a>
<del>```
<del>
<del>## Otros recursos
<del>
<del>* [Párrafos HTML](#)
<del>* [HTML br](#)
<del>* [Enlaces HTML](#)
<del>* [Imágenes HTML](#)
<del>* [HTML Head](#)
<del>* [Cuerpo de HTML](#)
<del>* [HTML DOCTYPE](#)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/input-tag/index.md
<del>---
<del>title: Input Tag
<del>localeTitle: Etiqueta de entrada
<del>---
<del>## Entrada
<del>
<del>La etiqueta de entrada HTML se puede incluir en un documento HTML como este:
<del>
<del>```html
<del>
<del><input type="text">
<del>```
<del>
<del>Esto crea un área dentro de la cual un usuario puede ingresar información fácilmente. Luego, esta información se envía a una base de datos de back-end y se almacena o utiliza más abajo en el sitio web o la aplicación.
<del>
<del>Una entrada con "tipo = 'texto'" producirá un campo de una sola línea donde se puede ingresar cualquier información. Otros tipos comunes de entradas incluyen pero no se limitan a: botón, casilla de verificación, color, correo electrónico y contraseña.
<del>
<del>### Los tipos más comunes utilizados.
<del>
<del>* `text` : un campo de texto de una sola línea.
<del>
<del>* `button` : Un botón sin comportamiento predeterminado.
<del>
<del>* `submit` : un botón que envía el formulario.
<del>
<del>* `checkbox` : una casilla de verificación que permite seleccionar / deseleccionar valores.
<del>
<del>* `date` : para ingresar una fecha (año, mes y día).
<del>
<del>* `email` : para editar una dirección de correo electrónico.
<del>
<del>* `file` : permite al usuario seleccionar un archivo.
<del>
<del>* `hidden` : no se muestra, pero su valor se envía al servidor.
<del>
<del>* `number` : para introducir un número.
<del>
<del>* `password` : un campo de texto de una sola línea cuyo valor está oculto.
<del>
<del>* `radio` : un botón de radio, que permite seleccionar un solo valor entre múltiples opciones.
<del>
<del>* `range` : Un control para ingresar un número.
<del>
<del>* `url` : para introducir una URL.
<del>
<del>
<del>Ejemplo:
<del>
<del>```html
<del>
<del><input type="button">
<del> <input type="checkbox">
<del> <input type="color">
<del> <input type="email">
<del> <input type="password">
<del>```
<del>
<del>Las entradas vienen con muchos atributos predeterminados.
<del>
<del>Algunos de los atributos que se encuentran comúnmente incluyen autocompletar, verificar y colocar marcadores.
<del>
<del>```html
<del>
<del><input type="text" placeholder="This is a placeholder">
<del>```
<del>
<del>En la instancia anterior, se representa un área dentro de la cual se puede ingresar la entrada, con el marcador de posición que indica "Esto es un marcador de posición". Una vez que se hace clic en la línea de entrada y se presiona una tecla, el marcador de posición desaparece y se reemplaza por su propia entrada.
<del>
<del>```html
<del>
<del><input type="checkbox" checked>
<del>```
<del>
<del>En este caso, aparece una casilla de verificación y se marca de forma predeterminada debido al atributo "marcado".
<del>
<del>Hay muchos tipos diferentes de entradas y atributos asociados que se pueden encontrar en el enlace que se encuentra a continuación.
<del>
<del>#### Más información:
<del>
<del>https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input
<del>
<del>https://www.w3schools.com/tags/tag\_input.asp
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/input-types/index.md
<del>---
<del>title: Input Types
<del>localeTitle: Tipos de entrada
<del>---
<del>## Tipos de entrada
<del>
<del>A los elementos HTML de entrada se les puede asignar un atributo llamado "tipo". El tipo de un elemento de entrada determina qué tipo de datos puede ingresar el usuario. La entrada predeterminada es texto, pero otras opciones incluyen casillas de verificación, botones simples o color (utilizando códigos hexadecimales).
<del>
<del>#### Más información:
<del>
<del>[Escuelas W3: Tipo de entrada](https://www.w3schools.com/tags/att_input_type.asp)
<del>
<del>[MDN:](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/label-tag/index.md
<del>---
<del>title: Label Tag
<del>localeTitle: Día de la etiqueta
<del>---
<del># Etiqueta
<del>
<del>< **_etiqueta_** > define una etiqueta para una tipo de elemento / etiqueta.
<del>
<del>### Uso
<del>```
<del><label for="id">Label</label>
<del> <input type="text" name="text" id="id" value="yourvalue"><br>
<del>```
<del>
<del>Como puede ver, el atributo _for_ de la etiqueta debe ser igual al atributo id del elemento relacionado para unirlos.
<del>
<del>### Soporte de plataforma
<del>
<del>| Navegador | Element Support | |: -----: |: -------------: | | Internet Explorer |: marca de _verificación_ blanca: | | Mozilla Firefox |: marca de _verificación_ blanca: | | Google Chrome |: marca de _verificación_ blanca: | Ópera |: marca de _verificación_ blanca: | | Safari |: marca de _verificación_ blanca: |
<del>
<del>### Atributos
<del>
<del>| Atributo | Valor | Descripción | |: -------: |: ----: |: ---------: | para _ID de_ elemento _| Especifica a qué elemento de formulario está enlazada una etiqueta | | form | form_ id | Especifica una o más formas a las que pertenece la etiqueta |
<del>
<del>### Atributo global
<del>
<del>La **etiqueta** < **label** > admite los atributos globales en HTML.
<del>
<del>### Atributo del evento
<del>
<del>La **etiqueta** < **label** > admite los atributos de evento en HTML.
<del>
<del>> El elemento < **label** > no se representa como algo especial para el usuario. Sin embargo, proporciona una mejora de la usabilidad para los usuarios de mouse, porque si el usuario hace clic en el texto dentro del elemento, cambia el control.
<del>
<del>#### Más información:
<del>
<del># [https://www.w3schools.com/jsref/dom _obj_ label.asp](https://www.w3schools.com/jsref/dom_obj_label.asp)
<del>
<del>## Etiqueta
<del>
<del>La `<label>` define una etiqueta para un elemento `<input>` .
<del>
<del>Una etiqueta se puede vincular a un elemento utilizando el atributo "for" o colocando el elemento dentro del elemento.
<del>
<del>```html
<del>
<del><label for="peas">Do you like peas?
<del> <input type="checkbox" name="peas" id="peas">
<del> </label>
<del>```
<del>
<del>```html
<del>
<del><label>Do you like peas?
<del> <input type="checkbox" name="peas">
<del> </label>
<del>```
<del>
<del>#### Más información:
<del>
<del>[MDN - Etiqueta Tabel](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label)
<del>[W3School - Etiqueta de la etiqueta](https://www.w3schools.com/tags/tag_label.asp)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/li-tag/index.md
<del>---
<del>title: Li Tag
<del>localeTitle: Etiqueta Li
<del>---
<del>## Etiqueta Li
<del>
<del>La etiqueta `<li>` define un elemento de lista en una lista. La etiqueta `<li>` se puede usar con listas desordenadas ( `<ul>` ), listas ordenadas ( `<ol>` ) y menús ( `<menu>` ).
<del>
<del>Para definir un elemento de la lista, envuelva los elementos deseados en una etiqueta `<li>` . `<li>` elementos deben estar contenidos dentro de un elemento padre que es una lista.
<del>
<del>### Ejemplo
<del>
<del>```html
<del>
<del><body>
<del> <ul>
<del> <li>
<del> <p>I'm a list item</p>
<del> </li>
<del> <li>
<del> <p>I'm a list item too</p>
<del> </li>
<del> <li>
<del> <p>Me three/p>
<del> </li>
<del> </ul>
<del> </body>
<del>```
<del>
<del>En una lista ordenada, `<li>` aparece como un elemento con un punto de viñeta.
<del>
<del>* Primer elemento
<del>* Segundo artículo
<del>* Tercer artículo
<del>
<del>En una lista no ordenada, `<li>` aparece como un elemento numerado.
<del>
<del>1. Primer elemento
<del>2. Segundo artículo
<del>3. Tercer artículo
<del>
<del>Este contador de visualización numérica se puede personalizar utilizando la propiedad CSS de _tipo de estilo de lista_ .
<del>
<del>Ejemplos:
<del>
<del>```html
<del>
<del><!-- In a simple unordered list -->
<del> <ul>
<del> <li>First item</li>
<del> <li>Second item</li>
<del> <li>Third item</li>
<del> </ul>
<del>
<del> <!-- In a simple ordered list -->
<del> <ol>
<del> <li>First item</li>
<del> <li>Second item</li>
<del> <li>Third item</li>
<del> </ol>
<del>
<del> <!-- In a menu list -->
<del> <menu>
<del> <li>Menu item one</li>
<del> <li>Menu item two</li>
<del> <li>Menu item three</li>
<del> </menu>
<del>```
<del>
<del>### Atributos
<del>
<del>El elemento `<li>` tiene los siguientes elementos:
<del>
<del>#### Tipo
<del>
<del>El atributo de `type` define el tipo de numeración que se utilizará en la lista. Los siguientes valores se utilizan para determinar qué estilo de numeración se utilizará:
<del>
<del>* `1` : números
<del>* `a` : letras minúsculas
<del>* `A` : letras mayúsculas
<del>* `i` : números en minúscula
<del>* `I` : numerales en mayúsculas
<del>
<del>#### Ejemplo
<del>
<del>```html
<del>
<del><body>
<del> <ol type="I">
<del> <li>list item</li>
<del> <li>list item</li>
<del> <li>list item</li>
<del> </ol>
<del> </body>
<del>```
<del>
<del>El anterior HTMl dará salida:
<del>
<del>1. elemento de lista
<del>2. elemento de lista
<del>3. elemento de lista
<del>
<del>#### Valor
<del>
<del>El atributo de `value` especifica el orden numérico de la `<li>` actual. Este atributo solo acepta un valor numérico y solo se puede utilizar con una lista ordenada. Todos los elementos de la lista que siguen se ordenarán numéricamente en función de la entrada numérica del atributo de `value` .
<del>
<del>#### Ejemplo
<del>
<del>```html
<del>
<del><body>
<del> <ol>
<del> <li value="4">list item</li>
<del> <li>list item</li>
<del> <li>list item</li>
<del> </ol>
<del> </body>
<del>```
<del>
<del>El HTML anterior dará salida:
<del>
<del>4. elemento de lista
<del>5. elemento de lista
<del>6. elemento de lista
<del>
<del>### Anidar otra lista como un elemento
<del>
<del>Además de crear elementos individuales, también puede usar etiquetas `<li>` para crear una lista anidada, ordenada o desordenada. Para hacer esto, anida un `<ol>` o `<ul>` _dentro de_ una etiqueta `<li>` .
<del>
<del>Aquí hay una lista desordenada con una lista ordenada y anidada.
<del>
<del>* Primer elemento
<del>* Segundo artículo
<del>
<del>1. Primer subelemento
<del>2. Segundo subelemento
<del>
<del>* Tercer artículo
<del>
<del>Y aquí hay una lista ordenada con una lista anidada, desordenada.
<del>
<del>1. Primer elemento
<del>2. Segundo artículo
<del>
<del>* Primer subelemento
<del>* Segundo subelemento
<del>
<del>1. Tercer artículo
<del>
<del>```html
<del>
<del><!-- An unordered list with a nested, ordered list. -->
<del> <ul>
<del> <li>First item</li>
<del> <li>Second item <!-- No closing </li> tag before the nested list -->
<del> <ol>
<del> <li>First sub-item</li>
<del> <li>Second sub-item</li>
<del> </ol>
<del> </li> <!-- The closing </li> tag comes after the nested list -->
<del> <li>Third item</li>
<del> </ul>
<del>
<del> <!-- An ordered list with a nested, unordered list. -->
<del> <ol>
<del> <li>First item</li>
<del> <li>Second item <!-- No closing </li> tag before the nested list -->
<del> <ul>
<del> <li>First sub-item</li>
<del> <li>Second sub-item</li>
<del> </ul>
<del> </li> <!-- The closing </li> tag comes after the nested list -->
<del> <li>Third item</li>
<del> </ol>
<del>```
<del>
<del>#### Más información:
<del>
<del>* [El elemento HTML <li>: MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/li)
<del>* [Etiqueta HTML <li>: w3schools](https://www.w3schools.com/cssref/pr_list-style-type.asp)
<del>* [Propiedad de estilo de lista CSS: CSS-Tricks](https://css-tricks.com/almanac/properties/l/list-style/)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/link-tag/index.md
<del>---
<del>title: Link Tag
<del>localeTitle: Etiqueta de enlace
<del>---
<del>## Etiqueta de enlace
<del>
<del>El elemento de enlace se puede utilizar para vincular contenido relevante de otra página web o documento. Las etiquetas de enlace comúnmente implican la implementación de CSS a un documento HTML.
<del>
<del>#### Más información:
<del>
<del>[MDN: etiqueta de enlace](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/lists/index.md
<del>---
<del>title: Lists
<del>localeTitle: Liza
<del>---
<del>## Liza
<del>
<del>Hay tres tipos de listas en HTML. Todas las listas deben contener uno o más elementos de la lista.
<del>
<del>### Lista HTML desordenada
<del>
<del>La lista desordenada comienza con la etiqueta `<ul>` y los elementos de la lista comienzan con la etiqueta `<li>` . En listas desordenadas, todos los elementos de lista marcados con viñetas de forma predeterminada.
<del>
<del>\`\` \`
<del>
<del>* ít.
<del>* ít.
<del>* ít.
<del>
<del>\`\` \` Salida:
<del>
<del>* ít.
<del>* ít.
<del>* ít.
<del>
<del>### Lista de HTML ordenados
<del>
<del>La lista ordenada comienza con la etiqueta `<ol>` y los elementos de la lista comienzan con la etiqueta `<li>` . En las listas ordenadas todos los elementos de la lista están marcados con números.
<del>
<del>\`\` \`
<del>
<del>1. Primer elemento
<del>2. Segundo artículo
<del>3. Tercer artículo
<del>
<del>\`\` \` Salida:
<del>
<del>1. Primer elemento
<del>2. Segundo artículo
<del>3. Tercer artículo
<del>
<del>### Lista de descripciones HTML
<del>
<del>La lista de descripción contiene elementos de lista con sus definiciones. Usamos la etiqueta `<dl>` para iniciar la lista, la etiqueta `<dt>` para definir un término y la etiqueta `<dd>` para describir cada término.
<del>
<del>\`\` \`
<del>
<del>freeCodeCamp
<del>
<del>Aprenda a codificar con cursos en línea gratuitos, proyectos de programación y preparación de entrevistas para trabajos de desarrollador.
<del>
<del>GitHub
<del>
<del>GitHub es un repositorio de Git o control de versiones basado en web y un servicio de alojamiento de Internet. Se utiliza principalmente para el código.
<del>
<del>\`\` \` Salida:
<del>
<del>freeCodeCamp
<del>
<del>Aprenda a codificar con cursos en línea gratuitos, proyectos de programación y preparación de entrevistas para trabajos de desarrollador.
<del>
<del>GitHub
<del>
<del>GitHub es un repositorio de Git o control de versiones basado en web y un servicio de alojamiento de Internet. Se utiliza principalmente para el código.
<del>
<del>#### Más información:
<del>
<del>[HTML](https://html.com/lists/)
<del>
<del>[w3schools](https://www.w3schools.com/html/html_lists.asp)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/main-tag/index.md
<del>---
<del>title: Main Tag
<del>localeTitle: Dia principal
<del>---
<del>## Etiqueta principal
<del>
<del>La etiqueta `<main>` funciona de forma similar a la etiqueta `<div>` pero representa semánticamente el contenido principal del documento o parte del mismo. Se pueden usar múltiples etiquetas `<main>` , por ejemplo, para el contenido principal de varios artículos, y por lo tanto su contenido debe ser exclusivo del documento y no repetirse en ningún otro lugar.
<del>
<del>### Ejemplo
<del>
<del>El siguiente ejemplo ilustra el uso de la etiqueta `<main>` :
<del>
<del>```html
<del>
<del><!-- other content -->
<del>
<del> <main>
<del> <h1>Diary Entry 31</h1>
<del> <p>Oct 23 2017</p>
<del>
<del> <article>
<del> <h2>Today Is Unique</h2>
<del> <p>This information will be unique among other articles.</p>
<del> </article>
<del> </main>
<del>
<del> <!-- other content -->
<del>
<del>```
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/meta-tag/index.md
<del>---
<del>title: Meta Tag
<del>localeTitle: Etiqueta meta
<del>---
<del>## Etiqueta meta
<del>
<del>La etiqueta `<meta>` proporciona los metadatos sobre el documento HTML.
<del>
<del>Estos metadatos se utilizan para especificar el conjunto de caracteres, la descripción, las palabras clave, el autor y la ventana gráfica de una página.
<del>
<del>Estos metadatos no aparecerán en el sitio web en sí, pero serán utilizados por los navegadores y los motores de búsqueda para determinar cómo mostrará la página el contenido y evaluar la optimización del motor de búsqueda (SEO).
<del>
<del>Los metadatos se asignan a la del documento HTML:
<del>
<del>```html
<del>
<del><head>
<del> <meta charset="UTF-8">
<del> <meta name="description" content="Short description of website content here">
<del> <meta name="keywords" content="HTML,CSS,XML,JavaScript">
<del> <meta name="author" content="Jane Smith">
<del> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<del> <!-- HTML5 introduced a method to let web designers take control over the viewport, through the <meta> tag. The viewport is the user's visible area of a web page. A <meta> viewport element gives the browser instructions on how to control the page's dimensions and scaling. -->
<del> </head>
<del>```
<del>
<del>#### Más información:
<del>
<del>Para información adicional sobre el etiqueta, por favor visite los siguientes: (https://www.w3schools.com/TAgs/tag\_meta.asp "w3schools.com etiqueta") (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta "MDN etiqueta")
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/nav-tag/index.md
<del>---
<del>title: Nav Tag
<del>localeTitle: Etiqueta Nav
<del>---
<del>## Etiqueta Nav
<del>
<del>La etiqueta `<nav>` está diseñada para el bloque principal de enlaces de navegación. NO todos los enlaces de un documento deben estar dentro de un elemento `<nav>` .
<del>
<del>Los navegadores, como los lectores de pantalla para usuarios discapacitados, pueden usar este elemento para determinar si se omite la representación inicial de este contenido.
<del>
<del>#### Ejemplo
<del>
<del>\`\` \`html
<del>
<del>* [Casa](#)
<del>* [Acerca de](#)
<del>* [Contacto](#)
<del>
<del>\`\` \`
<del>
<del>#### Más información:
<del>
<del>* [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/nav)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/ol-tag/index.md
<del>---
<del>title: ol Tag
<del>localeTitle: etiqueta ol
<del>---
<del>## etiqueta ol
<del>
<del>La etiqueta `<ol>` crea un elemento de lista ordenada en HTML. Una lista ordenada es una de las dos estructuras de lista en HTML, la otra es la lista desordenada, creada por la etiqueta `<ul>` . Las listas ordenadas se utilizan para mostrar listas con orden significativo. De forma predeterminada, los elementos de la lista en una lista ordenada se muestran como una lista numerada, comenzando con 1. Este comportamiento se puede cambiar con el atributo "tipo" o usando estilos CSS. Los elementos de la lista se pueden anidar.
<del>
<del>```html
<del>
<del><ol>
<del> <li>First Item</li>
<del> <li>Second Item <!-- No closing </li> tag before the nested list -->
<del> <ol>
<del> <li>First Subitem</li>
<del> <li>Second Subitem</li>
<del> </ol>
<del> </li> <!-- The closing </li> tag comes after the nested list -->
<del> <li>Third Item</li>
<del> </ol>
<del>```
<del>
<del>### Listas ordenadas y desordenadas
<del>
<del>En HTML, las listas ordenadas y desordenadas son similares en uso y estilo. Use listas ordenadas en lugares donde cambiar el orden de los elementos cambiaría el significado de la lista. Por ejemplo, una lista ordenada podría usarse para una receta, donde cambiar el orden de los pasos sería importante. Utilice listas desordenadas para grupos de artículos sin orden significativo. Una lista de animales en una granja podría ir en una lista desordenada.
<del>
<del>#### Más información:
<del>
<del>## Otros recursos
<del>
<del>* [La lista desordenada `<ul>`](https://github.com/freeCodeCamp/guides/blob/master/src/pages/html/elements/ul-tag/index.md)
<del>* [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ol)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/p-tag/index.md
<del>---
<del>title: P Tag
<del>localeTitle: Día p
<del>---
<del>## Etiqueta P
<del>
<del>La etiqueta `<p>` significa párrafo, que es la etiqueta más común utilizada para crear líneas de palabras dentro del documento `<html>` . Usar `<p>` será muy útil para agregar el margen automáticamente entre elementos. El atributo `<p>` también puede ser útil para el estilo CSS.
<del>
<del>### Etiqueta P con otras etiquetas
<del>
<del>El uso de `<p>` es compatible con otras etiquetas, lo que permite agregar hipervínculos ( `<a>` ), negrita ( `<strong>` ), cursiva ( `<i>` ) entre otros.
<del>
<del>### Ejemplo
<del>
<del>```html
<del>
<del><html>
<del> <head>
<del> <title>Paragraph example</title>
<del> </head>
<del> <body>
<del> <p>
<del> This <strong>sentence</strong> was created to show how the paragraph works.
<del> </p>
<del> </body>
<del> </html>
<del>```
<del>
<del>También puede anidar un elemento de anclaje `<a>` dentro de un párrafo.
<del>
<del>### Ejemplo
<del>
<del>```html
<del>
<del><p>Here's a
<del> <a href="http://freecodecamp.com">link to Free Code Camp.com</a>
<del> for you to follow.</p>
<del>```
<del>
<del>#### Más información:
<del>
<del>* [MDN: <p> El elemento de párrafo](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/p)
<del>* [w3schools: HTML <p> Tag](https://www.w3schools.com/tags/tag_i.asp)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/paragraph/index.md
<del>---
<del>title: Paragraph Tag
<del>localeTitle: Etiqueta de párrafo
<del>---
<del>## Párrafo
<del>
<del>El HTML
<del>
<del>El elemento representa un párrafo de texto.
<del>
<del>Generalmente representa un bloque de texto que se separa de otros bloques por espacio en blanco vertical.
<del>
<del>### Ejemplo
<del>
<del>\`\` \`html
<del>
<del>Este es un parrafo
<del>
<del>Este es otro parrafo
<del>
<del>\`\` \`
<del>
<del>#### Más información:
<del>
<del>https://developer.mozilla.org/en-US/docs/Web/HTML/Element/p
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/paragraphs/index.md
<del>---
<del>title: Paragraphs
<del>localeTitle: Párrafos
<del>---
<del>## Párrafos
<del>
<del>Esto es un talón. [Ayuda a nuestra comunidad a expandirla](https://github.com/freecodecamp/guides/tree/master/src/pages/html/elements/paragraphs/index.md) .
<del>
<del>[Esta guía rápida de estilo ayudará a asegurar que su solicitud de extracción sea aceptada](https://github.com/freecodecamp/guides/blob/master/README.md) .
<del>
<del>#### Más información:
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/s-tag/index.md
<del>---
<del>title: S Tag
<del>localeTitle: Día s
<del>---
<del>## Etiqueta S
<del>
<del>En HTML, la etiqueta `<s>` se utiliza para tachar el texto. Por ejemplo:
<del>
<del>```html
<del>
<del><p><s>This year is the year of the monkey.</s></p>
<del> <p>This year is the year of the Rooster.</p>
<del>```
<del>
<del>#### Más información:
<del>
<del>* [MDN - etiqueta HTML s](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/s)
<del>* [W3 - Especificación de la etiqueta HTML 5.2 s](https://www.w3.org/TR/html5/textlevel-semantics.html#the-s-element)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/script-tag/index.md
<del>---
<del>title: Script Tag
<del>localeTitle: Etiqueta de Script
<del>---
<del>## Etiqueta de Script
<del>
<del>La etiqueta HTML Script se usa para contener JavaScript del lado del cliente o hacer referencia a un archivo JavaScript externo usando el atributo "src" del script.
<del>
<del>La etiqueta / elemento `<script>` se utiliza para incorporar Javascript del lado del cliente en su archivo HTML que se puede usar para agregar interactividad y lógica a su sitio web
<del>```
<del><script>
<del> //JavaScript code is written here
<del> </script>
<del>
<del> <script src="js/app.js">
<del>```
<del>
<del>La etiqueta se puede usar para abarcar el código Javascript real en el propio HTML como este
<del>```
<del><script>
<del> alert('hello this is my Javascript doing things!');
<del> </script>
<del>```
<del>
<del>O puede usarlo como una forma de referenciar un archivo javascript externo como este
<del>```
<del><script src="main.js" />
<del>```
<del>
<del>Aquí el atributo `src` del elemento toma una ruta a un archivo Javascript
<del>
<del>Las etiquetas de secuencia de comandos se cargan en su HTML en orden y de forma sincronizada, por lo que generalmente es una buena práctica agregar sus secuencias de comandos justo antes del final de su etiqueta `<body>` en su HTML, por lo que
<del>```
<del> <script src="main.js" />
<del> <script>
<del> alert('hello this is my Javascript doing things!');
<del> </script>
<del> </body>
<del>```
<del>
<del>Puede ver la documentación oficial del elemento de script en los [documentos de MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/section-tag/index.md
<del>---
<del>title: Section Tag
<del>localeTitle: Etiqueta de sección
<del>---
<del>## Sección
<del>
<del>El elemento HTML `<section>` define una sección dentro de una página HTML que se usa cuando no hay un elemento HTML semántico más específico para representarlo. Normalmente, un elemento `<section>` incluirá un elemento de encabezado ( `<h1>` - `<h6>` ) como elemento secundario.
<del>
<del>Por ejemplo, una página web podría dividirse en varias secciones, como las secciones de bienvenida, contenido y contacto.
<del>
<del>Un elemento `<section>` no debe usarse en lugar de un elemento `<div>` si se necesita un contenedor genérico. Se debe utilizar para definir secciones dentro de una página HTML.
<del>
<del>```html
<del>
<del><html>
<del> <head>
<del> <title>Section Example</title>
<del> </head>
<del> <body>
<del> <section>
<del> <h1>Heading</h1>
<del> <p>Bunch of awesome content</p>
<del> </section>
<del> </body>
<del> </html>
<del>```
<del>
<del>#### Más información:
<del>
<del>* [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/section)
<del>* [Escuelas w3](https://www.w3schools.com/tags/tag_section.asp)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/select-tag/index.md
<del>---
<del>title: Select Tag
<del>localeTitle: Seleccionar etiqueta
<del>---
<del>## Seleccionar etiqueta
<del>
<del>Esto es un talón. [Ayuda a nuestra comunidad a expandirla](https://github.com/freecodecamp/guides/tree/master/src/pages/html/elements/select-tag/index.md) .
<del>
<del>[Esta guía rápida de estilo ayudará a asegurar que su solicitud de extracción sea aceptada](https://github.com/freecodecamp/guides/blob/master/README.md) .
<del>
<del>#### Más información:
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/span-tag/index.md
<del>---
<del>title: Span Tag
<del>localeTitle: Dia de span
<del>---
<del>## Etiqueta Span
<del>
<del>La etiqueta `<span>` es un elemento contenedor de propósito general similar a `<div>` . Los navegadores no realizan ningún cambio visual en `<span>` s de forma predeterminada, pero puede personalizarlos con CSS o manipularlos con JavaScript.
<del>
<del>### Ejemplo
<del>
<del>```html
<del>
<del><html>
<del> <head>
<del> <title>The Span Tag</title>
<del> </head>
<del> <body>
<del> <div>
<del> <p>This is a normal paragraph without any changes.</p>
<del> <p>This paragraph has <span style="color:red">red span styling</span> inside it without affecting the rest of the document.</p>
<del> </div>
<del> </body>
<del> </html>
<del>```
<del>
<del>El código para el párrafo con texto rojo se ve así:
<del>
<del>```html
<del>
<del><p>This paragraph has <span style="color:red">red span styling</span> inside it without affecting the rest of the document.</p>
<del>```
<del>
<del>#### Diferencias entre `<span>` y `<div>`
<del>
<del>La principal diferencia es que `<span>` es un elemento en línea, mientras que `<div>` es un elemento de bloque. Esto significa que un `<span>` puede aparecer dentro de una oración o párrafo (como en el ejemplo anterior), mientras que un `<div>` comenzará una nueva línea de contenido. Tenga en cuenta que la propiedad de `display` CSS puede cambiar este comportamiento predeterminado, ¡pero va más allá del alcance de este artículo!
<del>
<del>#### Más información:
<del>
<del>* [Referencia de elementos HTML MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/span)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/strong-tag/index.md
<del>---
<del>title: Strong Tag
<del>localeTitle: Etiqueta fuerte
<del>---
<del># Etiqueta fuerte
<del>
<del>La etiqueta HTML < **_strong_** > es una etiqueta de énfasis de texto que, cuando se utiliza, da como resultado una presentación de texto en negrita, colocada dentro de las etiquetas.
<del>
<del>### Uso
<del>```
<del><strong> Hello World! </strong>
<del>```
<del>
<del>El código anterior resulta en
<del>
<del>**Hola Mundo!**
<del>
<del>Esta etiqueta también se conoce comúnmente como el **elemento fuerte** . Cuando se trata de atributos, solo los Atributos globales se aplican a **fuertes** etiqueta, es decir, no hay atributos específicos para la etiqueta < **strong** >.
<del>
<del>### Soporte del navegador
<del>
<del>| Nombre del navegador | Apoyo | |: -------------------: |: -------: | | Chrome | Sí | | Android | Sí | | Firefox | Sí | | Internet Explorer | Sí | | Ópera | Sí | | Safari | Sí |
<del>
<del>#### Más información:
<del>
<del>[https://www.techonthenet.com/html/elements/strong\_tag.php](https://www.techonthenet.com/html/elements/strong_tag.php)
<del>
<del># [https://www.w3schools.com/tags/tag\_strong.asp](https://www.w3schools.com/tags/tag_strong.asp)
<del>
<del>La etiqueta `<strong>` se utiliza para dar importancia al texto en un documento HTML. Esto se puede hacer envolviendo el texto que desea enfatizar en una etiqueta `<strong>` . La mayoría de los navegadores mostrarán el texto envuelto en una etiqueta `<strong>` en negrita.
<del>
<del>Nota: la etiqueta `<strong>` no debe usarse para el texto en negrita estilística.
<del>
<del>### Ejemplo:
<del>```
<del><body>
<del> <p>
<del> <strong> This </strong> is important.
<del> </p>
<del> </body>
<del>```
<del>
<del>#### Más información:
<del>
<del>* [em etiqueta: w3schools](https://www.w3schools.com/tags/tag_strong.asp)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/style-tag/index.md
<del>---
<del>title: Style Tag
<del>localeTitle: Etiqueta de estilo
<del>---
<del>## Etiqueta de estilo
<del>
<del>La etiqueta de estilo se usa como un archivo css, excepto dentro de un HTML, así:
<del>```
<del> <head>
<del> <title>Your Title</title>
<del> <style>
<del> p {
<del> color:red;
<del> }
<del> </style>
<del> </head>
<del>```
<del>
<del>Eso haría que el color de la etiqueta del párrafo sea rojo. Es algo útil si solo quieres poner un poco de código, pero si quieres una hoja de estilo realmente larga, entonces recomiendo usar `<link />` .
<del>
<del>#### Más información:
<del>
<del>[Escuelas W3C](https://www.w3schools.com/tags/tag_style.asp)
<del>
<del>Más información:
<del>
<del>La etiqueta de estilo se utiliza para establecer cualquier estilo CSS para una página web dentro de un documento. La etiqueta de estilo debe estar anidada en la sección de encabezado del documento html:
<del>
<del>```html
<del>
<del><head>
<del> <style>
<del> h1 {
<del> text-align: center;
<del> font-family: sans-serif;
<del> }
<del> </style>
<del> </head>
<del>```
<del>
<del>Puede escribir cualquier código CSS dentro de la etiqueta de estilo de acuerdo con su sintaxis.
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/table-tag/index.md
<del>---
<del>title: Table Tag
<del>localeTitle: Etiqueta de tabla
<del>---
<del>## Etiqueta de tabla
<del>
<del>La etiqueta `<table>` permite mostrar una tabla en su página web.
<del>
<del>### Ejemplo
<del>
<del>```html
<del>
<del><table>
<del> <tr>
<del> <td>Row 1, Cell 1</td>
<del> <td>Row 1, Cell 2</td>
<del> </tr>
<del> <tr>
<del> <td>Row 2, Cell 1</td>
<del> <td>Row 2, Cell 2</td>
<del> </tr>
<del> </table>
<del>```
<del>
<del>Este bloque de código produciría la siguiente salida:
<del>
<del>Fila 1, Celda 1
<del>
<del>Fila 1, celda 2
<del>
<del>Fila 2, celda 1
<del>
<del>Fila 2, celda 2
<del>
<del>#### Más información:
<del>
<del>[MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/td-tag/index.md
<del>---
<del>title: Td Tag
<del>localeTitle: Td dia
<del>---
<del>## Td Tag
<del>
<del>La etiqueta `<td>` define una celda estándar en una tabla HTML.
<del>
<del>Una tabla HTML tiene dos tipos de celdas:
<del>
<del>* Celdas de encabezado: contienen información de encabezado (creada con el elemento `<th>` )
<del>* Celdas estándar: contiene datos (creados con el elemento `<td>` )
<del>
<del>El texto en `<th>` elementos está en negrita y centrado por defecto. El texto en los elementos `<td>` es regular y alineado a la izquierda por defecto.
<del>
<del>### Ejemplo
<del>
<del>```html
<del>
<del><html>
<del> <head>
<del> <title>Td Tag Example</title>
<del> </head>
<del> <body>
<del> <table>
<del> <tr>
<del> <th>Header1</th>
<del> <th>Header2</th>
<del> </tr>
<del> <tr>
<del> <td>Cell A</td>
<del> <td>Cell B</td>
<del> </tr>
<del> </table>
<del> </body>
<del> </html>
<del>
<del>```
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/textarea-tag/index.md
<del>---
<del>title: Textarea Tag
<del>localeTitle: Etiqueta Textarea
<del>---
<del>## Etiqueta Textarea
<del>
<del>La etiqueta HTML textarea le permite ingresar un cuadro que contendrá texto para comentarios o interacción del usuario. En la mayoría de los casos, es común ver el área de texto utilizada como parte de un formulario.
<del>
<del>Los programadores usan la etiqueta textarea para crear un campo multilínea para la entrada del usuario (útil, especialmente en caso de que el usuario pueda poner en el formulario un texto más largo). Los programadores pueden especificar diferentes atributos para las etiquetas textarea.
<del>
<del>Código de muestra:
<del>
<del>```html
<del>
<del> <form>
<del> <textarea name="comment" rows="8" cols="80" maxlength="500" placeholder="Enter your comment here..." required></textarea>
<del> </form>
<del>```
<del>
<del>Atributos más comunes: `row` y `cols` atributos determinan la altura y la anchura del área de texto `placeholder` atributo de `placeholder` especifica el texto que es visible para el usuario, ayuda al usuario a comprender qué datos deben escribirse `maxlength` atributo `maxlength` determina la longitud máxima del texto que se puede escribir en el área de texto, el usuario no puede enviar más caracteres atributo `required` significa que este campo debe completarse antes del envío del formulario
<del>
<del>Para obtener más información sobre la etiqueta textarea y sus atributos, visite MDN o w3schools .
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/th-tag/index.md
<del>---
<del>title: Th Tag
<del>localeTitle: El dia
<del>---
<del>## Etiqueta de th
<del>
<del>La etiqueta `<th>` permite definir una celda de encabezado en tablas HTML. Por defecto, la mayoría de los navegadores mostrarán en negrita y centrarán los datos en estas etiquetas.
<del>
<del>### Ejemplo
<del>
<del>```html
<del>
<del><table>
<del> <tr>
<del> <th>Movie</th>
<del> <th>Rating</th>
<del> </tr>
<del> <tr>
<del> <td>Die Hard</td>
<del> <td>5 Stars</td>
<del> </tr>
<del> </table>
<del>```
<del>
<del>Este marcado creará la siguiente salida:
<del>
<del>Película
<del>
<del>Clasificación
<del>
<del>Morir duro
<del>
<del>5 estrellas
<del>
<del>#### Más información:
<del>
<del>[MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/tr-tag/index.md
<del>---
<del>title: Tr Tag
<del>localeTitle: Día tr
<del>---
<del>La etiqueta `<tr>` define una fila estándar en una tabla HTML en una página web.
<del>
<del>La etiqueta `<tr>` alberga las etiquetas `<th>` y `<td>` , también conocidas como encabezado de tabla y datos de tabla respectivamente.
<del>
<del>`<tr>` etiqueta `<tr>` es una etiqueta cerrada que significa que cada etiqueta `<tr>` abierta debe cerrarse con su etiqueta de cierre subsiguiente indicada por `</tr>`
<del>
<del>`<tr>` etiqueta `<tr>` define una fila en una tabla.
<del>
<del>### Ejemplo
<del>
<del>\`\` \`html
<del>
<del>Ejemplo de etiqueta Tr
<del>
<del>Encabezado uno
<del>
<del>Los datos de la tabla habitual / celda de columna.
<del>
<del>Los datos de la tabla habitual / celda de columna.
<del>
<del>Los datos de la tabla habitual / celda de columna.
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/u-tag/index.md
<del>---
<del>title: U Tag
<del>localeTitle: Etiqueta U
<del>---
<del>## Etiqueta U
<del>
<del>La etiqueta HTML `<u>` representa el texto con un subrayado.
<del>
<del>El elemento `<u>` estaba en desuso en HTML 4.01. En HTML5, la etiqueta `<u>` se redefinió para representar texto que debería ser estilísticamente diferente al texto normal. Esto incluye palabras mal escritas o nombres propios en chino.
<del>
<del>En cambio, para subrayar el texto, se recomienda que se use la etiqueta `<span>` en lugar de `<u>` . Da estilo a tus etiquetas `<span>` con la propiedad de `text-decoration` CSS con el valor `underline` .
<del>
<del>### Ejemplos:
<del>
<del>\`\` \`html
<del>
<del>Este párrafo tiene un subrayado .
<del>```
<del>Underlining text with the `<span>` tag:
<del>```
<del>
<del>html Todo el mundo ha estado hablando de freeCodeCamp últimamente. \`\` \`
<del>
<del>### Más información:
<del>
<del>[MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/u)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/elements/ul-tag/index.md
<del>---
<del>title: Ul Tag
<del>localeTitle: Etiqueta de ul
<del>---
<del>## Etiqueta de ul
<del>
<del>La lista no ordenada `<ul>` es una etiqueta utilizada para crear listas con viñetas. Para crear una lista dentro de `<ul>` , use la etiqueta `<li>` . Para crear listas de estilos, vaya a las listas de estilos CSS y realice los cambios.
<del>
<del>`<ul>` se puede anidar dentro de otras listas y es compatible con otras etiquetas como `<a>` , `<p>` , `<button>` , las etiquetas de estilo html ( `<strong>` , `<em>` , etc.).
<del>
<del>### Ejemplo
<del>
<del>Para crear lo siguiente:
<del>
<del>```html
<del>
<del> <ul>
<del> <li>This is the bulleted list #1</li>
<del> <li>This is the bulleted list #2</li>
<del> <li>This is the bulleted list #3</li>
<del> <li>
<del> <ul>
<del> <li>This is the bulleted nested list #1</li>
<del> </ul>
<del> </li>
<del> </ul>
<del>```
<del>
<del>Usted usaría este código HTML: `html <html> <head> <title></title> </head> <body> <ul> <li>This is the bulleted list #1</li> <li>This is the bulleted list #2</li> <li>This is the bulleted list #3</li> <li> <ul> <li>This is the bulleted nested list #1</li> </ul> </li> </ul> </body> </html>`
<del>
<del>## Otros recursos
<del>
<del>* [La lista ordenada `<ol>`](https://github.com/freeCodeCamp/guides/blob/master/src/pages/html/elements/ol-tag/index.md)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/html-entities/index.md
<del>---
<del>title: HTML Entities
<del>localeTitle: Entidades HTML
<del>---
<del># Entidades HTML
<del>
<del>## Visión de conjunto
<del>
<del>### ¿Qué son las entidades HTML?
<del>
<del>Las entidades HTML son caracteres que se utilizan para reemplazar caracteres reservados en HTML o para caracteres que no aparecen en su teclado. Algunos caracteres están reservados en HTML. Si usa los signos menor que (<) o mayor que (>) en su texto, el navegador puede mezclarlos con las etiquetas.
<del>
<del>### ¿Para qué se usan?
<del>
<del>Como se mencionó, las entidades HTML se utilizan para reemplazar los caracteres reservados que están reservados por HTML.
<del>
<del>### ¿Cómo los usas?
<del>
<del>Una entidad de carácter se parece a esto:
<del>
<del>```html
<del>
<del><!-- format &[entity_name]; -->
<del> <!-- example for a less-than sign (<) -->
<del> <
<del>```
<del>
<del>O
<del>
<del>```html
<del>
<del><!-- &#[entity_number]; -->
<del> <!-- example for a less-than sign (<) -->
<del> <
<del>```
<del>
<del>## Guia de referencia
<del>
<del>Esta no es, de ninguna manera, una lista exhaustiva, pero los enlaces a continuación podrán darle más entidades si las siguientes no funcionan para sus necesidades. Codificación feliz: pajarita:
<del>
<del>| Personaje | Nombre de la entidad | Número de entidad | Descripción | | ------- | ----------- | ----------- | ------- | | | | ` ` | Espacio | | ! | | `!` | Signo de exclamación | | "| | `"` | Comillas | | # | | `#` | Signo de número | $ | | `$` | Signo de dólar | | ¢ | `¢` | `¢` | Signo de ciento | | € | `€` | `€` | Signo del euro | £ | `£` | `£` | Signo de GBP | | ¥ | `¥` | `¥` | Signo de yen | | % | | `%` | Signo de porcentaje | & | `&` | `&` | Ampersand | | '| | `'` | Apóstrofe | | (| | `(` | Apertura / Paréntesis izquierdo | | ) | | `)` | Cierre / Paréntesis Derecho | | \* | | `*` | Asterisco | | + | | `+` | Signo más | | , | | `,` | Coma | | - | | `-` | Guión | | . | | `.` | Periodo | | / | | `/` | Slash | | © | `©` | `©` | Derechos de autor | | ® | `®` | `®` | Marca registrada | | "| `"` | `"` | comillas dobles | | `>` | `>` | `>` | Signo mayor que | | `<` | `<` | `<` | Signo menor que | | `•` | `•` | `•` | Punto de bala |
<del>
<del>#### Más información:
<del>
<del>Hay un montón de referencias de HTML entites por ahí; algunos ejemplos son:
<del>
<del>* [Tabla de Entidades - W3](https://dev.w3.org/html5/html-author/charref)
<del>* [Escuelas w3](https://www.w3schools.com/html/html_entities.asp)
<del>* [Freeformatter](https://www.freeformatter.com/html-entities.html)
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/html-forms/index.md
<del>---
<del>title: HTML Forms
<del>localeTitle: Formularios HTML
<del>---
<del>## Formularios HTML
<del>
<del>Básicamente, los formularios se utilizan para recopilar datos ingresados por un usuario, que luego se envían al servidor para su posterior procesamiento. Se pueden utilizar para diferentes tipos de entradas de usuario, como nombre, correo electrónico, etc.
<del>
<del>La forma contiene elementos de control que se envuelven alrededor de etiquetas `<form></form>` , como `input` , que pueden tener tipos como:
<del>
<del>* `text`
<del>* `email`
<del>* `password`
<del>* `checkbox`
<del>* `radio`
<del>* `submit`
<del>* `range`
<del>* `search`
<del>* `date`
<del>* `time`
<del>* `week`
<del>* `color`
<del>* `datalist`
<del>
<del>Ejemplo de código:
<del>
<del>```html
<del>
<del><form>
<del> <label for="username">Username:</label>
<del> <input type="text" name="username" id="username">
<del> <label for="password">Password:</label>
<del> <input type="password" name="password" id="password">
<del> <input type="radio" name="gender" value="male">Male<br>
<del> <input type="radio" name="gender" value="female">Female<br>
<del> <input type="radio" name="gender" value="other">Other
<del> <input list="Options">
<del> <datalist id="Options">
<del> <option value="Option1">
<del> <option value="Option2">
<del> <option value="Option3">
<del> </datalist>
<del> <input type="submit" value="Submit">
<del> <input type="color">
<del> <input type="checkbox" name="correct" value="correct">Correct
<del> </form>
<del>```
<del>
<del>Otros elementos que forman pueden contener:
<del>
<del>* `textarea` : es un cuadro multilínea que se usa con mayor frecuencia para agregar texto, por ejemplo. comentario. El tamaño del área de texto se define por el número de filas y columnas.
<del>* `select` etiqueta `select` - junto con la etiqueta `<option></option>` crea un menú de selección desplegable.
<del>* `button` : el elemento botón se puede utilizar para definir un botón en el que se puede hacer clic.
<del>
<del>MÁS INFORMACIÓN SOBRE FORMAS HTML.
<del>
<del>Los formularios HTML son necesarios cuando desea recopilar algunos datos del visitante del sitio. Por ejemplo, durante el registro de un usuario, le gustaría recopilar información como nombre, dirección de correo electrónico, tarjeta de crédito, etc.
<del>
<del>Un formulario tomará información del visitante del sitio y luego lo publicará en una aplicación de back-end como CGI, ASP Script o PHP, etc. La aplicación de back-end realizará el procesamiento requerido en los datos pasados según la lógica empresarial definida en la aplicación.
<del>
<del>Hay varios elementos de formulario disponibles como campos de texto, campos de área de texto, menús desplegables, botones de opción, casillas de verificación, etc.
<del>
<del>La etiqueta HTML `<form>` se usa para crear un formulario HTML y tiene la siguiente sintaxis:
<del>
<del>`html <form action = "Script URL" method = "GET|POST"> form elements like input, textarea etc. </form>`
<del>
<del>Si el método de formulario no está definido, por defecto será "GET".
<del>
<del>La etiqueta de formulario también puede tener un atributo llamado "destino" que especifica dónde se abrirá el enlace. Se puede abrir en la pestaña del navegador, un marco o en la ventana actual.
<del>
<del>El atributo de acción define la acción a realizar cuando se envía el formulario. Normalmente, los datos del formulario se envían a una página web en la URL del script cuando el usuario hace clic en el botón de envío. Si se omite el atributo de acción, la acción se establece en la página actual.
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/html5-audio/index.md
<del>---
<del>title: HTML5 Audio
<del>localeTitle: Audio HTML5
<del>---
<del>## Audio HTML5
<del>
<del>Antes de HTML5, los archivos de audio debían reproducirse en un navegador utilizando un complemento como Adobe Flash. El HTML
<del>
<del>El elemento se utiliza para incrustar contenido de sonido en documentos. Puede contener una o más fuentes de audio, representadas usando el atributo src o el elemento [fuente](source)
<del>
<del>El siguiente fragmento de código agrega un archivo de audio con el nombre de archivo `tutorial.ogg` o `tutorial.mp3` . los El elemento indica archivos de audio alternativos que el navegador puede elegir. El navegador utilizará el primer formato reconocido.
<del>
<del>#### Ejemplo 1
<del>
<del>```html
<del>
<del><audio controls>
<del> <source src="tutorial.ogg" type="audio/ogg">
<del> <source src="tutorial.mp3" type="audio/mpeg">
<del> Your browser does not support the audio element.
<del> </audio>
<del>```
<del>
<del>#### Ejemplo 2
<del>
<del>```html
<del>
<del><audio src="https://s3.amazonaws.com/freecodecamp/simonSound1.mp3" controls loop autoplay>
<del> </audio>
<del>```
<del>
<del>El atributo de `controls` incluye controles de audio como reproducción, pausa y volumen. Si no usa este atributo, no se mostrarán controles.
<del>
<del>El elemento `<source>` permite indicar archivos de audio alternativos entre los que el navegador puede elegir. El navegador utilizará el primer formato de reconocimiento. El texto entre las etiquetas `<audio>` y `</audio>` puede mostrarse en un navegador que no admita el elemento HTML5 `<audio>` .
<del>
<del>El atributo de reproducción automática reproducirá automáticamente su archivo de audio en segundo plano. Se considera una mejor práctica permitir que los visitantes elijan reproducir audio.
<del>
<del>El atributo de precarga indica lo que debe hacer el navegador si el reproductor no está configurado para reproducción automática.
<del>
<del>El atributo de bucle reproducirá su archivo de audio en un bucle continuo si se menciona
<del>
<del>Dado que este es html5, algunos navegadores no lo admiten. Puede comprobarlo en https://caniuse.com/#search=audio
<del>
<del>#### Más información:
<del>
<del>https://caniuse.com/#search=audio
<del>
<del>https://www.w3schools.com/html/html5\_audio.asp
<del>
<del>https://msdn.microsoft.com/en-us/library/gg589529(v=vs.85).aspx
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/html5-semantic-elements/index.md
<del>---
<del>title: HTML5 Semantic Elements
<del>localeTitle: Elementos semánticos HTML5
<del>---
<del>## Elementos semánticos HTML5
<del>
<del>Los elementos HTML semánticos describen claramente su significado de una manera humana y legible por máquina. Los elementos como `<header>` , `<footer>` y `<article>` se consideran semánticos porque describen con precisión el propósito del elemento y el tipo de contenido que está dentro de ellos.
<del>
<del>### Una historia rápida
<del>
<del>HTML fue creado originalmente como un lenguaje de marcado para describir documentos en la Internet temprana. A medida que internet creció y fue adoptado por más personas, sus necesidades cambiaron. Donde originalmente se invirtió Internet para compartir documentos científicos, ahora la gente quería compartir otras cosas también. Muy rápidamente, la gente comenzó a querer hacer que la web se vea mejor. Debido a que la web no fue diseñada inicialmente para ser diseñada, los programadores utilizaron diferentes hacks para organizar las cosas de diferentes maneras. En lugar de usar la `<table></table>` para describir información usando una tabla, los programadores los usarían para colocar otros elementos en una página. A medida que avanzaba el uso de diseños diseñados visualmente, los programadores comenzaron a usar una etiqueta genérica "no semántica" como `<div>` . A menudo, les darían a estos elementos un atributo de `class` o `id` para describir su propósito. Por ejemplo, en lugar de `<header>` esto se escribía a menudo como `<div class="header">` . Como HTML5 aún es relativamente nuevo, este uso de elementos no semánticos todavía es muy común en los sitios web de hoy.
<del>
<del>#### Lista de nuevos elementos semánticos.
<del>
<del>Los elementos semánticos agregados en HTML5 son:
<del>
<del>* `<article>`
<del>* `<aside>`
<del>* `<details>`
<del>* `<figcaption>`
<del>* `<figure>`
<del>* `<footer>`
<del>* `<header>`
<del>* `<main>`
<del>* `<mark>`
<del>* `<nav>`
<del>* `<section>`
<del>* `<summary>`
<del>* `<time>`
<del>
<del>Los elementos como `<header>` , `<nav>` , `<section>` , `<article>` , `<aside>` y `<footer>` actúan más o menos como elementos de `<div>` . Agrupan otros elementos en secciones de página. Sin embargo, cuando una etiqueta `<div>` podría contener cualquier tipo de información, es fácil identificar qué tipo de información iría en una región `<header>` semántica.
<del>
<del>**Un ejemplo de diseño de elementos semánticos por w3schools**
<del>
<del>
<del>
<del>### Beneficios de los elementos semánticos.
<del>
<del>Para ver los beneficios de los elementos semánticos, aquí hay dos piezas de código HTML. Este primer bloque de código utiliza elementos semánticos:
<del>```
<del><header></header>
<del> <section>
<del> <article>
<del> <figure>
<del> <img>
<del> <figcaption></figcaption>
<del> </figure>
<del> </article>
<del> </section>
<del> <footer></footer>
<del>```
<del>
<del>Mientras que este segundo bloque de código utiliza elementos no semánticos:
<del>```
<del><div id="header"></div>
<del> <div class="section">
<del> <div class="article">
<del> <div class="figure">
<del> <img>
<del> <div class="figcaption"></div>
<del> </div>
<del> </div>
<del> </div>
<del> <div id="footer"></div>
<del>```
<del>
<del>En primer lugar, es mucho **más fácil de leer** . Esta es probablemente la primera cosa que notará al mirar el primer bloque de código usando elementos semánticos. Este es un pequeño ejemplo, pero como programador puedes estar leyendo cientos o miles de líneas de código. Cuanto más fácil sea leer y entender ese código, más fácil será hacer su trabajo.
<del>
<del>Tiene **mayor accesibilidad** . No eres el único que encuentra elementos semánticos más fáciles de entender. Los motores de búsqueda y las tecnologías de asistencia (como los lectores de pantalla para usuarios con problemas de visión) también pueden comprender mejor el contexto y el contenido de su sitio web, lo que significa una mejor experiencia para sus usuarios.
<del>
<del>En general, los elementos semánticos también conducen a **un código** más **consistente** . Al crear un encabezado utilizando elementos no semánticos, diferentes programadores pueden escribir esto como `<div class="header">` , `<div id="header">` , `<div class="head">` , o simplemente `<div>` . Hay tantas formas de crear un elemento de encabezado y todas dependen de las preferencias personales del programador. Al crear un elemento semántico estándar, lo hace más fácil para todos.
<del>
<del>Desde octubre de 2014, HTML4 se actualizó a HTML5, junto con algunos nuevos elementos "semánticos". Hasta el día de hoy, algunos de nosotros todavía podríamos estar confundidos en cuanto a por qué tantos elementos diferentes que no parecen mostrar ningún cambio importante.
<del>
<del>#### `<section>` y `<article>`
<del>
<del>“¿Cuál es la diferencia?”, Puedes preguntar. Ambos elementos se usan para seccionar un contenido, y sí, definitivamente se pueden usar indistintamente. Es una cuestión de en qué situación. HTML4 ofreció solo un tipo de elemento contenedor, que es `<div>` . Si bien esto todavía se usa en HTML5, HTML5 nos proporcionó la `<section>` y `<article>` de una manera de reemplazar `<div>` .
<del>
<del>La `<section>` y `<article>` Los elementos son conceptualmente similares e intercambiables. Para decidir cuál de estos debe elegir, tome nota de lo siguiente:
<del>
<del>1. Un artículo está destinado a ser independientemente distribuible o reutilizable.
<del>2. Una sección es una agrupación temática de contenido.
<del>
<del>```html
<del>
<del><section>
<del> <p>Top Stories</p>
<del> <section>
<del> <p>News</p>
<del> <article>Story 1</article>
<del> <article>Story 2</article>
<del> <article>Story 3</article>
<del> </section>
<del> <section>
<del> <p>Sport</p>
<del> <article>Story 1</article>
<del> <article>Story 2</article>
<del> <article>Story 3</article>
<del> </section>
<del> </section>
<del>```
<del>
<del>#### `<header>` y `<hgroup>`
<del>
<del>El `<header>` El elemento generalmente se encuentra en la parte superior de un documento, una sección o un artículo y generalmente contiene el encabezado principal y algunas herramientas de navegación y búsqueda.
<del>
<del>```html
<del>
<del><header>
<del> <h1>Company A</h1>
<del> <ul>
<del> <li><a href="/home">Home</a></li>
<del> <li><a href="/about">About</a></li>
<del> <li><a href="/contact">Contact us</a></li>
<del> </ul>
<del> <form target="/search">
<del> <input name="q" type="search" />
<del> <input type="submit" />
<del> </form>
<del> </header>
<del>```
<del>
<del>El `<hgroup>` El elemento debe usarse donde desee un encabezado principal con uno o más subtítulos.
<del>
<del>```html
<del>
<del><hgroup>
<del> <h1>Heading 1</h1>
<del> <h2>Subheading 1</h2>
<del> <h2>Subheading 2</h2>
<del> </hgroup>
<del>```
<del>
<del>RECUERDE, que el `<header>` el elemento puede contener cualquier contenido, pero el `<hgroup>` el elemento solo puede contener otros encabezados, es decir `<h1>` a `<h6>` e incluyendo `<hgroup>` .
<del>
<del>#### `<aside>`
<del>
<del>El `<aside>` el elemento está destinado a contenido que no forma parte del flujo del texto en el que aparece, sin embargo, todavía está relacionado de alguna manera. Esto de `<aside>` como una barra lateral a su contenido principal.
<del>
<del>```html
<del>
<del><aside>
<del> <p>This is a sidebar, for example a terminology definition or a short background to a historical figure.</p>
<del> </aside>
<del>```
<del>
<del>Antes de HTML5, nuestros menús se crearon con `<ul>` y `<li>` 's. Ahora, junto con estos, podemos separar los elementos de nuestro menú con un `<nav>` , para la navegación entre tus páginas. Puede tener cualquier número de `<nav>` los elementos en una página, por ejemplo, es común tener navegación global en la parte superior (en el `<header>` ) y navegación local en una barra lateral (en un elemento `<aside>` ).
<del>
<del>```html
<del>
<del><nav>
<del> <ul>
<del> <li><a href="/home">Home</a></li>
<del> <li><a href="/about">About</a></li>
<del> <li><a href="/contact">Contact us</a></li>
<del> </ul>
<del> </nav>
<del>```
<del>
<del>#### `<footer>`
<del>
<del>Si hay un `<header>` debe haber un `<footer>` . A `<footer>` generalmente se encuentra en la parte inferior de un documento, una sección o un artículo. Al igual que el `<header>` El contenido es generalmente información de metadatos, como detalles del autor, información legal y / o enlaces a información relacionada. También es válido incluir `<section>` Elementos dentro de un pie de página.
<del>
<del>```html
<del>
<del><footer>©Company A</footer>
<del>```
<del>
<del>#### `<small>`
<del>
<del>El `<small>` el elemento aparece a menudo dentro de un `<footer>` o `<aside>` elemento que usualmente contendría información de derechos de autor o renuncias legales, y otra letra pequeña. Sin embargo, esto no pretende reducir el tamaño del texto. Simplemente está describiendo su contenido, no prescribiendo la presentación.
<del>
<del>```html
<del>
<del><footer><small>©Company A</small> Date</footer>
<del>```
<del>
<del>#### `<time>`
<del>
<del>El `<time>` element permite que una fecha ISO 8601 no ambigua se adjunte a una versión legible por humanos de esa fecha.
<del>
<del>```html
<del>
<del><time datetime="2017-10-31T11:21:00+02:00">Tuesday, 31 October 2017</time>
<del>```
<del>
<del>¿Por qué molestarse con `<time>` ? Mientras que los seres humanos pueden leer el tiempo que se puede desconcertar a través del contexto de la manera normal, las computadoras pueden leer la fecha ISO 8601 y ver la fecha, la hora y la zona horaria.
<del>
<del>#### `<figure>` y `<figcaption>`
<del>
<del>`<figure>` es para envolver el contenido de la imagen a su alrededor, y `<figcaption>` Es para subtitular tu imagen.
<del>
<del>```html
<del>
<del><figure>
<del> <img src="https://en.wikipedia.org/wiki/File:Shadow_of_Mordor_cover_art.jpg" alt="Shadow of Mordor" />
<del> <figcaption>Cover art for Middle-earth: Shadow of Mordor</figcaption>
<del> </figure>
<del>```
<del>
<del>### Aprenda más sobre los nuevos elementos HTML5:
<del>
<del>* [w3schools](https://www.w3schools.com/html/html5_semantic_elements.asp) proporciona descripciones simples y claras de muchos de los elementos de noticias y cómo / dónde deben usarse.
<del>* [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element) también proporciona una gran referencia para todos los elementos HTML y profundiza en cada uno de ellos.
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/html5-video/index.md
<del>---
<del>title: HTML5 Video
<del>localeTitle: Video HTML5
<del>---
<del>## Video HTML5
<del>
<del>Antes de HTML5, para poder reproducir un video en una página web, debe usar un complemento, como Adobe Flash Player. Con la introducción de HTML5, ahora puede colocarlo directamente en la propia página. El HTML La etiqueta se utiliza para incrustar vídeo en documentos web. Puede contener una o más fuentes de video, representadas usando el atributo src o el elemento [fuente](source) .
<del>
<del>Para incrustar el archivo de video en la página web, solo agregue este fragmento de código y cambie la fuente del archivo de audio.
<del>
<del>\`\` \`html Su navegador no soporta el elemento de vídeo. Por favor, actualízalo a la última versión.
<del>```
<del>The controls attribute includes video controls, similar to play, pause, and volume.
<del>
<del> This feature is supported by all modern/updated browsers. However, not all support the same video file format. My recommendation for a wide range of compatibilty is MP4, as it is the most widely accepted format. There are also two other formats (WebM and Ogg) that are supported in Chrome, Firefox, and Opera.
<del>
<del> The <source> element enables you to indicate alternative video files which the browser may choose from. The browser will utilize the first recognized format.
<del> In HTML5, there are 3 supported video formats: MP4, WebM, and Ogg.
<del>
<del> The text between the <video> and </video> tags will only be displayed in browsers that do not support the <video> element.
<del> Since this is html5, some browsers do not support it. You can check the support at https://caniuse.com/#search=audio.
<del>
<del>
<del> There are several different elements of the video tag, many of these explanations are based on Mozilla's web docs (linked below). There are even more if you click the link at the bottom.
<del>
<del> #### autoplay
<del>
<del> "autoplay" can be set to either true or false. You set it to true by adding it into the tag, if it is not present in the tag it is set to false. If set to true, the video will begin playing as soon as enough of the video has buffered for it to be able to play. Many people find autoplaying videos as disruptive or annoying so use this feature sparingly. Also note, that some mobile browsers, such as Safari for iOS, ignore this attribute.
<del>```
<del>
<del>html
<del>
<del>
<del>```
<del>#### poster
<del>
<del> The "poster" attribute is the image that shows on the video until the user clicks to play it.
<del>```
<del>
<del>html
<del>
<del>
<del>```
<del>#### controls
<del>
<del> The "controls" attribute can be set to true or false and will handle whether controls such as the play/pause button or volume slider appear. You set it to true by adding it into the tag, if it is not present in the tag it is set to false.
<del>```
<del>
<del>html
<del>
<del>
<del>
<del>\`\` \`
<del>
<del>Se pueden agregar muchos más atributos que son opcionales para personalizar el reproductor de video en la página. Para obtener más información, haga clic en los enlaces de abajo.
<del>
<del>## Más información:
<del>
<del>* [W3Schools - Vídeo HTML5](https://www.w3schools.com/html/html5_video.asp)
<del>* [Mozilla documentos web - Video](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video)
<del>* [Wikipedia - HTML5 Video](https://en.wikipedia.org/wiki/HTML5_video)
<del>* [HTML5 Rocks - HTML5 Video](https://www.html5rocks.com/en/tutorials/video/basics/)
<del>* [¿Puedo usar el video?](https://caniuse.com/#search=video)
<del>* [Cómo usar HTML5 para reproducir archivos de video en tu página web](https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/samples/hh924821(v=vs.85))
<ide>\ No newline at end of file
<ide><path>mock-guide/spanish/html/html5-web-storage/index.md
<del>---
<del>title: HTML5 Web Storage
<del>localeTitle: Almacenamiento web HTML5
<del>---
<del>## Almacenamiento web HTML5
<del>
<del>El almacenamiento web permite que las aplicaciones web almacenen hasta 5 MB de información en el almacenamiento del navegador por origen (por dominio y protocolo).
<del>
<del>### Tipos de almacenamiento web
<del>
<del>Hay dos objetos para almacenar datos en el cliente:
<del>
<del>`window.localStorage` : almacena datos sin fecha de caducidad y vive hasta que se eliminan.
<del>
<del>```javascript
<del>// Store Item
<del> localStorage.setItem("foo", "bar");
<del>
<del> // Get Item
<del> localStorage.getItem("foo"); //returns "bar"
<del>```
<del>
<del>`window.sessionStorage` : almacena datos para una sesión, donde los datos se pierden cuando se cierra la pestaña navegador / navegador.
<del>
<del>```javascript
<del>// Store Item
<del> sessionStorage.setItem("foo", "bar");
<del>
<del> // Get Item
<del> sessionStorage.getItem("foo"); //returns "bar"
<del>```
<del>
<del>Dado que la implementación actual solo admite asignaciones de cadena a cadena, debe serializar y deserializar otras estructuras de datos.
<del>
<del>Puede hacerlo utilizando JSON.stringify () y JSON.parse ().
<del>
<del>Por ejemplo, para el JSON dado
<del>```
<del>var jsonObject = { 'one': 1, 'two': 2, 'three': 3 };
<del>```
<del>
<del>Primero convertimos el objeto JSON en cadena y guardamos en el almacenamiento local:
<del>```
<del>localStorage.setItem('jsonObjectString', JSON.stringify(jsonObject));
<del>```
<del>
<del>Para obtener el objeto JSON de la cadena almacenada en el almacenamiento local:
<del>```
<del>var jsonObject = JSON.parse(localStorage.getItem('jsonObjectString'));
<del>```
<del>
<del>#### Más información:
<del>
<del>[MDN](https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage) [Rocas HTML5](https://www.html5rocks.com/en/features/storage) [Escuelas w3](https://www.w3schools.com/html/html5_webstorage.asp)
<ide>\ No newline at end of file | 300 |
Text | Text | add documentation for activations and objectives | 0eddec222ee1a68d613a8ecfb4f5ee2ef41de188 | <ide><path>docs/sources/activations.md
<add># Activations
<add>
<add>## Usage of activations
<add>
<add>Activations can either be used through an `Activation` layer, or through the `activation` argument supported by all forward layers:
<add>
<add>```python
<add>from keras.layers.core import Activation, Dense
<add>
<add>model.add(Dense(64, 64, init='uniform'))
<add>model.add(Activation('tanh'))
<add>```
<add>is equivalent to:
<add>```python
<add>model.add(Dense(20, 64, init='uniform', activation='tanh'))
<add>```
<add>
<add>You can also pass an element-wise Theano function as an activation:
<add>
<add>```python
<add>def tanh(x):
<add> return theano.tensor.tanh(x)
<add>
<add>model.add(Dense(20, 64, init='uniform', activation=tanh))
<add>model.add(Activation(tanh))
<add>```
<add>
<add>## Available activations
<add>
<add>- __softmax__: Should only be applied to 2D layers (expected shape: `(nb_samples, nb_dims)`).
<add>- __time_distributed_softmax__: Softmax applied to every sample at every timestep of a layer of shape `(nb_samples, nb_timesteps, nb_dims)`.
<add>- __softplus__
<add>- __relu__
<add>- __tanh__
<add>- __sigmoid__
<add>- __hard_sigmoid__
<add>- __linear__
<add>
<add>## On Advanced Activations
<add>
<add>Activations that are more complex than a simple Theano function (eg. learnable activations, configurable activations, etc.) are available as [Advanced Activation layers](/layers/advanced_activations), and can be found in the module `keras.layers.advanced_activations`. These include PReLU and LeakyReLU.
<ide>\ No newline at end of file
<ide><path>docs/sources/examples.md
<ide> ## Examples
<ide>
<add>Here are a few examples to get you started!
<add>
<ide> ### Multilayer Perceptron (MLP):
<ide>
<ide> ```python
<ide><path>docs/sources/objectives.md
<add># Objectives
<add>
<add>## Usage of objectives
<add>
<add>An objective function (or loss function, or optimization score function) is one of the two parameters required to compile a model:
<add>
<add>```python
<add>model.compile(loss='mean_squared_error', optimizer='sgd')
<add>```
<add>
<add>You can either pass the name of an existing objective, or pass a Theano symbolic function that returns a scalar and takes the following two arguments:
<add>
<add>- __y_true__: True labels. Theano tensor.
<add>- __y_pred__: Predictions. Theano tensor of the same shape as y_true.
<add>
<add>For a few examples of such functions, check out the [objectives source](https://github.com/fchollet/keras/blob/master/keras/objectives.py).
<add>
<add>## Available objectives
<add>
<add>- __mean_squared_error__ / __mse__
<add>- __mean_absolute_error__ / __mae__
<add>- __squared_hinge__
<add>- __hinge__
<add>- __binary_crossentropy__: Also known as logloss.
<add>- __categorical_crossentropy__: Also known as multiclass logloss. __Note__: using this objective requires that your labels are binary arrays of shape `(nb_samples, nb_classes)`.
<ide>\ No newline at end of file
<ide><path>docs/sources/optimizers.md
<ide> Note: this is base class for building optimizers, not an actual optimizer that c
<ide>
<ide> `keras.optimizers.Adagrad(lr=0.01, epsilon=1e-6)` [[source](https://github.com/fchollet/keras/blob/master/keras/optimizers.py)]
<ide>
<del>It is recommended to leave the parameters of this optimizer at their default value.
<add>It is recommended to leave the parameters of this optimizer at their default values.
<ide>
<ide> - __lr__: float >= 0. Learning rate.
<ide> - __epsilon__: float >= 0.
<ide> It is recommended to leave the parameters of this optimizer at their default val
<ide>
<ide> `keras.optimizers.Adadelta(lr=1.0, rho=0.95, epsilon=1e-6)` [[source](https://github.com/fchollet/keras/blob/master/keras/optimizers.py)]
<ide>
<del>It is recommended to leave the parameters of this optimizer at their default value.
<add>It is recommended to leave the parameters of this optimizer at their default values.
<ide>
<ide> - __lr__: float >= 0. Learning rate. It is recommended to leave it at the default value.
<ide> - __rho__: float >= 0.
<ide> For more info, see *"Adadelta: an adaptive learning rate method"* by Matthew Zei
<ide>
<ide> `keras.optimizers.RMSprop(lr=0.001, rho=0.9, epsilon=1e-6)` [[source](https://github.com/fchollet/keras/blob/master/keras/optimizers.py)]
<ide>
<del>It is recommended to leave the parameters of this optimizer at their default value.
<add>It is recommended to leave the parameters of this optimizer at their default values.
<ide>
<ide> - __lr__: float >= 0. Learning rate.
<ide> - __rho__: float >= 0. | 4 |
Javascript | Javascript | eliminate redundancy of deferred.then() | 412d910697f7c33a29066009930e1373fd80b27a | <ide><path>src/deferred.js
<ide> jQuery.extend({
<ide> return jQuery.Deferred(function( newDefer ) {
<ide> jQuery.each( tuples, function( i, tuple ) {
<ide> var action = tuple[ 0 ],
<del> fn = fns[ i ];
<add> fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
<ide> // deferred[ done | fail | progress ] for forwarding actions to newDefer
<del> deferred[ tuple[1] ]( jQuery.isFunction( fn ) ?
<del> function() {
<del> var returned = fn.apply( this, arguments );
<del> if ( returned && jQuery.isFunction( returned.promise ) ) {
<del> returned.promise()
<del> .done( newDefer.resolve )
<del> .fail( newDefer.reject )
<del> .progress( newDefer.notify );
<del> } else {
<del> newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, [ returned ] );
<del> }
<del> } :
<del> function() {
<del> newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, arguments );
<add> deferred[ tuple[1] ](function() {
<add> var returned = fn && fn.apply( this, arguments );
<add> if ( returned && jQuery.isFunction( returned.promise ) ) {
<add> returned.promise()
<add> .done( newDefer.resolve )
<add> .fail( newDefer.reject )
<add> .progress( newDefer.notify );
<add> } else {
<add> newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );
<ide> }
<del> );
<add> });
<ide> });
<ide> fns = null;
<ide> }).promise(); | 1 |
Python | Python | fix one small error in test(all=1) | f5df20ee8a938f8504ed23cd5dc8913e01219f5d | <ide><path>numpy/ma/tests/test_old_ma.py
<ide> import types, time
<ide> from numpy.ma import *
<ide> from numpy.core.numerictypes import float32
<add>from numpy.ma.core import umath
<ide> from numpy.testing import NumpyTestCase, NumpyTest
<ide> pi = numpy.pi
<ide> def eq(v,w, msg=''): | 1 |
PHP | PHP | remove extra whitespace | 527fa04661cc9557158269691fd8e37f1cf2ffb4 | <ide><path>src/Mailer/Mailer.php
<ide> * The onRegistration method converts the application event into a mailer method.
<ide> * Our mailer could either be registered in the application bootstrap, or
<ide> * in the Table class' initialize() hook.
<del> *
<add> *
<ide> * @method Email to($email = null, $name = null)
<ide> * @method Email from($email = null, $name = null)
<ide> * @method Email sender($email = null, $name = null) | 1 |
Python | Python | add new module numpy.f2py.symbolic | 96e63aaf5c2720c4adc6c4440f2732ee6a73b260 | <ide><path>numpy/f2py/crackfortran.py
<ide> # As the needed functions cannot be determined by static inspection of the
<ide> # code, it is safest to use import * pending a major refactoring of f2py.
<ide> from .auxfuncs import *
<del>from .symbolic import Expr, Language
<ide> from . import symbolic
<ide>
<ide> f2py_version = __version__.version
<ide> def analyzevars(block):
<ide> if len(dl) == 1 and dl[0] != star:
<ide> dl = ['1', dl[0]]
<ide> if len(dl) == 2:
<del> d1, d2 = map(Expr.parse, dl)
<add> d1, d2 = map(symbolic.Expr.parse, dl)
<ide> dsize = d2 - d1 + 1
<del> d = dsize.tostring(language=Language.C)
<add> d = dsize.tostring(language=symbolic.Language.C)
<ide> # find variables v that define d as a linear
<ide> # function, `d == a * v + b`, and store
<ide> # coefficients a and b for further analysis.
<ide> def analyzevars(block):
<ide> is_required = False
<ide> init = solver(symbolic.as_symbol(
<ide> f'shape({n}, {i})'))
<del> init = init.tostring(language=Language.C)
<add> init = init.tostring(
<add> language=symbolic.Language.C)
<ide> vars[v]['='] = init
<ide> # n needs to be initialzed before v. So,
<ide> # making v dependent on n and on any
<ide><path>numpy/tests/test_public_api.py
<ide> def test_NPY_NO_EXPORT():
<ide> "f2py.f90mod_rules",
<ide> "f2py.func2subr",
<ide> "f2py.rules",
<add> "f2py.symbolic",
<ide> "f2py.use_rules",
<ide> "fft.helper",
<ide> "lib.arraypad", | 2 |
PHP | PHP | fix tests for cli runner | 15d01bf901c3c3451f7a1d36f9b7ef6e3ec1e7ba | <ide><path>lib/Cake/Test/Case/BasicsTest.php
<ide> public function testDebug() {
<ide> * @return void
<ide> */
<ide> public function testPr() {
<add> $this->skipIf(php_sapi_name() == 'cli', 'Skipping web test in cli mode');
<ide> ob_start();
<ide> pr('this is a test');
<ide> $result = ob_get_clean();
<ide> public function testPr() {
<ide> $this->assertEquals($expected, $result);
<ide> }
<ide>
<add>/**
<add> * test pr()
<add> *
<add> * @return void
<add> */
<add> public function testPrCli() {
<add> $this->skipIf(php_sapi_name() != 'cli', 'Skipping cli test in web mode');
<add> ob_start();
<add> pr('this is a test');
<add> $result = ob_get_clean();
<add> $expected = "\nthis is a test\n";
<add> $this->assertEquals($expected, $result);
<add>
<add> ob_start();
<add> pr(array('this' => 'is', 'a' => 'test'));
<add> $result = ob_get_clean();
<add> $expected = "\nArray\n(\n [this] => is\n [a] => test\n)\n\n";
<add> $this->assertEquals($expected, $result);
<add> }
<add>
<ide> /**
<ide> * test stripslashes_deep()
<ide> * | 1 |
Text | Text | add link to first mention of d3.map | c5b9069d4ee0af7cbf99edbad42fc2a81df2d4d0 | <ide><path>CHANGES.md
<ide> var yields = [
<ide> var sites = d3.set(yields, function(d) { return d.site; }); // Grand Rapids, Duluth, Waseca, Crookston, Morris
<ide> ```
<ide>
<del>The d3.map constructor also follows the standard array accessor argument pattern.
<add>The [d3.map](https://github.com/d3/d3-collection#map) constructor also follows the standard array accessor argument pattern.
<ide>
<ide> The *map*.forEach and *set*.forEach methods have been renamed to [*map*.each](https://github.com/d3/d3-collection#map_each) and [*set*.each](https://github.com/d3/d3-collection#set_each) respectively. The order of arguments for *map*.each has also been changed to *value*, *key* and *map*, while the order of arguments for *set*.each is now *value*, *value* and *set*. This is closer to ES6 [*map*.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/forEach) and [*set*.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/forEach). Also like ES6 Map and Set, *map*.set and *set*.add now return the current collection (rather than the added value) to facilitate method chaining. New [*map*.clear](https://github.com/d3/d3-collection#map_clear) and [*set*.clear](https://github.com/d3/d3-collection#set_clear) methods can be used to empty collections.
<ide> | 1 |
Text | Text | remove line break between badges (#330) | 9950ee73a3b8b45c98d095b880bf1ca4c257a2b8 | <ide><path>README.md
<ide>
<ide> [](https://travis-ci.org/zeit/next.js)
<ide> [](https://coveralls.io/r/zeit/next.js?branch=master)
<del>
<ide> [](https://zeit.chat)
<ide>
<ide> Next.js is a minimalistic framework for server-rendered React applications. | 1 |
Python | Python | add meaniou metric | 4de37bcb4aaf32cd60b9046eb75ecf3598c6cba0 | <ide><path>keras/metrics.py
<ide> def clone_metrics(metrics):
<ide> mape = MAPE = mean_absolute_percentage_error
<ide> msle = MSLE = mean_squared_logarithmic_error
<ide> cosine = cosine_similarity = cosine_proximity
<del>MeanIoU = K.MeanIoU
<add>if K.backend() == 'tensorflow':
<add> MeanIoU = K.MeanIoU
<ide>
<ide>
<ide> def serialize(metric): | 1 |
Ruby | Ruby | fix configuration names | 3c9a28d6e4a56e4aae475dbf6051e4ee33150bba | <ide><path>lib/active_vault/railtie.rb
<ide>
<ide> module ActiveVault
<ide> class Railtie < Rails::Railtie # :nodoc:
<del> config.action_file = ActiveSupport::OrderedOptions.new
<add> config.active_vault = ActiveSupport::OrderedOptions.new
<ide>
<ide> config.eager_load_namespaces << ActiveVault
<ide>
<del> initializer "action_file.routes" do
<add> initializer "active_vault.routes" do
<ide> require "active_vault/disk_controller"
<ide>
<ide> config.after_initialize do |app|
<ide> class Railtie < Rails::Railtie # :nodoc:
<ide> end
<ide> end
<ide>
<del> initializer "action_file.attached" do
<add> initializer "active_vault.attached" do
<ide> require "active_vault/attached"
<ide>
<ide> ActiveSupport.on_load(:active_record) do | 1 |
Python | Python | fix logic in handling of dtype in append_fields | 3b8cf12ee19994389ae3261666dd32cced4787be | <ide><path>numpy/lib/recfunctions.py
<ide> def append_fields(base, names, data=None, dtypes=None,
<ide> if dtypes is None:
<ide> data = [np.array(a, copy=False, subok=True) for a in data]
<ide> data = [a.view([(name, a.dtype)]) for (name, a) in zip(names, data)]
<del> elif not hasattr(dtypes, '__iter__'):
<del> dtypes = [dtypes, ]
<add> else :
<add> if not hasattr(dtypes, '__iter__'):
<add> dtypes = [dtypes, ]
<add>
<ide> if len(data) != len(dtypes):
<ide> if len(dtypes) == 1:
<ide> dtypes = dtypes * len(data) | 1 |
Python | Python | move some tests and add some new ones | 5eb8a3e812d74fdd54a98f01570ae5d3391c915c | <ide><path>test/storage/test_s3.py
<ide> import unittest
<ide>
<ide> from libcloud.common.types import InvalidCredsError
<add>from libcloud.common.types import LibcloudError
<ide> from libcloud.storage.base import Container, Object
<ide> from libcloud.storage.types import ContainerDoesNotExistError
<ide> from libcloud.storage.types import ContainerIsNotEmptyError
<ide> from libcloud.storage.drivers.s3 import S3EUWestStorageDriver
<ide> from libcloud.storage.drivers.s3 import S3APSEStorageDriver
<ide> from libcloud.storage.drivers.s3 import S3APNEStorageDriver
<add>from libcloud.storage.drivers.dummy import DummyIterator
<ide>
<ide> from test import MockHttp, MockRawResponse # pylint: disable-msg=E0611
<ide> from test.file_fixtures import StorageFileFixtures # pylint: disable-msg=E0611
<ide> def test_invalid_credts(self):
<ide> else:
<ide> self.fail('Exception was not thrown')
<ide>
<add> def test_bucket_is_located_in_different_region(self):
<add> S3MockHttp.type = 'DIFFERENT_REGION'
<add> try:
<add> self.driver.list_containers()
<add> except LibcloudError:
<add> pass
<add> else:
<add> self.fail('Exception was not thrown')
<add>
<ide> def test_get_meta_data(self):
<ide> try:
<ide> self.driver.get_meta_data()
<ide> def test_get_meta_data(self):
<ide> else:
<ide> self.fail('Exception was not thrown')
<ide>
<del> def test_list_containers(self):
<add> def test_list_containers_empty(self):
<ide> S3MockHttp.type = 'list_containers_EMPTY'
<ide> containers = self.driver.list_containers()
<ide> self.assertEqual(len(containers), 0)
<ide>
<add> def test_list_containers(self):
<ide> S3MockHttp.type = 'list_containers'
<ide> containers = self.driver.list_containers()
<ide> self.assertEqual(len(containers), 2)
<ide>
<ide> self.assertTrue('creation_date' in containers[1].extra)
<ide>
<del> def test_list_container_objects(self):
<add> def test_list_container_objects_empty(self):
<ide> S3MockHttp.type = 'EMPTY'
<ide> container = Container(name='test_container', extra={},
<ide> driver=self.driver)
<ide> objects = self.driver.list_container_objects(container=container)
<ide> self.assertEqual(len(objects), 0)
<ide>
<add> def test_list_container_objects(self):
<ide> S3MockHttp.type = None
<add> container = Container(name='test_container', extra={},
<add> driver=self.driver)
<ide> objects = self.driver.list_container_objects(container=container)
<ide> self.assertEqual(len(objects), 1)
<ide>
<ide> def test_list_container_objects(self):
<ide> self.assertEqual(obj.container.name, 'test_container')
<ide> self.assertTrue('owner' in obj.meta_data)
<ide>
<del> def test_get_container(self):
<add> def test_get_container_doesnt_exist(self):
<ide> S3MockHttp.type = 'list_containers'
<del>
<ide> try:
<del> container = self.driver.get_container(container_name='container1')
<add> self.driver.get_container(container_name='container1')
<ide> except ContainerDoesNotExistError:
<ide> pass
<ide> else:
<ide> self.fail('Exception was not thrown')
<ide>
<add> def test_get_container(self):
<add> S3MockHttp.type = 'list_containers'
<ide> container = self.driver.get_container(container_name='test1')
<ide> self.assertTrue(container.name, 'test1')
<ide>
<del> def test_get_object(self):
<add> def test_get_object_container_doesnt_exist(self):
<ide> # This method makes two requests which makes mocking the response a bit
<ide> # trickier
<ide> S3MockHttp.type = 'list_containers'
<del>
<ide> try:
<del> obj = self.driver.get_object(container_name='test-inexistent',
<del> object_name='test')
<add> self.driver.get_object(container_name='test-inexistent',
<add> object_name='test')
<ide> except ContainerDoesNotExistError:
<ide> pass
<ide> else:
<ide> self.fail('Exception was not thrown')
<ide>
<add> def test_get_object(self):
<add> # This method makes two requests which makes mocking the response a bit
<add> # trickier
<add> S3MockHttp.type = 'list_containers'
<ide> obj = self.driver.get_object(container_name='test2',
<ide> object_name='test')
<ide>
<ide> def test_get_object(self):
<ide> self.assertEqual(obj.size, 12345)
<ide> self.assertEqual(obj.hash, 'e31208wqsdoj329jd')
<ide>
<del> def test_create_container(self):
<add> def test_create_container_invalid_name(self):
<ide> # invalid container name
<ide> S3MockHttp.type = 'INVALID_NAME'
<ide> try:
<ide> def test_create_container(self):
<ide> else:
<ide> self.fail('Exception was not thrown')
<ide>
<add> def test_create_container_already_exists(self):
<ide> # container with this name already exists
<ide> S3MockHttp.type = 'ALREADY_EXISTS'
<ide> try:
<ide> def test_create_container(self):
<ide> else:
<ide> self.fail('Exception was not thrown')
<ide>
<add> def test_create_container(self):
<ide> # success
<ide> S3MockHttp.type = None
<ide> container = self.driver.create_container(container_name='new_container')
<ide> self.assertEqual(container.name, 'new_container')
<ide>
<del> def test_delete_container(self):
<add> def test_delete_container_doesnt_exist(self):
<ide> container = Container(name='new_container', extra=None, driver=self)
<del>
<ide> S3MockHttp.type = 'DOESNT_EXIST'
<del> # does not exist
<ide> try:
<ide> self.driver.delete_container(container=container)
<ide> except ContainerDoesNotExistError:
<ide> pass
<ide> else:
<ide> self.fail('Exception was not thrown')
<ide>
<del> # container is not empty
<add> def test_delete_container_not_empty(self):
<add> container = Container(name='new_container', extra=None, driver=self)
<ide> S3MockHttp.type = 'NOT_EMPTY'
<ide> try:
<ide> self.driver.delete_container(container=container)
<ide> def test_delete_container(self):
<ide> S3MockHttp.type = None
<ide> self.assertTrue(self.driver.delete_container(container=container))
<ide>
<add> def test_delete_container(self):
<add> # success
<add> container = Container(name='new_container', extra=None, driver=self)
<add> S3MockHttp.type = None
<add> self.assertTrue(self.driver.delete_container(container=container))
<add>
<add> def test_upload_object(self):
<add> pass
<add>
<add> def test_upload_object_via_stream(self):
<add> try:
<add> container = Container(name='foo_bar_container', extra={}, driver=self)
<add> object_name = 'foo_test_stream_data'
<add> iterator = DummyIterator(data=['2', '3', '5'])
<add> self.driver.upload_object_via_stream(container=container,
<add> object_name=object_name,
<add> iterator=iterator)
<add> except NotImplementedError:
<add> pass
<add> else:
<add> self.fail('Exception was not thrown')
<add>
<add> def test_delete_object(self):
<add> container = Container(name='foo_bar_container', extra={}, driver=self)
<add> result = self.driver.delete_container(container=container)
<add> self.assertTrue(result)
<add>
<add> def test_delete_container_not_found(self):
<add> S3MockHttp.type = 'NOT_FOUND'
<add> container = Container(name='foo_bar_container', extra={}, driver=self)
<add> try:
<add> self.driver.delete_container(container=container)
<add> except ContainerDoesNotExistError:
<add> pass
<add> else:
<add> self.fail('Container does not exist but an exception was not thrown')
<add>
<ide> class S3USWestTests(S3Tests):
<ide> def setUp(self):
<ide> S3USWestStorageDriver.connectionCls.conn_classes = (None, S3MockHttp)
<ide> def _UNAUTHORIZED(self, method, url, body, headers):
<ide> self.base_headers,
<ide> httplib.responses[httplib.OK])
<ide>
<add> def _DIFFERENT_REGION(self, method, url, body, headers):
<add> return (httplib.MOVED_PERMANENTLY,
<add> '',
<add> self.base_headers,
<add> httplib.responses[httplib.OK])
<add>
<ide> def _list_containers_EMPTY(self, method, url, body, headers):
<ide> body = self.fixtures.load('list_containers_empty.xml')
<ide> return (httplib.OK,
<ide> def _new_container_NOT_EMPTY(self, method, url, body, headers):
<ide> headers,
<ide> httplib.responses[httplib.OK])
<ide>
<add> def _foo_bar_container(self, method, url, body, headers):
<add> # test_delete_container
<add> return (httplib.NO_CONTENT,
<add> body,
<add> headers,
<add> httplib.responses[httplib.OK])
<add>
<add> def _foo_bar_container_NOT_FOUND(self, method, url, body, headers):
<add> # test_delete_container_not_found
<add> return (httplib.NOT_FOUND,
<add> body,
<add> headers,
<add> httplib.responses[httplib.OK])
<add>
<ide> class S3MockRawResponse(MockRawResponse):
<ide>
<ide> fixtures = StorageFileFixtures('s3') | 1 |
Javascript | Javascript | fix permanent deoptimizations | e9c02c6762dd5fe9664e5972b8e6307e6da8e68f | <ide><path>lib/_stream_readable.js
<ide> Readable.prototype.unpipe = function(dest) {
<ide> }
<ide>
<ide> // try to find the right one.
<del> const index = state.pipes.indexOf(dest);
<add> var index = state.pipes.indexOf(dest);
<ide> if (index === -1)
<ide> return this;
<ide> | 1 |
Ruby | Ruby | fix upsert method comment | ab6da0c4a88480d932051f0a2f6dc0c96593d948 | <ide><path>activerecord/lib/active_record/persistence.rb
<ide> def insert_all!(attributes, returning: nil)
<ide> InsertAll.new(self, attributes, on_duplicate: :raise, returning: returning).execute
<ide> end
<ide>
<del> # Updates or inserts (upserts) multiple records into the database in a
<add> # Updates or inserts (upserts) a single record into the database in a
<ide> # single SQL INSERT statement. It does not instantiate any models nor does
<ide> # it trigger Active Record callbacks or validations. Though passed values
<ide> # go through Active Record's type casting and serialization. | 1 |
Ruby | Ruby | fix typo in formula.rb | c4972e218f0fbea3deae73e9af3efb2ae1cecf18 | <ide><path>Library/Homebrew/formula.rb
<ide> def self.class name
<ide> end
<ide>
<ide> def self.path name
<del> Pathanme.new(HOMEBREW_PREFIX)+'Formula'+(name.downcase+'.rb')
<add> Pathname.new(HOMEBREW_PREFIX)+'Library'+'Formula'+(name.downcase+'.rb')
<ide> end
<ide>
<ide> def self.create name | 1 |
Javascript | Javascript | add `kemptyobject` to internal/util | a9b1fd3987fae5ad5340859a6088b86179b576c5 | <ide><path>lib/internal/util.js
<ide> const {
<ide> ObjectGetOwnPropertyDescriptor,
<ide> ObjectGetOwnPropertyDescriptors,
<ide> ObjectGetPrototypeOf,
<add> ObjectFreeze,
<ide> ObjectSetPrototypeOf,
<ide> Promise,
<ide> ReflectApply,
<ide> const lazyDOMException = hideStackFrames((message, name) => {
<ide> const kEnumerableProperty = ObjectCreate(null);
<ide> kEnumerableProperty.enumerable = true;
<ide>
<add>const kEmptyObject = ObjectFreeze(ObjectCreate(null));
<add>
<ide> module.exports = {
<ide> assertCrypto,
<ide> cachedResult,
<ide> module.exports = {
<ide> kIsEncodingSymbol: Symbol('kIsEncodingSymbol'),
<ide> kVmBreakFirstLineSymbol: Symbol('kVmBreakFirstLineSymbol'),
<ide>
<add> kEmptyObject,
<ide> kEnumerableProperty,
<ide> };
<ide><path>test/parallel/test-internal-util-objects.js
<add>// Flags: --expose-internals
<add>'use strict';
<add>require('../common');
<add>
<add>// Test helper objects from internal/util
<add>
<add>const assert = require('assert');
<add>const {
<add> kEnumerableProperty,
<add> kEmptyObject,
<add>} = require('internal/util');
<add>
<add>Object.prototype.blep = 'blop';
<add>
<add>{
<add> assert.strictEqual(
<add> kEnumerableProperty.blep,
<add> undefined
<add> );
<add> assert.strictEqual(
<add> kEnumerableProperty.enumerable,
<add> true
<add> );
<add> assert.strictEqual(
<add> Object.getPrototypeOf(kEnumerableProperty),
<add> null
<add> );
<add> assert.deepStrictEqual(
<add> Object.getOwnPropertyNames(kEnumerableProperty),
<add> [ 'enumerable' ]
<add> );
<add>}
<add>
<add>{
<add> assert.strictEqual(
<add> kEmptyObject.blep,
<add> undefined
<add> );
<add> assert.strictEqual(
<add> kEmptyObject.prototype,
<add> undefined
<add> );
<add> assert.strictEqual(
<add> Object.getPrototypeOf(kEmptyObject),
<add> null
<add> );
<add> assert.strictEqual(
<add> kEmptyObject instanceof Object,
<add> false
<add> );
<add> assert.deepStrictEqual(
<add> Object.getOwnPropertyDescriptors(kEmptyObject),
<add> {}
<add> );
<add> assert.deepStrictEqual(
<add> Object.getOwnPropertyNames(kEmptyObject),
<add> []
<add> );
<add> assert.deepStrictEqual(
<add> Object.getOwnPropertySymbols(kEmptyObject),
<add> []
<add> );
<add> assert.strictEqual(
<add> Object.isExtensible(kEmptyObject),
<add> false
<add> );
<add> assert.strictEqual(
<add> Object.isSealed(kEmptyObject),
<add> true
<add> );
<add> assert.strictEqual(
<add> Object.isFrozen(kEmptyObject),
<add> true
<add> );
<add>
<add> assert.throws(
<add> () => kEmptyObject.foo = 'bar',
<add> TypeError
<add> );
<add> assert.throws(
<add> () => Object.assign(kEmptyObject, { foo: 'bar' }),
<add> TypeError
<add> );
<add> assert.throws(
<add> () => Object.defineProperty(kEmptyObject, 'foo', {}),
<add> TypeError
<add> );
<add>}
<add>
<add>delete Object.prototype.blep; | 2 |
Text | Text | fix typos in doc/api/cli.md | 5ba5cc861987a3f9fd3de9dfe638af53f92a7852 | <ide><path>doc/api/cli.md
<ide> changes:
<ide>
<ide> Enable [Source Map v3][Source Map] support for stack traces.
<ide>
<del>When using a transpiler, such as TypeScript, strack traces thrown by an
<add>When using a transpiler, such as TypeScript, stack traces thrown by an
<ide> application reference the transpiled code, not the original source position.
<ide> `--enable-source-maps` enables caching of Source Maps and makes a best
<ide> effort to report stack traces relative to the original source file.
<ide>
<ide> Overriding `Error.prepareStackTrace` prevents `--enable-source-maps` from
<del>modifiying the stack trace.
<add>modifying the stack trace.
<ide>
<ide> ### `--experimental-abortcontroller`
<ide> <!-- YAML | 1 |
Text | Text | improve build script | 140be99343c23801504e443ad7ab9e747f874ccf | <ide><path>examples/README.md
<ide> If you think an example is missing, please report it as issue. :)
<ide>
<ide> # Building an Example
<del>1. Run `yarn setup` in the root of the project.
<del>2. Run `yarn link webpack` in the root of the project.
<add>1. Run `yarn` in the root of the project.
<add>2. Run `yarn setup` in the root of the project.
<ide> 3. Run `yarn add --dev webpack-cli` in the root of the project.
<ide> 4. Run `node build.js` in the specific example directory. (Ex: `cd examples/commonjs && node build.js`)
<ide> | 1 |
PHP | PHP | correct greedy replace | 9e0e19c5acaf00f5310a501d96687e9415c40dd2 | <ide><path>lib/Cake/bootstrap.php
<ide> /**
<ide> * Path to the application's libs directory.
<ide> */
<del> define('APPCAKE', APP.'Lib'.DS);
<add> define('APPLIBS', APP.'Lib'.DS);
<ide>
<ide> /**
<ide> * Path to the configuration files directory. | 1 |
Javascript | Javascript | allow empty json response | 9ba24c54d60e643b1450cc5cfa8f990bd524c130 | <ide><path>src/ng/http.js
<ide> function $HttpProvider() {
<ide> function transformResponse(response) {
<ide> // make a copy since the response must be cacheable
<ide> var resp = extend({}, response);
<del> if(config.method === 'HEAD'){
<add> if (!response.data) {
<ide> resp.data = response.data;
<ide> } else {
<ide> resp.data = transformData(response.data, response.headers, config.transformResponse);
<ide><path>test/ng/httpSpec.js
<ide> describe('$http', function() {
<ide> expect(callback.mostRecentCall.args[0]).toEqual('');
<ide> });
<ide>
<add> it('should not attempt to deserialize json for an empty response whose header contains application/json', function(){
<add> //per http spec for Content-Type, HEAD request should return a Content-Type header
<add> //set to what the content type would have been if a get was sent
<add> $httpBackend.expect('GET', '/url').respond('', {'Content-Type': 'application/json'});
<add> $http({method: 'GET', url: '/url'}).success(callback);
<add> $httpBackend.flush();
<add>
<add> expect(callback).toHaveBeenCalledOnce();
<add> expect(callback.mostRecentCall.args[0]).toEqual('');
<add> });
<ide>
<ide> it('should not deserialize tpl beginning with ng expression', function() {
<ide> $httpBackend.expect('GET', '/url').respond('{{some}}'); | 2 |
Go | Go | correct some daemon spelling mistakes | 906974b185b431a8c493479f748677f3c0bc4ca3 | <ide><path>daemon/monitor.go
<ide> func (m *containerMonitor) Start() error {
<ide> }
<ide>
<ide> // resetMonitor resets the stateful fields on the containerMonitor based on the
<del>// previous runs success or failure. Reguardless of success, if the container had
<add>// previous runs success or failure. Regardless of success, if the container had
<ide> // an execution time of more than 10s then reset the timer back to the default
<ide> func (m *containerMonitor) resetMonitor(successful bool) {
<ide> executionTime := time.Now().Sub(m.lastStartTime).Seconds()
<ide><path>integration-cli/docker_cli_daemon_test.go
<ide> func TestDaemonKeyMigration(t *testing.T) {
<ide> }
<ide>
<ide> // Simulate an older daemon (pre 1.3) coming up with volumes specified in containers
<del>// without corrosponding volume json
<add>// without corresponding volume json
<ide> func TestDaemonUpgradeWithVolumes(t *testing.T) {
<ide> d := NewDaemon(t)
<ide>
<ide><path>integration-cli/docker_cli_exec_test.go
<ide> func TestExecAfterDaemonRestart(t *testing.T) {
<ide> logDone("exec - exec running container after daemon restart")
<ide> }
<ide>
<del>// Regresssion test for #9155, #9044
<add>// Regression test for #9155, #9044
<ide> func TestExecEnv(t *testing.T) {
<ide> defer deleteAllContainers()
<ide> | 3 |
Text | Text | update security section of readme | 60b8f08d3d71b531f13e52037c019ae451654a0b | <ide><path>README.md
<ide> If you're confident it's a new bug and have confirmed that someone else is facin
<ide>
<ide> ### Reporting Security Issues and Responsible Disclosure
<ide>
<del>If you think you have found a vulnerability, _please report responsibly_. Don't create GitHub issues for security issues. Instead, please send an email to `security@freecodecamp.org` and we'll look into it immediately.
<del>
<del>We appreciate any responsible disclosure of vulnerabilities that might impact the integrity of our platforms and users. While we do not offer any bounties or swags at the moment, we'll be happy to list your name in our [Hall of Fame](https://contribute.freecodecamp.org/#/security-hall-of-fame) for security researchers.
<add>[Our security policy is available here.](https://contribute.freecodecamp.org/#/security)
<ide>
<ide> ### Contributing
<ide> | 1 |
Ruby | Ruby | remove unused code | 24b75fc40c59bf987630286b1f4007b2688834b6 | <ide><path>activesupport/lib/active_support/callbacks.rb
<ide> module Callbacks
<ide> #
<ide> # Calls the before and around callbacks in the order they were set, yields
<ide> # the block (if given one), and then runs the after callbacks in reverse order.
<del> # Optionally accepts a key, which will be used to compile an optimized callback
<del> # method for each key. See +ClassMethods.define_callbacks+ for more information.
<ide> #
<ide> # If the callback chain was halted, returns +false+. Otherwise returns the result
<ide> # of the block, or +true+ if no block is given.
<ide> module Callbacks
<ide> # end
<ide> #
<ide> def run_callbacks(kind, key = nil, &block)
<del> self.class.__run_callbacks(key, kind, self, &block)
<add> #TODO: deprecate key argument
<add> self.class.__run_callbacks(kind, self, &block)
<ide> end
<ide>
<ide> private
<ide> def initialize(chain, filter, kind, options, klass)
<ide>
<ide> @raw_filter, @options = filter, options
<ide> @filter = _compile_filter(filter)
<del> @compiled_options = _compile_options(options)
<del> @callback_id = next_id
<add> recompile_options!
<ide> end
<ide>
<ide> def deprecate_per_key_option(options)
<ide> def recompile!(_options)
<ide> deprecate_per_key_option(_options)
<ide> _update_filter(self.options, _options)
<ide>
<del> @callback_id = next_id
<del> @filter = _compile_filter(@raw_filter)
<del> @compiled_options = _compile_options(@options)
<add> recompile_options!
<ide> end
<ide>
<ide> # Wraps code with filter
<del> def apply(code, key=nil, object=nil)
<add> def apply(code)
<ide> case @kind
<ide> when :before
<ide> <<-RUBY_EVAL
<ide> def #{name}(halted)
<ide> # Options support the same options as filters themselves (and support
<ide> # symbols, string, procs, and objects), so compile a conditional
<ide> # expression based on the options
<del> def _compile_options(options)
<add> def recompile_options!
<ide> conditions = ["true"]
<ide>
<ide> unless options[:if].empty?
<ide> def _compile_options(options)
<ide> conditions << Array(_compile_filter(options[:unless])).map {|f| "!#{f}"}
<ide> end
<ide>
<del> conditions.flatten.join(" && ")
<add> @compiled_options = conditions.flatten.join(" && ")
<ide> end
<ide>
<ide> # Filters support:
<ide> def initialize(name, config)
<ide> }.merge(config)
<ide> end
<ide>
<del> def compile(key=nil, object=nil)
<add> def compile
<ide> method = []
<ide> method << "value = nil"
<ide> method << "halted = false"
<ide>
<ide> callbacks = yielding
<ide> reverse_each do |callback|
<del> callbacks = callback.apply(callbacks, key, object)
<add> callbacks = callback.apply(callbacks)
<ide> end
<ide> method << callbacks
<ide>
<ide> def yielding
<ide>
<ide> module ClassMethods
<ide>
<del> # This method runs callback chain for the given key.
<del> # If this called first time it creates a new callback method for the key.
<add> # This method runs callback chain for the given kind.
<add> # If this called first time it creates a new callback method for the kind.
<ide> # This generated method plays caching role.
<ide> #
<del> def __run_callbacks(key, kind, object, &blk) #:nodoc:
<add> def __run_callbacks(kind, object, &blk) #:nodoc:
<ide> name = __callback_runner_name(kind)
<ide> unless object.respond_to?(name)
<del> str = object.send("_#{kind}_callbacks").compile(key, object)
<add> str = object.send("_#{kind}_callbacks").compile
<ide> class_eval <<-RUBY_EVAL, __FILE__, __LINE__ + 1
<ide> def #{name}() #{str} end
<ide> protected :#{name} | 1 |
Javascript | Javascript | fix the node warnings that show up during build | 4949586a76e0dd2baf47f519219011bd36dc52fa | <ide><path>docs/src/ngdoc.js
<ide> function Doc(text, file, line) {
<ide> this.links = this.links || [];
<ide> }
<ide> Doc.METADATA_IGNORE = (function() {
<del> var words = require('fs').readFileSync(__dirname + '/ignore.words', 'utf8');
<add> var words = fs.readFileSync(__dirname + '/ignore.words', 'utf8');
<ide> return words.toString().split(/[,\s\n\r]+/gm);
<ide> })();
<ide> | 1 |
Javascript | Javascript | remove warning in 'sys' - too aggressive | 6ce007e89a54084edd42e44a85a0c46702ad6639 | <ide><path>lib/sys.js
<ide> var util = require("util");
<ide> var sysWarning;
<ide> if (!sysWarning) {
<ide> sysWarning = "The 'sys' module is now called 'util'. It should have a similar interface.";
<del> util.error(sysWarning);
<add> // Uncomment in 2011
<add> //util.error(sysWarning);
<ide> }
<ide>
<ide> exports.print = util.print;
<ide> exports.p = util.p;
<ide> exports.log = util.log;
<ide> exports.exec = util.exec;
<ide> exports.pump = util.pump;
<del>exports.inherits = util.inherits;
<ide>\ No newline at end of file
<add>exports.inherits = util.inherits; | 1 |
Javascript | Javascript | use a set for module.chunks | e8bc9c2b3b121d97d9040d76856a4f33f75d56a3 | <ide><path>lib/Compilation.js
<ide> class Compilation extends Tapable {
<ide> if(err) return callback(err);
<ide> deps.forEach(d => {
<ide> if(d.module && d.module.removeReason(module, d)) {
<del> module.chunks.forEach(chunk => {
<add> module.forEachChunk(chunk => {
<ide> if(!d.module.hasReasonForChunk(chunk)) {
<ide> if(d.module.removeChunk(chunk)) {
<ide> this.removeChunkFromDependencies(d.module, chunk);
<ide><path>lib/Module.js
<ide> */
<ide> "use strict";
<ide>
<add>const util = require("util");
<ide> const DependenciesBlock = require("./DependenciesBlock");
<ide> const ModuleReason = require("./ModuleReason");
<ide> const Template = require("./Template");
<ide> class Module extends DependenciesBlock {
<ide> this.used = null;
<ide> this.usedExports = null;
<ide> this.providedExports = null;
<del> this.chunks = [];
<add> this._chunks = new Set();
<add> this._chunksIsSorted = true;
<add> this._chunksDebugIdent = undefined;
<ide> this.warnings = [];
<ide> this.dependenciesWarnings = [];
<ide> this.errors = [];
<ide> class Module extends DependenciesBlock {
<ide> this.used = null;
<ide> this.usedExports = null;
<ide> this.providedExports = null;
<del> this.chunks.length = 0;
<add> this._chunks.clear();
<add> this._chunksDebugIdent = undefined;
<add> this._chunksIsSorted = false;
<ide> super.disconnect();
<ide> }
<ide>
<ide> class Module extends DependenciesBlock {
<ide> this.index = null;
<ide> this.index2 = null;
<ide> this.depth = null;
<del> this.chunks.length = 0;
<add> this._chunks.clear();
<add> this._chunksDebugIdent = undefined;
<add> this._chunksIsSorted = false;
<ide> super.unseal();
<ide> }
<ide>
<ide> addChunk(chunk) {
<del> let idx = this.chunks.indexOf(chunk);
<del> if(idx < 0)
<del> this.chunks.push(chunk);
<add> this._chunks.add(chunk);
<add> this._chunksDebugIdent = undefined;
<add> this._chunksIsSorted = false;
<ide> }
<ide>
<ide> removeChunk(chunk) {
<del> let idx = this.chunks.indexOf(chunk);
<del> if(idx >= 0) {
<del> this.chunks.splice(idx, 1);
<add> if(this._chunks.delete(chunk)) {
<add> this._chunksDebugIdent = undefined;
<ide> chunk.removeModule(this);
<ide> return true;
<ide> }
<ide> return false;
<ide> }
<ide>
<add> isInChunk(chunk) {
<add> return this._chunks.has(chunk);
<add> }
<add>
<add> getChunkIdsIdent() {
<add> if(this._chunksDebugIdent !== undefined) return this._chunksDebugIdent;
<add> this._ensureChunksSorted();
<add> const chunks = this._chunks;
<add> const list = [];
<add> for(let chunk of chunks) {
<add> const debugId = chunk.debugId;
<add>
<add> if(typeof debugId !== "number") {
<add> return this._chunksDebugIdent = null;
<add> }
<add>
<add> list.push(debugId);
<add> }
<add>
<add> return this._chunksDebugIdent = list.join(",");
<add> }
<add>
<add> forEachChunk(fn) {
<add> this._chunks.forEach(fn);
<add> }
<add>
<add> mapChunks(fn) {
<add> const chunks = this._chunks;
<add> const size = chunks.size;
<add> const array = new Array(size);
<add> let idx = 0;
<add> for(let chunk of chunks) {
<add> array[idx++] = fn(chunk, idx, chunks);
<add> }
<add> return array;
<add> }
<add>
<add> getNumberOfChunks() {
<add> return this._chunks.size;
<add> }
<add>
<add> _ensureChunksSorted() {
<add> if(this._chunksIsSorted) return;
<add> this._chunks = new Set(Array.from(this._chunks).sort(byId));
<add> this._chunksIsSorted = true;
<add> }
<add>
<ide> addReason(module, dependency) {
<ide> this.reasons.push(new ModuleReason(module, dependency));
<ide> }
<ide> class Module extends DependenciesBlock {
<ide> if(r.chunks) {
<ide> if(r.chunks.indexOf(chunk) >= 0)
<ide> return true;
<del> } else if(r.module.chunks.indexOf(chunk) >= 0)
<add> } else if(r.module._chunks.has(chunk))
<ide> return true;
<ide> }
<ide> return false;
<ide> class Module extends DependenciesBlock {
<ide> rewriteChunkInReasons(oldChunk, newChunks) {
<ide> this.reasons.forEach(r => {
<ide> if(!r.chunks) {
<del> if(r.module.chunks.indexOf(oldChunk) < 0)
<add> if(!r.module._chunks.has(oldChunk))
<ide> return;
<del> r.chunks = r.module.chunks;
<add> r.chunks = Array.from(r.module._chunks);
<ide> }
<ide> r.chunks = r.chunks.reduce((arr, c) => {
<ide> addToSet(arr, c !== oldChunk ? [c] : newChunks);
<ide> class Module extends DependenciesBlock {
<ide>
<ide> sortItems() {
<ide> super.sortItems();
<del> this.chunks.sort(byId);
<add> this._ensureChunksSorted();
<ide> this.reasons.sort((a, b) => byId(a.module, b.module));
<ide> }
<ide>
<ide> Object.defineProperty(Module.prototype, "entry", {
<ide> throw new Error("Module.entry was removed. Use Chunk.entryModule");
<ide> }
<ide> });
<add>
<add>Object.defineProperty(Module.prototype, "chunks", {
<add> configurable: false,
<add> get: util.deprecate(() => {
<add> return Array.from(this._chunks);
<add> }, "Module.chunks: Use Module.forEachChunk/mapChunks/getNumberOfChunks/isInChunk/addChunk/removeChunk instead"),
<add> set() {
<add> throw new Error("Readonly. Use Module.addChunk/removeChunk to modify chunks.");
<add> }
<add>});
<add>
<ide> Module.prototype.identifier = null;
<ide> Module.prototype.readableIdentifier = null;
<ide> Module.prototype.build = null;
<ide><path>lib/ModuleFilenameHelpers.js
<ide> ModuleFilenameHelpers.createFooter = function createFooter(module, requestShorte
<ide> "// WEBPACK FOOTER",
<ide> `// ${module.readableIdentifier(requestShortener)}`,
<ide> `// module id = ${module.id}`,
<del> `// module chunks = ${module.chunks.map(c => c.id).join(" ")}`
<add> `// module chunks = ${module.mapChunks(c => c.id).join(" ")}`
<ide> ].join("\n");
<ide> }
<ide> };
<ide><path>lib/Stats.js
<ide> class Stats {
<ide> built: !!module.built,
<ide> optional: !!module.optional,
<ide> prefetched: !!module.prefetched,
<del> chunks: module.chunks.map(chunk => chunk.id),
<add> chunks: module.mapChunks(chunk => chunk.id),
<ide> assets: Object.keys(module.assets || {}),
<ide> issuer: module.issuer && module.issuer.identifier(),
<ide> issuerId: module.issuer && module.issuer.id,
<ide><path>lib/optimize/OccurrenceOrderPlugin.js
<ide> class OccurrenceOrderPlugin {
<ide> compiler.plugin("compilation", (compilation) => {
<ide> compilation.plugin("optimize-module-order", (modules) => {
<ide> function entryChunks(m) {
<del> return m.chunks.map((c) => {
<add> let total = 0;
<add> m.forEachChunk(c => {
<ide> const sum = (c.isInitial() ? 1 : 0) + (c.entryModule === m ? 1 : 0);
<del> return sum;
<del> }).reduce((a, b) => {
<del> return a + b;
<del> }, 0);
<add> total += sum;
<add> });
<add> return total;
<ide> }
<ide>
<ide> function occursInEntry(m) {
<ide> class OccurrenceOrderPlugin {
<ide>
<ide> function occurs(m) {
<ide> if(typeof m.__OccurenceOrderPlugin_occurs === "number") return m.__OccurenceOrderPlugin_occurs;
<add> let numberEntry = 0;
<add> m.forEachChunk(c => {
<add> if(c.entryModule === m)
<add> numberEntry++;
<add> });
<ide> const result = m.reasons.map((r) => {
<ide> if(!r.module) return 0;
<del> return r.module.chunks.length;
<add> return r.module.getNumberOfChunks();
<ide> }).reduce((a, b) => {
<ide> return a + b;
<del> }, 0) + m.chunks.length + m.chunks.filter((c) => {
<del> return c.entryModule === m;
<del> }).length;
<add> }, 0) + m.getNumberOfChunks() + numberEntry;
<ide> return m.__OccurenceOrderPlugin_occurs = result;
<ide> }
<ide> modules.sort((a, b) => {
<ide><path>lib/optimize/RemoveParentModulesPlugin.js
<ide> */
<ide> "use strict";
<ide>
<del>function chunkContainsModule(chunk, module) {
<del> const chunks = module.chunks;
<del> const modules = chunk.modules;
<del> if(chunks.length < modules.length) {
<del> return chunks.indexOf(chunk) >= 0;
<del> } else {
<del> return modules.indexOf(module) >= 0;
<del> }
<del>}
<del>
<ide> function hasModule(chunk, module, checkedChunks) {
<del> if(chunkContainsModule(chunk, module)) return [chunk];
<add> if(module.isInChunk(chunk)) return [chunk];
<ide> if(chunk.parents.length === 0) return false;
<ide> return allHaveModule(chunk.parents.filter((c) => {
<ide> return checkedChunks.indexOf(c) < 0;
<ide> function allHaveModule(someChunks, module, checkedChunks) {
<ide> return chunks;
<ide> }
<ide>
<del>function debugIds(chunks) {
<del> var list = [];
<del> for(var i = 0; i < chunks.length; i++) {
<del> var debugId = chunks[i].debugId;
<del>
<del> if(typeof debugId !== "number") {
<del> return "no";
<del> }
<del>
<del> list.push(debugId);
<del> }
<del>
<del> list.sort();
<del> return list.join(",");
<del>}
<ide>
<ide> class RemoveParentModulesPlugin {
<ide> apply(compiler) {
<ide> class RemoveParentModulesPlugin {
<ide> for(var i = 0; i < modules.length; i++) {
<ide> var module = modules[i];
<ide>
<del> var dId = debugIds(module.chunks);
<add> var dId = module.getChunkIdsIdent();
<ide> var parentChunksWithModule;
<del> if((dId in cache) && dId !== "no") {
<add> if(dId !== null && (dId in cache)) {
<ide> parentChunksWithModule = cache[dId];
<ide> } else {
<ide> parentChunksWithModule = cache[dId] = allHaveModule(chunk.parents, module); | 6 |
Ruby | Ruby | match domain language | 2571d1a8491169ab3ef78eec5b891f782a533496 | <ide><path>lib/active_file/blob.rb
<ide> require "active_file/site"
<ide>
<del># Schema: id, key, filename, content_type, metadata, byte_size, digest, created_at
<add># Schema: id, key, filename, content_type, metadata, byte_size, checksum, created_at
<ide> class ActiveFile::Blob < ActiveRecord::Base
<ide> self.table_name = "active_file_blobs"
<ide>
<ide><path>lib/active_file/migration.rb
<ide> def change
<ide> t.string :filename
<ide> t.string :content_type
<ide> t.integer :byte_size
<del> t.string :digest
<add> t.string :checksum
<ide> t.time :created_at
<ide>
<ide> t.index [ :token ], unique: true | 2 |
Ruby | Ruby | manage sandbox test resources in setup/teardown | ba26567b0309d70030df9929d949c7988b250c4c | <ide><path>Library/Homebrew/test/test_sandbox.rb
<ide> class SandboxTest < Homebrew::TestCase
<ide> def setup
<ide> skip "sandbox not implemented" unless Sandbox.available?
<add> @sandbox = Sandbox.new
<add> @dir = Pathname.new(Dir.mktmpdir)
<add> @file = @dir/"foo"
<add> end
<add>
<add> def teardown
<add> @dir.rmtree
<ide> end
<ide>
<ide> def test_allow_write
<del> s = Sandbox.new
<del> testpath = Pathname.new(TEST_TMPDIR)
<del> foo = testpath/"foo"
<del> s.allow_write foo
<del> s.exec "touch", foo
<del> assert_predicate foo, :exist?
<del> foo.unlink
<add> @sandbox.allow_write @file
<add> @sandbox.exec "touch", @file
<add> assert_predicate @file, :exist?
<ide> end
<ide>
<ide> def test_deny_write
<del> s = Sandbox.new
<del> testpath = Pathname.new(TEST_TMPDIR)
<del> bar = testpath/"bar"
<ide> shutup do
<del> assert_raises(ErrorDuringExecution) { s.exec "touch", bar }
<add> assert_raises(ErrorDuringExecution) { @sandbox.exec "touch", @file }
<ide> end
<del> refute_predicate bar, :exist?
<add> refute_predicate @file, :exist?
<ide> end
<ide> end | 1 |
PHP | PHP | convert percentage sign in fallback filename | 5ac66a8c341d659d61d128d52cc79f5a0de66219 | <ide><path>src/Illuminate/Filesystem/FilesystemAdapter.php
<ide> public function response($path, $name = null, array $headers = [], $disposition
<ide> $filename = $name ?? basename($path);
<ide>
<ide> $disposition = $response->headers->makeDisposition(
<del> $disposition, $filename, Str::ascii($filename)
<add> $disposition, $filename, $this->fallbackName($filename)
<ide> );
<ide>
<ide> $response->headers->replace($headers + [
<ide> public function download($path, $name = null, array $headers = [])
<ide> {
<ide> return $this->response($path, $name, $headers, 'attachment');
<ide> }
<add>
<add> /**
<add> * Convert the string to ASCII characters that are equivalent to the given name.
<add> *
<add> * @param string $name
<add> * @return string
<add> */
<add> protected function fallbackName($name)
<add> {
<add> return str_replace('%', '', Str::ascii($name));
<add> }
<ide>
<ide> /**
<ide> * Write the contents of a file. | 1 |
PHP | PHP | use short widget names instead of fqcn | c154d4eaffc58408103e8f277803ec0f49d972e1 | <ide><path>src/View/Helper/FormHelper.php
<ide> class FormHelper extends Helper
<ide> * @var array
<ide> */
<ide> protected $_defaultWidgets = [
<del> 'button' => ['Cake\View\Widget\ButtonWidget'],
<del> 'checkbox' => ['Cake\View\Widget\CheckboxWidget'],
<del> 'file' => ['Cake\View\Widget\FileWidget'],
<del> 'label' => ['Cake\View\Widget\LabelWidget'],
<del> 'nestingLabel' => ['Cake\View\Widget\NestingLabelWidget'],
<del> 'multicheckbox' => ['Cake\View\Widget\MultiCheckboxWidget', 'nestingLabel'],
<del> 'radio' => ['Cake\View\Widget\RadioWidget', 'nestingLabel'],
<del> 'select' => ['Cake\View\Widget\SelectBoxWidget'],
<del> 'textarea' => ['Cake\View\Widget\TextareaWidget'],
<del> 'datetime' => ['Cake\View\Widget\DateTimeWidget', 'select'],
<del> '_default' => ['Cake\View\Widget\BasicWidget'],
<add> 'button' => ['Button'],
<add> 'checkbox' => ['Checkbox'],
<add> 'file' => ['File'],
<add> 'label' => ['Label'],
<add> 'nestingLabel' => ['NestingLabel'],
<add> 'multicheckbox' => ['MultiCheckbox', 'nestingLabel'],
<add> 'radio' => ['Radio', 'nestingLabel'],
<add> 'select' => ['SelectBox'],
<add> 'textarea' => ['Textarea'],
<add> 'datetime' => ['DateTime', 'select'],
<add> '_default' => ['Basic'],
<ide> ];
<ide>
<ide> /** | 1 |
Go | Go | add regression test from @crosbymichael | 2b5386f039b5c99cf0f64fb3091cc14e4446dc64 | <ide><path>utils_test.go
<ide> func TestMergeConfig(t *testing.T) {
<ide> }
<ide> }
<ide> }
<add>
<add>func TestMergeConfigPublicPortNotHonored(t *testing.T) {
<add> volumesImage := make(map[string]struct{})
<add> volumesImage["/test1"] = struct{}{}
<add> volumesImage["/test2"] = struct{}{}
<add> configImage := &Config{
<add> Dns: []string{"1.1.1.1", "2.2.2.2"},
<add> PortSpecs: []string{"1111", "2222"},
<add> Env: []string{"VAR1=1", "VAR2=2"},
<add> Volumes: volumesImage,
<add> }
<add>
<add> volumesUser := make(map[string]struct{})
<add> volumesUser["/test3"] = struct{}{}
<add> configUser := &Config{
<add> Dns: []string{"3.3.3.3"},
<add> PortSpecs: []string{"1111:3333"},
<add> Env: []string{"VAR2=3", "VAR3=3"},
<add> Volumes: volumesUser,
<add> }
<add>
<add> MergeConfig(configUser, configImage)
<add>
<add> contains := func(a []string, expect string) bool {
<add> for _, p := range a {
<add> if p == expect {
<add> return true
<add> }
<add> }
<add> return false
<add> }
<add>
<add> if !contains(configUser.PortSpecs, "2222") {
<add> t.Logf("Expected '2222' Ports: %v", configUser.PortSpecs)
<add> t.Fail()
<add> }
<add>
<add> if !contains(configUser.PortSpecs, "1111:3333") {
<add> t.Logf("Expected '1111:3333' Ports: %v", configUser.PortSpecs)
<add> t.Fail()
<add> }
<add>} | 1 |
PHP | PHP | consolidate doc block descriptions | 01086798af68a193f2c0a37cf0ffa770ace9d77e | <ide><path>src/Database/Type.php
<ide> class Type implements TypeInterface
<ide>
<ide> /**
<ide> * List of basic type mappings, used to avoid having to instantiate a class
<del> * for doing conversion on these
<add> * for doing conversion on these.
<ide> *
<ide> * @var array
<ide> * @deprecated 3.1 All types will now use a specific class
<ide> class Type implements TypeInterface
<ide> ];
<ide>
<ide> /**
<del> * Contains a map of type object instances to be reused if needed
<add> * Contains a map of type object instances to be reused if needed.
<ide> *
<ide> * @var array
<ide> */
<ide> public function __construct($name = null)
<ide> }
<ide>
<ide> /**
<del> * Returns a Type object capable of converting a type identified by $name
<add> * Returns a Type object capable of converting a type identified by name.
<ide> *
<ide> * @param string $name type identifier
<ide> * @throws \InvalidArgumentException If type identifier is unknown
<ide> public static function build($name)
<ide> }
<ide>
<ide> /**
<del> * Returns an arrays with all the mapped type objects, indexed by name
<add> * Returns an arrays with all the mapped type objects, indexed by name.
<ide> *
<ide> * @return array
<ide> */
<ide> public static function set($name, Type $instance)
<ide> * If called with no arguments it will return current types map array
<ide> * If $className is omitted it will return mapped class for $type
<ide> *
<del> * @param string|string[]|\Cake\Database\Type[]|null $type if string name of type to map, if array list of arrays to be mapped
<add> * @param string|string[]|\Cake\Database\Type[]|null $type If string name of type to map, if array list of arrays to be mapped
<ide> * @param string|\Cake\Database\Type|null $className The classname or object instance of it to register.
<ide> * @return array|string|null If $type is null then array with current map, if $className is null string
<ide> * configured class name for give $type, null otherwise
<ide> public function toDatabase($value, Driver $driver)
<ide> /**
<ide> * Casts given value from a database type to PHP equivalent
<ide> *
<del> * @param mixed $value value to be converted to PHP equivalent
<del> * @param \Cake\Database\Driver $driver object from which database preferences and configuration will be extracted
<add> * @param mixed $value Value to be converted to PHP equivalent
<add> * @param \Cake\Database\Driver $driver Object from which database preferences and configuration will be extracted
<ide> * @return mixed
<ide> */
<ide> public function toPHP($value, Driver $driver)
<ide> public function toPHP($value, Driver $driver)
<ide> * Checks whether this type is a basic one and can be converted using a callback
<ide> * If it is, returns converted value
<ide> *
<del> * @param mixed $value value to be converted to PHP equivalent
<add> * @param mixed $value Value to be converted to PHP equivalent
<ide> * @return mixed
<ide> * @deprecated 3.1 All types should now be a specific class
<ide> */ | 1 |
PHP | PHP | define the protocol property on the response | 1bf62e02fd5788c917289b0b321633f3d64d22d7 | <ide><path>src/Http/Client/Response.php
<ide> */
<ide> class Response extends Message
<ide> {
<add> /**
<add> * This is temporary until the response is made PSR7 compliant as well.
<add> *
<add> * @var string
<add> */
<add> protected $protocol = '1.1';
<ide>
<ide> /**
<ide> * The status code of the response.
<ide> protected function _parseHeaders($headers)
<ide> foreach ($headers as $key => $value) {
<ide> if (substr($value, 0, 5) === 'HTTP/') {
<ide> preg_match('/HTTP\/([\d.]+) ([0-9]+)/i', $value, $matches);
<del> $this->_version = $matches[1];
<add> $this->protocol = $matches[1];
<ide> $this->_code = $matches[2];
<ide> continue;
<ide> } | 1 |
Python | Python | add note to memleak tests | 588cfa9c91c841f4bb3f5a9c91d1c1331f5b8ad3 | <ide><path>tests/test_regression.py
<ide> def __exit__(self, exc_type, exc_value, tb):
<ide> gc.enable()
<ide>
<ide>
<add># XXX: untitaker: These tests need to be revised. They broke around the time we
<add># ported Flask to Python 3.
<ide> @pytest.mark.skipif(os.environ.get('RUN_FLASK_MEMORY_TESTS') != '1',
<ide> reason='Turned off due to envvar.')
<ide> class TestMemory(object): | 1 |
Ruby | Ruby | improve the task to generate the release summary | e91bf5966e9f6f58bc0ea9e92f94b9d892ef29bc | <ide><path>tasks/release.rb
<ide> end
<ide> end
<ide>
<del> task :release_summary do
<del> (FRAMEWORKS + ["guides"]).each do |fw|
<del> puts "## #{fw}"
<add> task :release_summary, [:base_release] do |_, args|
<add> release_regexp = args[:base_release] ? Regexp.escape(args[:base_release]) : /\d+\.\d+\.\d+/
<add>
<add> FRAMEWORKS.each do |fw|
<add> puts "## #{FRAMEWORK_NAMES[fw]}"
<ide> fname = File.join fw, "CHANGELOG.md"
<ide> contents = File.readlines fname
<ide> contents.shift
<ide> changes = []
<del> changes << contents.shift until contents.first =~ /^\*Rails \d+\.\d+\.\d+/
<del> puts changes.reject { |change| change.strip.empty? }.join
<add> until contents.first =~ /^## Rails #{release_regexp}.*$/
<add> changes << contents.shift
<add> end
<add>
<add> puts changes.join
<ide> puts
<ide> end
<ide> end | 1 |
Text | Text | update binary locations | 371dd7feec38ffda3c140dc0afae1b10fc5311c4 | <ide><path>docs/Homebrew-and-Python.md
<ide> Homebrew provides formulae to brew 3.x and a more up-to-date Python 2.7.x.
<ide> Homebrew provides one formula for Python 3.x (`python`) and another for Python 2.7.x (`python@2`).
<ide>
<ide> The executables are organized as follows so that Python 2 and Python 3 can both be installed without conflict:
<del>* `python` and `python3` point to Homebrew's Python 3.x (if installed) otherwise the macOS system Python
<add>* `python3` points to Homebrew's Python 3.x (if installed)
<ide> * `python2` points to Homebrew's Python 2.7.x (if installed)
<del>* `pip` and `pip3` point to Homebrew's Python 3.x's pip (if installed)
<del>* `pip2` points to Homebrew's Python 2.7.x's pip (if installed)
<add>* `python` points to Homebrew's Python 2.7.x (if installed) otherwise the macOS system Python. Check out `brew info python` if you wish to add Homebrew's 3.x `python` to your `PATH`.
<add>* `pip3` points to Homebrew's Python 3.x's pip (if installed)
<add>* `pip` and `pip2` point to Homebrew's Python 2.7.x's pip (if installed)
<ide>
<ide> ([Wondering which one to choose?](https://wiki.python.org/moin/Python2orPython3))
<ide> | 1 |
Javascript | Javascript | make tab completion work on non-objects | a118f2172880d338101f80647437b8832ac1f768 | <ide><path>lib/repl.js
<ide> REPLServer.prototype.complete = function(line, callback) {
<ide> }
<ide> // works for non-objects
<ide> try {
<del> var p = Object.getPrototypeOf(obj);
<ide> var sentinel = 5;
<add> var p;
<add> if (typeof obj == 'object') {
<add> p = Object.getPrototypeOf(obj);
<add> } else {
<add> p = obj.constructor ? obj.constructor.prototype : null;
<add> }
<ide> while (p !== null) {
<ide> memberGroups.push(Object.getOwnPropertyNames(p));
<ide> p = Object.getPrototypeOf(p);
<ide><path>test/simple/test-repl-tab-complete.js
<ide> testMe.complete('inner.o', function(error, data) {
<ide> assert.deepEqual(data, doesNotBreak);
<ide> });
<ide>
<add>putIn.run(['.clear']);
<add>
<add>// make sure tab completion works on non-Objects
<add>putIn.run([
<add> 'var str = "test";'
<add>]);
<add>testMe.complete('str.len', function(error, data) {
<add> assert.deepEqual(data, [ [ 'str.length' ], 'str.len' ]);
<add>}); | 2 |
Javascript | Javascript | update metamorph to latest version | f701bff1e4eb52112e7b125f034e1bb68acdb6d8 | <ide><path>packages/metamorph/lib/main.js
<ide>
<ide> var K = function(){},
<ide> guid = 0,
<add> document = window.document,
<ide>
<ide> // Feature-detect the W3C range API
<ide> supportsRange = ('createRange' in document);
<ide> if (this instanceof Metamorph) {
<ide> self = this;
<ide> } else {
<del> self = new K;
<add> self = new K();
<ide> }
<ide>
<ide> self.innerHTML = html;
<ide> *
<ide> * We need to do this because innerHTML in IE does not really parse the nodes.
<ide> **/
<del> function firstNodeFor(parentNode, html) {
<add> var firstNodeFor = function(parentNode, html) {
<ide> var arr = wrapMap[parentNode.tagName.toLowerCase()] || wrapMap._default;
<ide> var depth = arr[0], start = arr[1], end = arr[2];
<ide>
<ide> }
<ide>
<ide> return element;
<del> }
<add> };
<ide>
<ide> /**
<ide> * Internet Explorer does not allow setting innerHTML if the first element
<ide> * node and use *it* as the marker.
<ide> **/
<ide> var realNode = function(start) {
<del> while (start.parentNode.tagName == "") {
<add> while (start.parentNode.tagName === "") {
<ide> start = start.parentNode;
<ide> }
<ide>
<ide>
<ide> // remove all of the nodes after the starting placeholder and
<ide> // before the ending placeholder.
<add> node = start.nextSibling;
<ide> while (node) {
<ide> nextSibling = node.nextSibling;
<ide> last = node === end; | 1 |
Text | Text | add note about preloading to routing introduction. | b874bc7f821f8cb39d888fdb94b66405abcd0eb1 | <ide><path>docs/routing/introduction.md
<ide> In the example above we have multiple links, each one maps a path (`href`) to a
<ide> - `/about` → `pages/about.js`
<ide> - `/blog/hello-world` → `pages/blog/[slug].js`
<ide>
<add>Any `<Link />` in the viewport (initially or through scroll) will be prefetched by default (including the corresponding data) for pages using [Static Generation](/docs/basic-features/data-fetching.md#getstaticprops-static-generation). The corresponding data for [server-rendered](https://nextjs.org/docs/basic-features/data-fetching#getserversideprops-server-side-rendering) routes is _not_ prefetched.
<add>
<ide> ### Linking to dynamic paths
<ide>
<ide> You can also use interpolation to create the path, which comes in handy for [dynamic route segments](#dynamic-route-segments). For example, to show a list of posts which have been passed to the component as a prop: | 1 |
Ruby | Ruby | remove unused variable | 80714aaa7cd6278c5864e31b068a5d017ba6baed | <ide><path>Library/Homebrew/cmd/uses.rb
<ide> def uses
<ide> deps.any? { |dep| dep.to_formula.name == ff.name } ||
<ide> f.requirements.any? { |req| req.name == ff.name }
<ide> end
<del> rescue FormulaUnavailableError => e
<add> rescue FormulaUnavailableError
<ide> # Silently ignore this case as we don't care about things used in
<ide> # taps that aren't currently tapped.
<ide> end | 1 |
Ruby | Ruby | add abstractcookiejar class | 143d047d659799acad1563c4ca902c0b7c062f6b | <ide><path>actionpack/lib/action_dispatch/middleware/cookies.rb
<ide> def write_cookie?(cookie)
<ide> end
<ide> end
<ide>
<del> class PermanentCookieJar #:nodoc:
<add> class AbstractCookieJar # :nodoc:
<ide> include ChainedCookieJars
<ide>
<ide> def initialize(parent_jar)
<ide> def initialize(parent_jar)
<ide> def [](name)
<ide> @parent_jar[name.to_s]
<ide> end
<add> end
<ide>
<add> class PermanentCookieJar < AbstractCookieJar # :nodoc:
<ide> def []=(name, options)
<ide> if options.is_a?(Hash)
<ide> options.symbolize_keys! | 1 |
Javascript | Javascript | correct support comment | 361a0d5150a1c57b1857611cde1b05bd0ef21a50 | <ide><path>src/event.js
<ide> jQuery.Event.prototype = {
<ide> // Create mouseenter/leave events using mouseover/out and event-time checks
<ide> // so that event delegation works in jQuery.
<ide> // Do the same for pointerenter/pointerleave and pointerover/pointerout
<add>//
<ide> // Support: Safari<7.0
<ide> // Safari doesn't support mouseenter/mouseleave at all.
<del>// Support: Chrome 40+
<add>//
<add>// Support: Chrome 34+
<ide> // Mouseenter doesn't perform while left mouse button is pressed
<ide> // (and initiated outside the observed element)
<ide> // https://code.google.com/p/chromium/issues/detail?id=333868 | 1 |
Ruby | Ruby | require yaml for time_with_zone isolation test | 2f26f61154292091fc988b4b5f70a0c21326ae19 | <ide><path>activesupport/test/core_ext/time_with_zone_test.rb
<ide> require 'active_support/time'
<ide> require 'time_zone_test_helpers'
<ide> require 'active_support/core_ext/string/strip'
<add>require 'yaml'
<ide>
<ide> class TimeWithZoneTest < ActiveSupport::TestCase
<ide> include TimeZoneTestHelpers | 1 |
Javascript | Javascript | add more recursive fs.rmdir() tests | 27507ca10846592a928cb3b6e7f8152d8090a24d | <ide><path>test/parallel/test-fs-rmdir-recursive.js
<ide> let count = 0;
<ide>
<ide> tmpdir.refresh();
<ide>
<del>function makeNonEmptyDirectory() {
<del> const dirname = `rmdir-recursive-${count}`;
<del> fs.mkdirSync(path.join(dirname, 'foo', 'bar', 'baz'), { recursive: true });
<add>function makeNonEmptyDirectory(depth, files, folders, dirname, createSymLinks) {
<add> fs.mkdirSync(dirname, { recursive: true });
<ide> fs.writeFileSync(path.join(dirname, 'text.txt'), 'hello', 'utf8');
<del> count++;
<del> return dirname;
<del>}
<ide>
<del>// Test the asynchronous version.
<del>{
<del> const dir = makeNonEmptyDirectory();
<add> const options = { flag: 'wx' };
<add>
<add> for (let f = files; f > 0; f--) {
<add> fs.writeFileSync(path.join(dirname, `f-${depth}-${f}`), '', options);
<add> }
<add>
<add> if (createSymLinks) {
<add> // Valid symlink
<add> fs.symlinkSync(
<add> `f-${depth}-1`,
<add> path.join(dirname, `link-${depth}-good`),
<add> 'file'
<add> );
<add>
<add> // Invalid symlink
<add> fs.symlinkSync(
<add> 'does-not-exist',
<add> path.join(dirname, `link-${depth}-bad`),
<add> 'file'
<add> );
<add> }
<add>
<add> // File with a name that looks like a glob
<add> fs.writeFileSync(path.join(dirname, '[a-z0-9].txt'), '', options);
<add>
<add> depth--;
<add> if (depth <= 0) {
<add> return;
<add> }
<add>
<add> for (let f = folders; f > 0; f--) {
<add> fs.mkdirSync(
<add> path.join(dirname, `folder-${depth}-${f}`),
<add> { recursive: true }
<add> );
<add> makeNonEmptyDirectory(
<add> depth,
<add> files,
<add> folders,
<add> path.join(dirname, `d-${depth}-${f}`),
<add> createSymLinks
<add> );
<add> }
<add>}
<ide>
<add>function removeAsync(dir) {
<ide> // Removal should fail without the recursive option.
<ide> fs.rmdir(dir, common.mustCall((err) => {
<ide> assert.strictEqual(err.syscall, 'rmdir');
<ide> function makeNonEmptyDirectory() {
<ide> }));
<ide> }
<ide>
<add>// Test the asynchronous version
<add>{
<add> // Create a 4-level folder hierarchy including symlinks
<add> let dir = `rmdir-recursive-${count}`;
<add> makeNonEmptyDirectory(4, 10, 2, dir, true);
<add> removeAsync(dir);
<add>
<add> // Create a 2-level folder hierarchy without symlinks
<add> count++;
<add> dir = `rmdir-recursive-${count}`;
<add> makeNonEmptyDirectory(2, 10, 2, dir, false);
<add> removeAsync(dir);
<add>
<add> // Create a flat folder including symlinks
<add> count++;
<add> dir = `rmdir-recursive-${count}`;
<add> makeNonEmptyDirectory(1, 10, 2, dir, true);
<add> removeAsync(dir);
<add>}
<add>
<ide> // Test the synchronous version.
<ide> {
<del> const dir = makeNonEmptyDirectory();
<add> count++;
<add> const dir = `rmdir-recursive-${count}`;
<add> makeNonEmptyDirectory(4, 10, 2, dir, true);
<ide>
<ide> // Removal should fail without the recursive option set to true.
<ide> common.expectsError(() => {
<ide> function makeNonEmptyDirectory() {
<ide>
<ide> // Test the Promises based version.
<ide> (async () => {
<del> const dir = makeNonEmptyDirectory();
<add> count++;
<add> const dir = `rmdir-recursive-${count}`;
<add> makeNonEmptyDirectory(4, 10, 2, dir, true);
<ide>
<ide> // Removal should fail without the recursive option set to true.
<ide> assert.rejects(fs.promises.rmdir(dir), { syscall: 'rmdir' }); | 1 |
Python | Python | add bits attribute to np.finfo, closes | 3071778e37112377b592b180769f0a44496dc2da | <ide><path>numpy/core/getlimits.py
<ide> class finfo(object):
<ide>
<ide> Attributes
<ide> ----------
<add> bits : int
<add> The number of bits occupied by the type.
<ide> eps : float
<ide> The smallest representable positive number such that
<ide> ``1.0 + eps != 1.0``. Type of `eps` is an appropriate floating
<ide> def _init(self, dtype):
<ide> setattr(self, word, getattr(machar, word))
<ide> for word in ['tiny', 'resolution', 'epsneg']:
<ide> setattr(self, word, getattr(machar, word).flat[0])
<add> self.bits = self.dtype.itemsize * 8
<ide> self.max = machar.huge.flat[0]
<ide> self.min = -self.max
<ide> self.eps = machar.eps.flat[0]
<ide> def __str__(self):
<ide> fmt = (
<ide> 'Machine parameters for %(dtype)s\n'
<ide> '---------------------------------------------------------------\n'
<del> 'precision=%(precision)3s resolution= %(_str_resolution)s\n'
<del> 'machep=%(machep)6s eps= %(_str_eps)s\n'
<del> 'negep =%(negep)6s epsneg= %(_str_epsneg)s\n'
<del> 'minexp=%(minexp)6s tiny= %(_str_tiny)s\n'
<del> 'maxexp=%(maxexp)6s max= %(_str_max)s\n'
<del> 'nexp =%(nexp)6s min= -max\n'
<add> 'precision = %(precision)3s resolution = %(_str_resolution)s\n'
<add> 'machep = %(machep)6s eps = %(_str_eps)s\n'
<add> 'negep = %(negep)6s epsneg = %(_str_epsneg)s\n'
<add> 'minexp = %(minexp)6s tiny = %(_str_tiny)s\n'
<add> 'maxexp = %(maxexp)6s max = %(_str_max)s\n'
<add> 'nexp = %(nexp)6s min = -max\n'
<ide> '---------------------------------------------------------------\n'
<ide> )
<ide> return fmt % self.__dict__
<ide> class iinfo(object):
<ide>
<ide> Attributes
<ide> ----------
<add> bits : int
<add> The number of bits occupied by the type.
<ide> min : int
<ide> The smallest integer expressible by the type.
<ide> max : int
<ide><path>numpy/core/tests/test_getlimits.py
<ide> def test_singleton(self,level=2):
<ide> ftype2 = finfo(longdouble)
<ide> assert_equal(id(ftype), id(ftype2))
<ide>
<add>class TestFinfo(TestCase):
<add> def test_basic(self):
<add> dts = list(zip(['f2', 'f4', 'f8', 'c8', 'c16'],
<add> [np.float16, np.float32, np.float64, np.complex64,
<add> np.complex128]))
<add> for dt1, dt2 in dts:
<add> for attr in ('bits', 'eps', 'epsneg', 'iexp', 'machar', 'machep',
<add> 'max', 'maxexp', 'min', 'minexp', 'negep', 'nexp',
<add> 'nmant', 'precision', 'resolution', 'tiny'):
<add> assert_equal(getattr(finfo(dt1), attr),
<add> getattr(finfo(dt2), attr), attr)
<add> self.assertRaises(ValueError, finfo, 'i4')
<add>
<ide> class TestIinfo(TestCase):
<ide> def test_basic(self):
<ide> dts = list(zip(['i1', 'i2', 'i4', 'i8',
<ide> 'u1', 'u2', 'u4', 'u8'],
<ide> [np.int8, np.int16, np.int32, np.int64,
<ide> np.uint8, np.uint16, np.uint32, np.uint64]))
<ide> for dt1, dt2 in dts:
<del> assert_equal(iinfo(dt1).min, iinfo(dt2).min)
<del> assert_equal(iinfo(dt1).max, iinfo(dt2).max)
<add> for attr in ('bits', 'min', 'max'):
<add> assert_equal(getattr(iinfo(dt1), attr),
<add> getattr(iinfo(dt2), attr), attr)
<ide> self.assertRaises(ValueError, iinfo, 'f4')
<ide>
<ide> def test_unsigned_max(self): | 2 |
Python | Python | add a test case for it | e87ee8314e8a88ee908d109ac877dc3f36046e7d | <ide><path>libcloud/test/storage/test_azure_blobs.py
<ide> def test_get_container_success(self):
<ide> self.assertTrue(container.extra["lease"]["state"], "available")
<ide> self.assertTrue(container.extra["meta_data"]["meta1"], "value1")
<ide>
<add> if self.driver.secure:
<add> expected_url = "https://account.blob.core.windows.net/test_container200"
<add> else:
<add> expected_url = "http://localhost/account/test_container200"
<add>
<add> self.assertEqual(container.extra["url"], expected_url)
<add>
<ide> def test_get_object_cdn_url(self):
<ide> obj = self.driver.get_object(
<ide> container_name="test_container200", object_name="test" | 1 |
Javascript | Javascript | use callback to properly propagate error | 8f86986985b161b7fb5aa41283d792417329bc2c | <ide><path>lib/_stream_readable.js
<ide> function ReadableState(options, stream, isDuplex) {
<ide> // Has it been destroyed
<ide> this.destroyed = false;
<ide>
<del> // Indicates whether the stream has errored.
<add> // Indicates whether the stream has errored. When true no further
<add> // _read calls, 'data' or 'readable' events should occur. This is needed
<add> // since when autoDestroy is disabled we need a way to tell whether the
<add> // stream has failed.
<ide> this.errored = false;
<ide>
<ide> // Indicates whether the stream has finished destroying.
<ide> function readableAddChunk(stream, chunk, encoding, addToFront) {
<ide> addChunk(stream, state, chunk, true);
<ide> } else if (state.ended) {
<ide> errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF());
<del> } else if (state.destroyed) {
<add> } else if (state.destroyed || state.errored) {
<ide> return false;
<ide> } else {
<ide> state.reading = false;
<ide> Readable.prototype.read = function(n) {
<ide> }
<ide>
<ide> // However, if we've ended, then there's no point, if we're already
<del> // reading, then it's unnecessary, and if we're destroyed, then it's
<del> // not allowed.
<del> if (state.ended || state.reading || state.destroyed) {
<add> // reading, then it's unnecessary, and if we're destroyed or errored,
<add> // then it's not allowed.
<add> if (state.ended || state.reading || state.destroyed || state.errored) {
<ide> doRead = false;
<ide> debug('reading or ended', doRead);
<ide> } else if (doRead) {
<ide> function emitReadable(stream) {
<ide> function emitReadable_(stream) {
<ide> const state = stream._readableState;
<ide> debug('emitReadable_', state.destroyed, state.length, state.ended);
<del> if (!state.destroyed && (state.length || state.ended)) {
<add> if (!state.destroyed && !state.errored && (state.length || state.ended)) {
<ide> stream.emit('readable');
<ide> state.emittedReadable = false;
<ide> }
<ide><path>lib/_stream_writable.js
<ide> function onwrite(stream, er) {
<ide>
<ide> if (er) {
<ide> state.errored = true;
<add>
<add> // In case of duplex streams we need to notify the readable side of the
<add> // error.
<add> if (stream._readableState) {
<add> stream._readableState.errored = true;
<add> }
<add>
<ide> if (sync) {
<ide> process.nextTick(onwriteError, stream, state, er, cb);
<ide> } else {
<ide><path>lib/internal/http2/core.js
<ide> class Http2Stream extends Duplex {
<ide>
<ide> let req;
<ide>
<add> // writeGeneric does not destroy on error and we cannot enable autoDestroy,
<add> // so make sure to destroy on error.
<add> const callback = (err) => {
<add> if (err) {
<add> this.destroy(err);
<add> }
<add> cb(err);
<add> };
<add>
<ide> if (writev)
<del> req = writevGeneric(this, data, cb);
<add> req = writevGeneric(this, data, callback);
<ide> else
<del> req = writeGeneric(this, data, encoding, cb);
<add> req = writeGeneric(this, data, encoding, callback);
<ide>
<ide> trackWriteState(this, req.bytes);
<ide> }
<ide><path>lib/internal/stream_base_commons.js
<ide> function onWriteComplete(status) {
<ide> return;
<ide> }
<ide>
<add> // TODO (ronag): This should be moved before if(stream.destroyed)
<add> // in order to avoid swallowing error.
<ide> if (status < 0) {
<ide> const ex = errnoException(status, 'write', this.error);
<del> stream.destroy(ex, this.callback);
<add> if (typeof this.callback === 'function')
<add> this.callback(ex);
<add> else
<add> stream.destroy(ex);
<ide> return;
<ide> }
<ide>
<ide> function writevGeneric(self, data, cb) {
<ide> // Retain chunks
<ide> if (err === 0) req._chunks = chunks;
<ide>
<del> afterWriteDispatched(self, req, err, cb);
<add> afterWriteDispatched(req, err, cb);
<ide> return req;
<ide> }
<ide>
<ide> function writeGeneric(self, data, encoding, cb) {
<ide> const req = createWriteWrap(self[kHandle]);
<ide> const err = handleWriteReq(req, data, encoding);
<ide>
<del> afterWriteDispatched(self, req, err, cb);
<add> afterWriteDispatched(req, err, cb);
<ide> return req;
<ide> }
<ide>
<del>function afterWriteDispatched(self, req, err, cb) {
<add>function afterWriteDispatched(req, err, cb) {
<ide> req.bytes = streamBaseState[kBytesWritten];
<ide> req.async = !!streamBaseState[kLastWriteWasAsync];
<ide>
<ide> if (err !== 0)
<del> return self.destroy(errnoException(err, 'write', req.error), cb);
<add> return cb(errnoException(err, 'write', req.error));
<ide>
<ide> if (!req.async) {
<ide> cb();
<ide> function setStreamTimeout(msecs, callback) {
<ide> }
<ide>
<ide> module.exports = {
<del> createWriteWrap,
<ide> writevGeneric,
<ide> writeGeneric,
<ide> onStreamRead,
<ide><path>test/parallel/test-net-connect-buffer2.js
<add>'use strict';
<add>const common = require('../common');
<add>const assert = require('assert');
<add>const net = require('net');
<add>
<add>const tcp = net.Server(common.mustCall((s) => {
<add> tcp.close();
<add>
<add> let buf = '';
<add> s.setEncoding('utf8');
<add> s.on('data', function(d) {
<add> buf += d;
<add> });
<add>
<add> s.on('end', common.mustCall(function() {
<add> console.error('SERVER: end', buf);
<add> assert.strictEqual(buf, "L'État, c'est moi");
<add> s.end();
<add> }));
<add>}));
<add>
<add>tcp.listen(0, common.mustCall(function() {
<add> const socket = net.Stream({ highWaterMark: 0 });
<add>
<add> let connected = false;
<add> assert.strictEqual(socket.pending, true);
<add> socket.connect(this.address().port, common.mustCall(() => connected = true));
<add>
<add> assert.strictEqual(socket.pending, true);
<add> assert.strictEqual(socket.connecting, true);
<add> assert.strictEqual(socket.readyState, 'opening');
<add>
<add> // Write a string that contains a multi-byte character sequence to test that
<add> // `bytesWritten` is incremented with the # of bytes, not # of characters.
<add> const a = "L'État, c'est ";
<add> const b = 'moi';
<add>
<add> // We're still connecting at this point so the datagram is first pushed onto
<add> // the connect queue. Make sure that it's not added to `bytesWritten` again
<add> // when the actual write happens.
<add> const r = socket.write(a, common.mustCall((er) => {
<add> console.error('write cb');
<add> assert.ok(connected);
<add> assert.strictEqual(socket.bytesWritten, Buffer.from(a + b).length);
<add> assert.strictEqual(socket.pending, false);
<add> }));
<add> socket.on('close', common.mustCall(() => {
<add> assert.strictEqual(socket.pending, true);
<add> }));
<add>
<add> assert.strictEqual(socket.bytesWritten, Buffer.from(a).length);
<add> assert.strictEqual(r, false);
<add> socket.end(b);
<add>
<add> assert.strictEqual(socket.readyState, 'opening');
<add>}));
<ide><path>test/parallel/test-net-write-arguments.js
<ide> assert.throws(() => {
<ide> [],
<ide> {}
<ide> ].forEach((value) => {
<add> const socket = net.Stream({ highWaterMark: 0 });
<ide> // We need to check the callback since 'error' will only
<ide> // be emitted once per instance.
<ide> assert.throws(() => {
<ide><path>test/parallel/test-wrap-js-stream-exceptions.js
<ide> process.once('uncaughtException', common.mustCall((err) => {
<ide> }));
<ide>
<ide> const socket = new JSStreamWrap(new Duplex({
<del> read: common.mustNotCall(),
<add> read: common.mustCall(),
<ide> write: common.mustCall((buffer, data, cb) => {
<ide> throw new Error('exception!');
<ide> }) | 7 |
Ruby | Ruby | fix some types in schema_test.rb | 924975a34aa3337cdf7a68f76bcae205815778f1 | <ide><path>activeresource/test/cases/base/schema_test.rb
<ide> def teardown
<ide> assert_nothing_raised {
<ide> Person.schema = new_schema
<ide> assert_equal new_schema, Person.schema, "should have saved the schema on the class"
<del> assert_equal new_schema, Person.new.schema, "should have mde the schema available to every instance"
<add> assert_equal new_schema, Person.new.schema, "should have made the schema available to every instance"
<ide> }
<ide> end
<ide>
<ide> def teardown
<ide> new_attr_name_two = :another_new_schema_attribute
<ide> assert Person.schema.blank?, "sanity check - should have a blank class schema"
<ide>
<del> assert !Person.new.respond_do?(new_attr_name), "sanity check - should not respond to the brand-new attribute yet"
<del> assert !Person.new.respond_do?(new_attr_name_two), "sanity check - should not respond to the brand-new attribute yet"
<add> assert !Person.new.respond_to?(new_attr_name), "sanity check - should not respond to the brand-new attribute yet"
<add> assert !Person.new.respond_to?(new_attr_name_two), "sanity check - should not respond to the brand-new attribute yet"
<ide>
<ide> assert_nothing_raised do
<ide> Person.schema = {new_attr_name.to_s => 'string'}
<ide> def teardown
<ide>
<ide> assert Person.schema.blank?, "sanity check - should have a blank class schema"
<ide>
<del> assert !Person.new.respond_do?(new_attr_name), "sanity check - should not respond to the brand-new attribute yet"
<del> assert !Person.new.respond_do?(new_attr_name_two), "sanity check - should not respond to the brand-new attribute yet"
<add> assert !Person.new.respond_to?(new_attr_name), "sanity check - should not respond to the brand-new attribute yet"
<add> assert !Person.new.respond_to?(new_attr_name_two), "sanity check - should not respond to the brand-new attribute yet"
<ide>
<ide> assert_nothing_raised do
<ide> Person.schema { string new_attr_name_two } | 1 |
Text | Text | expand explanation of `config.setdefaults` in docs | 65d13b538399851a943dcf00cf83be0b1ef3ea73 | <ide><path>docs/configuring-and-extending.md
<ide> config.get("fuzzyFinder.ignoredPaths").push "vendor"
<ide> config.update() # be sure to call `config.update` after the change
<ide> ```
<ide>
<del>You can also use `setDefaults`, which will assign keys on the object at the given
<del>only if they are currently undefined.
<add>You can also use `setDefaults`, which will assign default values for keys that
<add>are always overridden by values assigned with `set`. Defaults are not written out
<add>to the the `config.json` file to prevent it from becoming cluttered.
<ide>
<ide> ```coffeescript
<ide> config.setDefaults("editor", fontSize: 18, showInvisibles: true) | 1 |
Java | Java | fix initialization issue in resourceurlprovider | d85c1fbdd5edb6b2ba906f8a20009317ff7faa98 | <ide><path>spring-webmvc/src/main/java/org/springframework/web/servlet/resource/ResourceUrlProvider.java
<ide> protected void detectResourceHandlers(ApplicationContext appContext) {
<ide> Collections.sort(handlerMappings, new OrderComparator());
<ide>
<ide> for (SimpleUrlHandlerMapping hm : handlerMappings) {
<del> for (String pattern : hm.getUrlMap().keySet()) {
<del> Object handler = hm.getUrlMap().get(pattern);
<add> for (String pattern : hm.getHandlerMap().keySet()) {
<add> Object handler = hm.getHandlerMap().get(pattern);
<ide> if (handler instanceof ResourceHttpRequestHandler) {
<ide> ResourceHttpRequestHandler resourceHandler = (ResourceHttpRequestHandler) handler;
<ide> if (logger.isDebugEnabled()) { | 1 |
Text | Text | add plans for tree-sitter this week | 29665713c6fc7e51bd53233dcf37c64f15155548 | <ide><path>docs/focus/2018-04-02.md
<ide> - Teletype
<ide> - Publish patch release with [potential fix](https://github.com/atom/teletype-client/pull/58) for [atom/teletype#233](https://github.com/atom/teletype/issues/233)
<ide> - Incorporate any new feedback and finalize RFC for streamlining collaboration set-up ([atom/teletype#344](https://github.com/atom/teletype/pull/344))
<add>- Tree-sitter
<add> - Fix error recovery performance bug discovered in Atom last week
<ide> - Xray
<ide> - Reactor Duty | 1 |
Go | Go | fix incorrect assumption in testapiswarmraftquorum | c27603238c5493909ec9b657b342b67b23e615e3 | <ide><path>integration-cli/docker_api_swarm_test.go
<ide> func (s *DockerSwarmSuite) TestAPISwarmRaftQuorum(c *check.C) {
<ide>
<ide> d3.Stop(c)
<ide>
<del> // make sure there is a leader
<del> waitAndAssert(c, defaultReconciliationTimeout, d1.CheckLeader, checker.IsNil)
<del>
<ide> var service swarm.Service
<ide> simpleTestService(&service)
<ide> service.Spec.Name = "top2" | 1 |
Javascript | Javascript | fix eslint errors | 2757794e4a8f80767e228fd2882c254c1b872e68 | <ide><path>packages/loader/lib/index.js
<add>/*global process */
<ide> var enifed, requireModule, Ember;
<ide> var mainContext = this; // Used in ember-environment/lib/global.js
<ide>
<ide> (function() {
<del> var isNode = typeof window === 'undefined' &&
<del> typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';
<del>
<del> if (!isNode) {
<del> Ember = this.Ember = this.Ember || {};
<del> }
<del>
<del> if (typeof Ember === 'undefined') { Ember = {}; }
<del>
<del> if (typeof Ember.__loader === 'undefined') {
<del> var registry = {};
<del> var seen = {};
<del>
<del> enifed = function(name, deps, callback) {
<del> var value = { };
<del>
<del> if (!callback) {
<del> value.deps = [];
<del> value.callback = deps;
<del> } else {
<del> value.deps = deps;
<del> value.callback = callback;
<del> }
<del>
<del> registry[name] = value;
<del> };
<del>
<del> requireModule = function(name) {
<del> return internalRequire(name, null);
<del> };
<del>
<del> // setup `require` module
<del> requireModule['default'] = requireModule;
<del>
<del> requireModule.has = function registryHas(moduleName) {
<del> return !!registry[moduleName] || !!registry[moduleName + '/index'];
<del> };
<del>
<ide> function missingModule(name, referrerName) {
<ide> if (referrerName) {
<ide> throw new Error('Could not find module ' + name + ' required by: ' + referrerName);
<ide> var mainContext = this; // Used in ember-environment/lib/global.js
<ide> return exports;
<ide> }
<ide>
<add> var isNode = typeof window === 'undefined' &&
<add> typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';
<add>
<add> if (!isNode) {
<add> Ember = this.Ember = this.Ember || {};
<add> }
<add>
<add> if (typeof Ember === 'undefined') { Ember = {}; }
<add>
<add> if (typeof Ember.__loader === 'undefined') {
<add> var registry = {};
<add> var seen = {};
<add>
<add> enifed = function(name, deps, callback) {
<add> var value = { };
<add>
<add> if (!callback) {
<add> value.deps = [];
<add> value.callback = deps;
<add> } else {
<add> value.deps = deps;
<add> value.callback = callback;
<add> }
<add>
<add> registry[name] = value;
<add> };
<add>
<add> requireModule = function(name) {
<add> return internalRequire(name, null);
<add> };
<add>
<add> // setup `require` module
<add> requireModule['default'] = requireModule;
<add>
<add> requireModule.has = function registryHas(moduleName) {
<add> return !!registry[moduleName] || !!registry[moduleName + '/index'];
<add> };
<add>
<ide> requireModule._eak_seen = registry;
<ide>
<ide> Ember.__loader = {
<ide><path>packages/node-module/lib/node-module.js
<add>/*global enifed */
<ide> enifed('node-module', ['exports'], function(_exports) {
<ide> var IS_NODE = typeof module === 'object' && typeof module.require === 'function';
<ide> if (IS_NODE) { | 2 |
Javascript | Javascript | add clientrequest creation benchmark | c5d0fd9641b9cc4b6340a34dd75119d899a98017 | <ide><path>benchmark/http/create-clientrequest.js
<add>'use strict';
<add>
<add>var common = require('../common.js');
<add>var ClientRequest = require('http').ClientRequest;
<add>
<add>var bench = common.createBenchmark(main, {
<add> pathlen: [1, 8, 16, 32, 64, 128],
<add> n: [1e6]
<add>});
<add>
<add>function main(conf) {
<add> var pathlen = +conf.pathlen;
<add> var n = +conf.n;
<add>
<add> var path = '/'.repeat(pathlen);
<add> var opts = { path: path, createConnection: function() {} };
<add>
<add> bench.start();
<add> for (var i = 0; i < n; i++) {
<add> new ClientRequest(opts);
<add> }
<add> bench.end(n);
<add>} | 1 |
PHP | PHP | add doc blocks for type constants | 3b46044b1783424e529a837f1a7371495385a7ed | <ide><path>Cake/ORM/Association.php
<ide> abstract class Association {
<ide> */
<ide> const STRATEGY_SELECT = 'select';
<ide>
<add>/**
<add> * Association type for one to one associations.
<add> *
<add> * @var string
<add> */
<ide> const ONE_TO_ONE = 'oneToOne';
<ide>
<add>/**
<add> * Association type for one to many associations.
<add> *
<add> * @var string
<add> */
<ide> const ONE_TO_MANY = 'oneToMany';
<ide>
<add>/**
<add> * Association type for many to many associations.
<add> *
<add> * @var string
<add> */
<ide> const MANY_TO_MANY = 'manyToMany';
<ide>
<ide> /** | 1 |
PHP | PHP | add file() method to response factory | a96ea3c8c95657832f3d534d42db4b5efc7b8515 | <ide><path>src/Illuminate/Routing/ResponseFactory.php
<ide> public function download($file, $name = null, array $headers = [], $disposition
<ide> return $response;
<ide> }
<ide>
<add> /**
<add> * Return the raw contents of a binary file.
<add> *
<add> * @param \SplFileInfo|string $file
<add> * @param string $mime
<add> * @param array $headers
<add> * @return \Symfony\Component\HttpFoundation\BinaryFileResponse
<add> */
<add> public function file($file, $mime, array $headers = [])
<add> {
<add> $headers['Content-Type'] = $mime;
<add>
<add> $response = new BinaryFileResponse($file, 200, $headers, true);
<add>
<add> return $response;
<add> }
<add>
<ide> /**
<ide> * Create a new redirect response to the given path.
<ide> * | 1 |
Python | Python | improve coding style | 192719eed0ffc8ecd423b18e07bf52921dbfbcc2 | <ide><path>rest_framework/authentication.py
<ide> def authenticate_credentials(self, userid, password):
<ide> """
<ide> Authenticate the userid and password against username and password.
<ide> """
<del> user_model = get_user_model()
<del> if hasattr(user_model, 'USERNAME_FIELD'):
<del> username_field = user_model.USERNAME_FIELD
<del> else:
<del> username_field = 'username'
<add> username_field = getattr(get_user_model(), 'USERNAME_FIELD', 'username')
<ide> credentials = {
<ide> username_field: userid,
<ide> 'password': password | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.