Friday, March 20, 2020

The History and Laws of Apartheid in South Africa

The History and Laws of Apartheid in South Africa ApartheidThroughout history, black people have been discriminated against in all walks of life. From Africa to North America, black people have had to put up with oppression, blatant racism and discrimination, cruelty, slavery, and have been subjugated against in the worst ways in various parts of the world. This paper will provide some insight to the racial discrimination against black people in South Africa during the Apartheid regime. This era truly illustrates the huge amount of oppression that black people in South Africa had to go through. These black people were united in the pretext that both the African Americans were Africans who were primarily taken against their will and transported as slaves to North America where they lived with constant fear of being lynched and beaten just because of the color of their skin. The Africans who were not taken as slaves did not have it any better, especially in the Southern part of Africa, namely South Africa, where black Africans were su bjugated against and had to put up with similar conditions to that of which the African Americans were dealing with, namely Jim Crow.â€Å"For use by white persons† – sign from the a...This paper will go through a number of topics which deal with the situations of black people in South Africa, including the various laws which kept the black populations subjugated against as well as the events leading to Nelson Mandela becoming the president of South Africa in May of 1994.History of Apartheid in South AfricaInformation for this section of this paper was retrieved, made relevant, and summarized from a few websites and provides a summary of the events leading up to the institutionalization of Apartheid in South Africa . The Republic of South Africa is a country located at the southern tip of the continent of Africa. South Africa is a country which...

Tuesday, March 3, 2020

The Dollar Sign ($) and Underscore (_) in JavaScript

The Dollar Sign ($) and Underscore (_) in JavaScript The  dollar sign ($)  and the  underscore  (_) characters are JavaScript identifiers, which just means that they identify an object in the same way a name would.  The  objects they identify include things such as variables, functions, properties, events, and objects. For this reason, these characters are not treated  the same way as other special symbols. Instead, JavaScript treats  $  and  _  as if they were  letters of the alphabet. A JavaScript identifier  - again, just a name for any object  - must start with a lower or upper case letter, underscore (_), or dollar sign ($); subsequent characters can also include digits (0-9).  Anywhere that an alphabetic character is allowed in JavaScript, 54 possible letters are available: any lowercase letter (a through z), any uppercase letter (A through Z), $ and _. The Dollar ($) Identifier The dollar sign is commonly used as a shortcut to the function document.getElementById(). Because this function is fairly verbose and used frequently in JavaScript, the $ has long been used as its alias, and  many of the libraries available for use with JavaScript create a  $()  function that references an element from the DOM if you pass it the id of that element. There is nothing about $ that requires it to be used this way, however. But it has been the convention, although there is nothing in the language to enforce it. The dollar sign $ was chosen for the function name by the first of these libraries because it is a short one-character word, and $  was least likely to be used by itself as a function name and therefore the least likely to clash with other code in the page. Now multiple libraries are providing their own version of the $() function, so many now provide the option to turn off that definition in order to avoid clashes.   Of course,  you dont need to use a library to be able to use $(). All you need to substitute $() for document.getElementById() is to add a definition of the $() function to your code as follows: function $(x) {return document.getElementById(x);} The Underscore _ Identifier   A convention has also developed regarding the use of _, which is frequently used to preface the name of an objects property or method that is private. This is a quick and easy way to immediately identify a private class member, and it is so widely used, that almost every programmer will recognize it. This is particularly useful in JavaScript since defining fields as private or public is done without the use of the  private and public keywords (at least this is true in the versions of JavaScript used in web browsers - JavaScript 2.0 does allow these keywords). Note that again, as with $, the use of _ is merely a convention and is not enforced by JavaScript itself. As far as JavaScript is concerned, $ and _ are just ordinary letters of the alphabet. Of course, this special treatment of $ and _  applies only within JavaScript itself. When you test for alphabetic characters in the data, they are treated as special characters no different from any of the other special characters.