Saturday, November 23, 2019
Generating Random Numbers in Java
Generating Random Numbers in Java Generating a series of random numbers is one of those common tasks that crop up from time to time. In Java, it can be achieved simply by using the java.util.Random class. The first step, as with the use of any API class, is to put the import statement before the start of your program class: Next, create a Random object: The Random object provides you with a simple random number generator. The methods of the object give the ability to pick random numbers. For example, the nextInt() and nextLong() methods will return a number that is within the range of values (negative and positive) of the int and long data types respectively: The numbers returned will be randomly chosen int and long values: Picking Random Numbers From a Certain Range Normally the random numbers to be generated need to be from a certain range (e.g., between 1 to 40 inclusively). For this purpose, the nextInt() method can also accept an int parameter. It denotes the upper limit for the range of numbers. However, the upper limit number is not included as one of the numbers that can be picked. That might sound confusing but the nextInt() method works from zero upwards. For example: will only pick a random number from 0 to 39 inclusively. To pick from a range that starts with 1, simply add 1 to the result of the nextInt() method. For example, to pick a number between 1 to 40 inclusively add one to the result: If the range starts from a higher number than one you will need to: minus the starting number from the upper limit number and then add one.add the starting number to the result of the nextInt() method. For example, to pick a number from 5 to 35 inclusively, the upper limit number will be 35-5131 and 5 needs to be added to the result: Just How Random Is the Random Class? I should point out that the Random class generates random numbers in a deterministic way. The algorithm that produces the randomness is based on a number called a seed. If the seed number is known then its possible to figure out the numbers that are going to be produced from the algorithm. To prove this Ill use the numbers from the date that Neil Armstrong first stepped on the Moon as my seed number (20th July 1969) :ââ¬â¹ No matter who runs this code the sequence of random numbers produced will be: By default the seed number that is used by: is the current time in milliseconds since January 1, 1970. Normally this will produce sufficiently random numbers for most purposes. However, note that two random number generators created within the same millisecond will generate the same random numbers. Also be careful when using the Random class for any application that must have a secure random number generator (e.g., a gambling program). It might be possible to guess the seed number based on the time the application is running. Generally, for applications where the random numbers are absolutely critical, its best to find an alternative to the Random object. For most applications where there just needs to be a certain random element (e.g., dice for a board game) then it works fine.
Thursday, November 21, 2019
Final Essay Example | Topics and Well Written Essays - 1250 words - 1
Italian Immigrant Families and Aboriginal Families in Canada - Essay Example Original subcultures give a family a sense of belonging and enhance the process of socialization through which parents can instill the values, beliefs, and attitudes of their children. Both Italian and aboriginal families are forced to live in poor urban shanties because of lack of acceptance and poverty levels in Canada. For Italians, the family is a resourceful and dynamic structure that is forced to compromise because of the different demands in the bicultural and bilingual Canadian setting. To adapt the two cultures and survive in Canada, the family is forced to adopt cultural and linguistic aspects and develops a synthetic culture made up of cultural elements from both societies (Colalillo 120). On the other hand, the Aborigine family has refused to let go of their traditional cultural systems to maintain their identity. However, they find it hard to maintain their lifestyle and customs because of aggravating poverty and lack of government support. Most of them were moved to res erve lands during the colonial era and despite the resettlement treaties signed by the government, they have remained refugees in their homeland. In the reserves, the aborigines families are isolated, have insufficient wildlife and natural resources, and government funding for subsistence. Literature indicates Italians immigrant families have experienced alienation that has led to breaking of families, disruptions of family life as laid down by the Italian culture and moved to unfamiliar territories. In addition, sociologists indicate that Italian immigrant families in Canada are forced to live in urban villages and never get an opportunity to be fully integrated into Canadian society (Colalillo, 123). Experts say that literature on assimilation and integration creates conflicts between children and their parents when they criticize parents for being left the ethnic ghetto. The effort to assimilate attempts to remove cultural baggage (Italian culture) and quantifies the gains of the second generation. On the other hand, Over the years, the literature indicates that the aboriginal people have undergone suffering and poverty because of their adamant to get rid of their nomadic cultural system. In Canadian society, aborigines are stereotyped and their relationship with other communities is tainted by mutual mistrust and misunderstanding. Long during the colonization period, the state of Canada tried to eliminate the aboriginal culture through the use of discriminatory laws that were aimed at assimilating them. Because of the state of poverty and government alienation, the aborigines have been forced to move to urban centers and states show that their population is one of the fast growing in the Canadian urban centers. However, because of the lack of basic survival skills, most of them are forced to enlarge in crime to support their families. Moreover, the community's poverty makes it vulnerable to victimization and assault sexually and physically. The statistics report indicates that the bringing families living in urban centers are likely to be poor, with an estimation of more than 80% of their children being raised in poverty-stricken families.
Tuesday, November 19, 2019
Partnership Accounting Assignment Example | Topics and Well Written Essays - 1000 words
Partnership Accounting - Assignment Example The company was founded in the year 1994. The company has a global presence and caters to almost all the countries of the world. The company has employee strength of 109 thousand employees as in 2013. Since it is an e-retail company there is requirement for technical as well as staff for supply chain. The company has to depend on the competitive intelligence in form of the consumer data so that the company is being able to understand the needs of the consumers through their browsing history and can stock up their inventory levels as and when required. Thus it is important for the company to have a combination of a good retail supply chain workforce and as technical people who would be available with the company to support the technical aspects of the operations. However the turnover for Amazon is very high. Most of the employees do not stay in the organisation for more than one year. This report is an attempt to find out the reasons for such high rate of turnover. The basis for the s tudy is mainly primary as well as secondary research. The section of the literature review explores the studies that have been made by the authors about this issue of turnover in the business environment. Literature Review The topic of employee turnover has been studies and researched by a huge number of scholars over a very long period of time. In the Human resources framework, the rate of turnover of the employees is the rate at which an employer acquires his employees and loses the employees. The high rate of turnover is an indication of the fact that the employees in an organisation would work in the organisation for a shorter span of time. This is generally a rate that is determined after comparing in the other industries playing in the same market. The turnover metric is determined by dividing the total number of parting workers who have left within a year by the number of employees who were engaged in the company for that particular year (Cascio and Boudreau, 2011, p. 80). Th e same metric has been used by Price in his modelling of turnover (Price, 1977, pp. 10-25). For a particular labour market there are about the same number of employees that rotate around in the different markets. Most of the management practitioners have argued that there are several reasons that contribute to the turnover rate of the companies (Kevin, Joan and Adrian, 2004, pp. 161-166). The event of turnover is time consuming and the management of a company cannot officially stop an employee from leaving the organisation. In most cases the employees are lured away by other organisations operating in the same industry by offering a higher salary. However, it has been found out through intensive research that the employees cite this reason only to disguise some other major reason for which they leave the organisation. Review Findings There are several other reasons for which an employee decides to leave an organisation. Job related stress is one of the causes which contribute to the high rate of turnover among the employees. The level of satisfaction in a particular job is also another major reason for the high rate of turnover. Most of the employees remain dissatisfied with the work that they perform and they feel that it does not meet their self actualisation needs fully. Research has also shown that the level of compensation that the employees get from their present employer is not satisfactory or the perquisites are not up to the industry standards. This forces the employees to shift to a new organisation. On the other hand, in case of mostly the manufacturing organisations or the companies that involves jobs
Sunday, November 17, 2019
United States public debt Essay Example for Free
United States public debt Essay The United States deficit, surplus, and debt will always have an impact on taxpayers. In the state of high deficit the government seeks ways to cut and save money for debt payment. The government does this by pulling funding from programs that have little government impact. Increasing taxes also supplies the government with extra income. In addition to the reduction or elimination of certain tax credits, the government analyzes school funding for cost effectiveness. Each step the government takes has a trickling effect on taxpayerââ¬â¢s dollar. The Effects of U.à S. Deficit, Surplus, and Debt When a surplus exists, the government has extra funds to spare and infuse into the economy. This surplus will increase government programs. When the government has a surplus it focuses on its needs by order of necessity, similar to the way individuals do when they have extra money. This can lead to new tax credits for taxpayers. However, when the nation is in debt the taxpayers are also in debt. The government uses tax money to finance their operations. If debt increases taxes go up, if debt decreases taxes lower for most. Effects on Future Social Securities and Medicare Taxpayers are affected by the U. S. deficit when there is a shortfall in revenue, which is the result of the National Debt increasing. Surpluses also have an effect on taxpayers as well. Programs like Social Security and Medicare receive government funding from tax money. Social Security takes contributions made by citizens to accumulate a surplus, which it uses to buy government bonds, which are government debt. These bonds accumulate and eventually mature. The money from the mature bonds helps to pay retirees. As American citizens contribute money into Social Security, the bond purchases mean that the government owes the Social Security program the value of the bonds purchases (Colander, 2010). The debt reported by the government for this purchase, however, is for on-budget accounts, while the U. S. reports unified accounts which include on-budget accounts but also adds off-budgets accounts as well. Like Social Security, Medicare relies on contributions made by citizens. However, Medicare makes use of third party payer markets, which helps people receive services who may be different from those who provide the services. Third party payer systems take contributions to help defray the cost or expense of providing the service while a portion of the services, such as Medicare, are paid by the consumer through the use of a co-payment system. The expenses incurred by instituting a program, such as Social Security, means that the costs of using this program are set against any revenues made for that same year. The cost of running Medicare and Social Security will rise as more Americans reach retirement ââ¬Å"This will require more benefits be paid out than revenues are coming in, thus increasing the expenses and increasing the deficitâ⬠(Blahous, 2011). ââ¬Å"The Social Security Administration figures that by the year 2040 the SS trust fund will be used up causing utilization of one of three options: borrowing, increasing revenue, or lowering benefits. The Medicare program is estimated to be much closer to crisis than the SS trust fund. In contrast to current Medicare and Social Security benefits budget of 35 percent, an increase to 60-65% may be necessary as early as 2030â⬠(Colander, 2010). Current legislative discussions by political parties recognize the potential impact on future economic growth that this increasing deficit may have and are seeking ways to address as well as reform programs such as Medicare and Social Security. Unemployment and the Deficit Just as Social Security and Medicare are affected by the United States deficit and surplus, so is the unemployment rate. Increasing unemployment rates increase the deficit thus naturally reducing the deficit decreases unemployment rates as well. According to Ginsburg and Ayres (n. d. ), ââ¬Å"The President and Congress try to outdo one another on who can cut the Federal budget deficit the most. But efforts to reduce the deficit at the expense of necessary social programs are unnecessary and counter-productive. In fact, much of the recent reduction in the deficit is due to the decline in unemploymentâ⬠(p. 1). With record high deficits within the last years the idea of the government spending to spur the economy that ultimately would help reduce the unemployment level seems near impossible without further affecting the deficit rather than helping reduce it. University of Phoenix Students When students default on their loans, it adds to the national debt. The main problem lies in the fact that newly graduated students canââ¬â¢t find jobs that pay enough to reduce their debt ââ¬Å"Tarah Toney worked two full-time jobs to put herself through college, at McMurry University in Abilene, Texas, and still has $75,000 in debt. She graduated in six years with a Bachelorââ¬â¢s in English and wanted to go on to teach high schoolâ⬠(Jaffe, 2011). Yet the government still requires the students to make on time payments. A surplus allows the government to use more money for grants and loans. The extra money from the budget goes into programs like the Pell grant. This enables more students to borrow or receive money to attend college. A deficit of funds affects students the same way student debt affects the government. To combat debt, cuts to government funding will take place. When the government cuts education funding, programs that fund grants lose money. The United States International Financial Reputation In addition to domestic ramifications regarding the United States deficit, surplus, and debt, international standing can waver due to a weak economy. These topics play an immense part in formulating this nationââ¬â¢s global standing. Maintaining its reputation as a world superpower is arduous during economic crisis. The deficit consists of the dissimilarly in governmentââ¬â¢s income and its disbursement. Other countries closely watch the deficit/surplus gap. America reputation rest whether it is positive or negative on the amount of the deficit. When the nation spending exceeds the amount it receives, Americaââ¬â¢s economy seems to be at risk. A surplus in funds strikes a balance to the United States receiving more money than it spends. Hall (2012) states, ââ¬Å"â⬠¦surpluses and deficits result from policy choices about government spending and taxesâ⬠(para. 6). If a surplus transpire because of the government not administering funds toward the policies that can help the United States run more efficiently, this can shed a negative light on its globeââ¬â¢s personal image. A Domestic Automotive Manufacturing (Exporter) As an exporter of domestic automobiles, the nationââ¬â¢s deficit, surplus, and debt can impose the prospering or nonsuccess of exporting. An economic strain on funds seeps down and effects American businesses. America prospers from its export and import business. Exporters in the automotive manufacturing lament when the nationââ¬â¢s deficit/debt is high. When America economy is failing, it experiences a lofty volume of automotive imports. American automotive manufacturers languish during economic decline. The automobile industry as a whole continues to be depressed as a result of the global economic depressionâ⬠(Thompson Merchant, 2010, p. 12). Despite Americaââ¬â¢s economic problems Japanese manufacturers appear to thrive. Thompson and Merchant (2010) state, ââ¬Å"â⬠¦foreign automakers Toyota and Honda continued to achieve record high revenue levels through 2008 as they increased their market share in the United Statesâ⬠(pg. 12). During a surplus, automotive exports escalate for American manufacturers. A surplus in funds results in the nationââ¬â¢s ability to pay its impounding debt. Lowering debt equals lower interest rates. A surplus makes it easier for manufacturers to safeguard loans to export automotive parts. U. S. Deficit Effect on International Import The economies deficits, surpluses, and debt have an influence on both an Italian clothing design importer and GDP. For example, America can import clothing from an Italian clothing company. If the country has a financial deficit, they must reduce importation and focus on local product. This hurts international trade. A government surplus allows the country to purchase an increased amount of foreign goods. Surpluses, deficits, and debts also affect the nations GDP. As imports increase and deficits and debts increase, the GPD in the nation will decrease as less domestic goods are being sold in the country. When exports increase and a surplus occurs than GDP will increase as well as when there are more domestic products being sold in and out of the nation. Gross domestic product is the amount of products made in the country and sold. These can be both domestic products made and sold here along with exports made and sold elsewhere.
Thursday, November 14, 2019
The Cell Phone Industry :: Exploratory Essays Research Papers
The Cell Phone Industry Cell phone manufacturers and service providers are at the core of the cell phone industry.à These corporations are integral from their research and development endeavors to interactions with the consumer and the marketing of new products.à The companies that control such factors of cellular phones are very numerous, so it is difficult to address all the cell phone manufacturers and service providers.à However, we have focused largely on only the most significant cellular companies namely in the U.S. marketplace, although many have global ties.à Collectively, companies around the world have the same goals in mind ââ¬â to create desirable cutting-edge technology and to increase consumer satisfaction with hopes of generating sales, and thus profits.à à Manufacturers and service providers of cell phones are located throughout the world, although, as inCode, a wireless business and technology consulting firm, suggests, ââ¬Å"Not many wireless carriers today have a truly global presence.â⬠à However, the company predicts that ââ¬Å"the top 10 wireless carriers are going to make a push for globalization in the coming yearsâ⬠(ââ¬Å"InCode releasesâ⬠¦Ã¢â¬ ).à Most especially, inCode foresees service providers reaching to ââ¬Å"unconquered markets like China, which is the fastest growing wireless market in the worldâ⬠(ââ¬Å"InCode releasesâ⬠¦Ã¢â¬ ).à Some companies have already tapped into the global marketplace, spreading areas of coverage across continents.à The cell phone manufacturer Nokia, for example, is rooted in Finland, but sells cellular phone products virtually everywhere on the globe.à Service providers, although most often more less expansive in scope, are also trying to provide more global coverage. à Global service coverage is in large demand, especially from businessmen who frequently travel.à Linda Stern suggests in Newsweek to global travelers that they should ââ¬Å"buy your phone and service from T-Mobile, AT&T or Cingular, the only three U.S. companies to use the internationally dominant GSM (Global System for Mobile communication).â⬠à Depending on the service provider, one may or may not get coverage in other countries.à For example, Verizon customers enjoy phones that work in Latin America, while Cingular customers have coverage in Europe.à Even better is AT&T Wireless, which offers ââ¬Å"vast international coverageâ⬠or TMobile, another international carrier (Stern).à Service coverage varies greatly by carrier, with some reaching many countries and others only small portions of a single country. à Part of the reason for the absence of a truly global cellular company is because it is difficult for companies to keep up with the changing trends across the world, as consumers in different parts of the world demand different technologies and products.
Tuesday, November 12, 2019
Memories of my childhood days Essay
Memories of my Childhood Days My first recollection of my childhood is the day I down the stairs when I was three years old. I was so happy that time I cried and cried for nearly an hour in spite of my parentsââ¬â¢ attempts at comforting me. Finally, I quietened down when I was given ice- cream and chocolates. Luckily, I was not hurt because the stairs is not to steep. My days were happy ones before I started going to school, as I had good neighbours to play with me.I was playing from morning till evening. We played games outdoors like Batu Seremban,Police entry and Lumba Lari. There were also other games to occupy our time until my mother bring a rattan to call me back.. At the age of five years, I had to attend kindergarten and this turned out to be quite an ordeal for me. To begin with, I felt very sad having to leave my mother and go off each morning to be amongst strangers. I cried and wanted my mother around, much to my teacherââ¬â¢s displeasure. As the days went by, however, I made friends easily in class and found company. I became happy again and actually looked forward to leaving the house each morning. I still remember those days when I was learning to ride a bicycle. I fell and bruised myself several times but I never gave up. Finally, I was able to join my friends going around the neighbourhood on my bike. Another fond memory is the end-of-year concert held at the kindergarten. I was chosen to play the role of Princess in the play, ââ¬ËPrincess and Gunung Ledangââ¬â¢, and I became a celebrity overnight receiving lots of compliments for my performance. I now realise what a wonderful childhood I have had and at times wish I could relive those days.
Sunday, November 10, 2019
Chinese Communist Party in the Civil War in 1949 Essay
The Chinese Civil War, which lasted from 1927 to 1949, was a civil war in China which the Chinese Communist Party (CCP) overthrew the Guomindang (GMD) . As the CCP had always been inferior to the GMD in many aspects, many were shocked and startled by the Communistââ¬â¢s victory; although numerous factors show that the Communistââ¬â¢s victory was almost inevitable. This essay will examine the factors that lead to the Communists victory, which includes ideology, economic, political, social, military, foreign issues, and personalities of the leaders. One of the major advantages of the CCP can be seen in their social aspects and the support of peasants, which were the vast majority of people. They owned limited amount of land, had high rents, low productivity, were in dept and many lived on the edge of starvation. In addition, having peasant support for the CCP can supply with food resources. Therefore, Mao understood the first goal he had to achieve was the support from peasants. First, he set up peasant unions of Hunan from 1925-27, then in 1838-45 when Chiang had their attention focused on the Japanese Invasion, Mao and the CCP went to the rural areas, where the peasants were grateful for the way the soldiers behaved and helped the people. Then, the political leaders confiscated land from the landowners and redistributed it to landless people; lastly, they were given rights to vote for village leaders. By doing all this, the once enslaved and exploited people of china gained faith and freedom established the myth that only the ââ¬ËRed Armyââ¬â¢ was the true protector of China. In contrast, the GMD had no strong support from the peasants; and most of them felt no connection to the government. The GMD had no party organization helping the struggling provinces, and after the split of GMD and CCP in 1927, the support of common people was very low . On the military aspects, the CCP was disadvantaged in the number of arm forces. In 1945, the GMD had 5 million troops, while the CCP only and 1.25 troops. However, there are a few points which can turn this into an advantage. Firstly, they made use of guerilla warfare, which is extremely suitable for small troops to travel swiftly, change position; be precise and alert. Secondly, the communists selected high quality troops and trained them strictly with strong discipline. Lastly, the communists had similarà lifestyles between the leaders and soldiers, and with the peasant support, they sustained high morale within the Red Army. With all these advantages, we can see that in 1930-1931 Chiang Kai-shek sent 3 military expeditions to exterminate the Red Army, facing an army of 300000, the CCP defeated them all . Here, we can see how effective the guerrilla warfare is in facing a large amount of troops. In contrast, the GMD had huge troops and modern weapons . However, the GMD troops did not have strategies against the light armed and swift troops of the CCP. Moreover, because the life between the leaders and the soldiers had too much difference, they had low morale and did not have the full heart to fight for the GMD. In terms of economic aspects of the CCP, and they did not have a lot of expenses due to the guerilla warfare tactics, and the people can self-supply themselves with food, as they were all peasants. In contrast for the GMD, 65% of the stateââ¬â¢s budget was met by currency expansion and only 10% by taxes . Therefore, they were highly dependent on foreign aids of the US. The constant depreciation of the value of paper currency undermined in particular the morale in all jobs that were dependent upon the payment of salaries, including troops, officers and civilian officials. Their tolerance was limited and led to widespread corruption. In terms of political aspects, the CCP had made a lot of errors and had escaped destruction by a hairââ¬â¢s breadth, but they had an extraordinary resilience, refused to give up and learned from their mistakes . In 1927 after the failure of the autumn harvest uprising and retreated to Jinggang Shan, he noticed needed to win the hearts of the peasants; therefore, he adapted the Marxist theory and incorporated it into the peasants . Then, as he retreated with the remaining troops, he set his base in the Jinggang shan mountains where nationalists were far. Here, it shows that Mao learned from his mistakes. Furthermore in 1936 during the Japanese invasion, Mao forced the GMD to unite with them to defend the country, and here, we can also see that Mao truly cared for his country and did not just want power. In contrast, the GMD did not truly care for China. Firstly, the GMDââ¬â¢s support came from the wealthy city classes and landowners, which was a small population of China. Lastly, the GMD lacked passion and never learned fromà their mistakes, for example, in the final battle in 1948, when they were advised to concentrate his forces on the Huai River. The foreign issues were also a crucial point in the victory of the communists. During the Japanese invasions in 1937, the GMD, who were supposed to be in charge of china, conserved his forces for the inevitable civil war, and pinned their hopes of interventions of foreign powers to defeat Japan . Moreover, as the GMD is dealing with the Japanese invasions, it gave chance to the CCP to gain popularity, strengthen their armies, and give them time to expand in general. By 1945, party membership gained from 100,000 to 1.2 millionOther factors such as the ideology and the personalities of the Mao and Chiang played an important role in the victory of the Communists. In the ideology of communism by Marx, they were just supposed spread communism, but later, it was adapted by Mao to suit chinaââ¬â¢s conditions, focused on the peasantry as the main revolutionary force, instead of the workers. Meanwhile, the Nationalists did not remain to their original ideology, which was the three principles ââ¬â peopleââ¬â¢s livelihood, democracy and nationalism. For example, when Chiang gave the warlords a position in the government to develop urban areas, he ignored peopleââ¬â¢s livelihood. During the Japanese invasion, he ignored nationalism by relying on foreign aid, and in 1932, he ignored democracy by suppressing the media, books, and the press. Gradually, the GMD lost support and the people favored the Communists. In conclusion, the Communistsââ¬â¢ victory was due to the peasant support, political organization, and their use of military tactics in guerilla warfare. Also, the nationalistsââ¬â¢ incapability of governing, corruptions not remaining to the original ideology, and the lack of passion, leads to the downfall of the GMD. In addition to the foreign issues, the Japan invasions, the Communists truly won not only by forcing the GMD out of china physically, but winning the peopleââ¬â¢s hearts and minds. At last, the country with the largest population, China, is finally painted red. References Chinese Civil War 1946-1949. (2000., December 16). Wars of the World. Retrieved September 26, 2007, from http://www.onwar.com/aced/chrono/c1900s/yr45/fchina1946.htmElegant, R. S. (1972). Mao vs. Chiang: The Battle for China, 1925-1949. New York: A Thistle Book. Lescot, P. (2004). Before Mao (S. Rendall, Trans.). 10 East 53rd Street, NewYour, NY10022, USA: HarperCollins Publishers. (Original work published 1999)Marrin, A. (1989). Mao Tse-Tung and His China. 375 Hudson Street, New York 10014, USA: Puffin Group. Meins, B. (n.d.). Chinese history: The Chinese Civil War of 1927-1950 . In Helium where knowledge grows. Retrieved September 26, 2007, from Helium Web site: http://www.helium.com/tm/346350/chinese-civil-happen-momentShowalter, D. (2005, April). Decisive Encounters: The Chinese Civil War, 1946-1950. Retrieved September 26, 2007, from LookSmart Web site: http://findarticles.com/p/articles/mi_qa3686/is_200504/ai_n14681639Wood, J., & McManus, A. (1998). China Revolutionary Leadership (L. Day, Ed.). 6 Ride Way, Albany, Auckland, NewZealand: Macmillan Publishers. (Original work published 1998)
Subscribe to:
Posts (Atom)