Tuesday, March 17, 2020

Richard Nixon Was a Conservationist President

Richard Nixon Was a Conservationist President If you were asked to name one of the most environmentally conscious green presidents in United States history, who would come to mind? Teddy Roosevelt, Jimmy Carter, and Thomas Jefferson are prime candidates on many peoples lists. But how about Richard Nixon? Chances are, he wasnt your first pick. Despite the fact that Nixon continues to rank as one of the countrys least favorite leaders, the Watergate scandal wasnt his only claim to fame, and it certainly didnt represent the most profound impact of his presidency. Richard Milhous Nixon, who served as the 37th President of the United States from 1969 to 1974, was responsible for the establishment of some of the nations most important environmental legislature. President Nixon tried to gain some political capitalhard to come by during the Vietnam War and a recessionby announcing an Environmental Quality Council and a Citizens Advisory Committee on Environmental Quality, reported the Huffington Post. But people didnt buy it. They said it was just for show. So, Nixon signed legislation called the National Environmental Protection Act, which gave birth to the EPA as we know it nowright before what most people consider the first Earth Day, which was April 22, 1970. This action, in itself, has had had far-reaching effects on environmental policy and endangered species conservation, but Nixon didnt stop there. Between 1970 and 1974, he took several more significant strides toward protecting our countrys natural resources. Lets take a look at five more monumental acts passed by President Nixon that have helped maintain the environmental quality of our nations resources and also influenced numerous other countries around the globe to follow suit. Clean Air Act of 1972 Nixon utilized an executive order to create the Environmental Protection Agency (EPA), an independent government organization, in late 1970. Shortly after its establishment, the EPA passed its first piece of legislation, the Clean Air Act, in 1972. The Clean Air Act was, and remains today, the most significant air pollution control bill in American history. It required the EPA to create and enforce regulations to protect people from airborne pollution known to be hazardous to our health such as sulfur dioxide, nitrogen dioxide, particulate matter, carbon monoxide, ozone, and lead. Marine Mammal Protection Act of 1972 This act was also the first of its kind, designed to protect marine mammals like whales, dolphins, seals, sea lions, elephant seals, walruses, manatees, sea otters, and even polar bears from human-induced threats such as excessive hunting. It simultaneously established a system to allow native hunters to harvest whales and other marine mammals sustainably. The act created guidelines regulating the public display of captured marine mammals in aquarium facilities and regulated the import and export of marine mammals. Marine Protection, Research, and Sanctuaries Act of 1972 Also known as the Ocean Dumping Act, this legislature regulates the deposit of any substance into the ocean that has the potential to harm human health or the marine environment. Endangered Species Act of 1973 The Endangered Species Act has been instrumental in protecting rare and declining species from extinction as a result of human activity. Congress granted numerous government agencies broad powers to protect species (particularly by preserving critical habitat). The act also entailed the establishment of the official endangered species list and has been referred to as the Magna Carta of the environmental movement. Safe Drinking Water Act of 1974 The Safe Drinking Water Act was a critical turning point in the nations struggle to protect the imperiled quality of fresh water in lakes, reservoirs, streams, rivers, wetlands and other inland bodies of water as well as springs and wells that are used as rural water sources. Not only has it proved vital in maintaining a safe water supply for public health, but it has also helped keep natural waterways intact and clean enough to continue to support aquatic biodiversity, from invertebrates and mollusks to fish, birds, and mammals.

Sunday, March 1, 2020

Converting Numbers Into Words Using JavaScript

Converting Numbers Into Words Using JavaScript Lots of programming involves calculations with numbers, and  you can easily format numbers for display by adding commas, decimals, negative signs, and other appropriate characters depending on the kind of number it is. But youre not always presenting your results as part of a mathematical equation. The Web for the general user is more about words than it is about numbers, so sometimes a number displayed as a number isnt appropriate. In this case, you need the equivalent of the number in words, not in numerals. This is where you can  run into difficulties. How do you convert  the numeric  results of your calculations when you need the number displayed in words? Converting a number into words isnt exactly the most straightforward of tasks, but it can be done using JavaScript that isnt too complex. JavaScript to Convert Numbers Into Words If you want to be able to do these conversions on your site,  you will need a JavaScript code that can do the conversion for you. The simplest way to do this is to use the code below; just select the code and copy it into a file called toword.js. // Convert numbers to words// copyright 25th July 2006, by Stephen Chapman http://javascript.about.com// permission to use this Javascript on your web page is granted// provided that all of the code (including this copyright notice) is// used exactly as shown (you can change the numbering system if you wish) // American Numbering Systemvar th [,thousand,million, billion,trillion];// uncomment this line for English Number System// var th [,thousand,million, milliard,billion]; var dg [zero,one,two,three,four,five,six,seven,eight,nine]; var tn [ten,eleven,twelve,thirteen, fourteen,fifteen,sixteen,seventeen,eighteen,nineteen]; var tw [twenty,thirty,forty,fifty,sixty,seventy,eighty,ninety]; function toWords(s){s s.toString(); s s.replace(/[\, ]/g,); if (s ! parseFloat(s)) return not a number; var x s.indexOf(.); if (x -1) x s.length; if (x 15) return too big; var n s.split(); var str ; var sk 0; for (var i0; i x; i) {if((x-i)%32) {if (n[i] 1) {str tn[Number(n[i1])] ; i; sk1;}else if (n[i]!0) {str tw[n[i]-2] ;sk1;}} else if (n[i]!0) {str dg[n[i]] ; if ((x-i)%30) str hundred ;sk1;} if ((x-i)%31) {if (sk)str th[(x-i-1)/3] ;sk0;}} if (x ! s.length) {var y s.length; str point ; for (var ix1; istr.replace(/\s/g, );} Next,  link the script into the head of your page using the following code: var words toWords(num); The final step is to call the script to perform the conversion to words for you. To get a number converted to words you just need to call the function passing it the number you want to convert and the corresponding words will be returned. Numbers to Words Limitations Note that this function can convert numbers as big as 999,999,999,999,999 into words and  with as many decimal places as you like. If you try to convert a number bigger than that it will return too big. Numbers, commas, spaces, and a single period for the decimal point are the only acceptable characters that can be used for the number being converted. If it contains anything beyond these characters, it will return not a number. Negative Numbers If you want to convert negative numbers of currency values to words you should remove those symbols from the number first and convert those to words separately.