Wednesday, May 6, 2020
Computer Technology Is It Responsible For Moral Or...
1. To say that computer professionals should be held solely responsible for moral or immoral practice in computer technology is a shortsighted argument, as users of computer technology are just as morally responsible. First, Gotterbarn is correct to say that computer professionals have a moral obligation to consider the possible negative outcomes of their advancements. However, to simply ignore the users of the technology would be highly unethical and irresonsible. To illustrate, consider the immense number of possible applications for computer technologies. Although computer professionals must do everything in their power to prevent negative side effects, accounting for every scenario would be a daunting, if not impossible, task. For example, the iPhone is an incredible general-purpose device capable of enriching its ownerââ¬â¢s life. However, some of its basic functions can be used to harm others in an immeasurable number of ways. For instance, the camera can be used in locatio ns where filming is illegal, such as a public washroom. Furthermore, computer technology has been integrated into almost every facet of life. From manufacturing to social media, there is an increasingly varied and numberous body of technology users. This only verifies that predicting the uses of technology is a tremendously difficult task. Finally, one might argue that if a computer professional develops a technology that has the capability to doharm, then he or she should rework their design. Yet if aShow MoreRelatedMoral And Ethical Implications Of 3d Printing Technology1478 Words à |à 6 Pages Moral and Ethical Implications of 3D Printing Technology In his work, ââ¬Å"Introduction: Nanotechnology, Society, and Ethicsâ⬠, CalPoly Associate Professor of Philosophy Patrick Lin writes, ââ¬Å"Letââ¬â¢s take a step back and consider any given technology we have created: gunpowder, the printing press, the camera, the automobile, nuclear power, the computer, Prozac, Viagra, the mobile phone, the Internet. Undoubtedly, these have brought us much good, but each has also changed society in important, fundamentalRead MoreThe Impact Of Corporate Politics On The Corporate World Essay1526 Words à |à 7 PagesOver the years, the corporate world has been and continues to be plagued with high profile scandals and unethical business practices on the pretext of creating social and business values. For most global companies, corporate social responsibility and sustainability have become mere watchwords despite the fact they claim being their prominent company agendas. The reality is companies are too blind and ruthless to draw lessons fro m the past. Exxonââ¬â¢s Climate change controversy(1980ââ¬â¢s), Nikeââ¬â¢s sweatshopRead MoreLegal Ethical Issues for It Practitioners2523 Words à |à 11 PagesIT Practitioners Brandy L. Spinks Business 670 Dr. Stephens December 20, 2010 Legal and Ethical Issues for IT Practitioners For ages thinkers have written hundreds of books in an effort to understand, explain, categorize, and label moral, immoral, an amoral human behavior and the rationales behind our actions. Yet, there still is not a universally accepted way of analyzing ethical situations (Hatcher Aragon, 2000) and ethical issues are not a favored topic for discussion in public arenasRead MoreCrt 205 Final Project2361 Words à |à 10 PagesCouncil-sponsored a multilateral treaty specifically addressing| |1 |Identify the principal issue presented by the |the requirement for investigation and prosecution of the computer network | | |source. |crimes. This treaty promotes a type of global law enforcement for computer | | | |network-based crimes covered under the treaty. | | | Read MoreInfluence Of Ethics On Technology3600 Words à |à 15 Pagesethics and technology seem to have no interaction. However, we see the influence of ethics on technology both from the profession and the public. For example the code of professional ethics has changed the procedures in different parts of science, engineering and technology, and has given a particular direction to the types of projects done, their scope, and implementations. The sensitivity of consumers to choose moral values has also resulted in the change of direction for many technologies. PublicRead MoreInternet Morality : Should It Be The Same As Real World Morality?2521 Words à |à 11 Pages Internet morality: Should it be the same as real world morality? Should we have the same expectations? Name: Stephen Donnelly Matric. No: 01012291 Programme: BEng (Hons) Computer Networks Systems Module: INF10101 ââ¬â Information: Society Security Assessment: Coursework Element 2: Essay Word Count: 1994 Declaration: I hereby confirm that this assignment is my own and has not been submitted for any other assessment. Abstract The aim of this paper is to examine the questionsRead MoreEasay7165 Words à |à 29 Pages | |Analyze the relationship among ethical, social, and political issues that are raised by information systems. | |Identify the main moral dimensions of an information society and specific principles for conduct that can be used to guide ethical decisions. | |Evaluate the impact of contemporary information systems and the Internet on the protection of individual privacy and intellectualRead More The Moral Degeneration of Broadcast Media Essay2368 Words à |à 10 Pagesà à à As our technologies advance and our collective morality decreases, the American people are faced with a dilemma which impacts greatly the foundation of our society. What is acceptable in the media? Broadcast media is the most widespread, effective, accessible means of conveying information in the world today. With 98% of American homes having a television set, and 2/3 of those homes receiving cable, TV and movies are the most pervasive means of corruption yet known to our society. So readilyRead MoreA Brief Note On Privacy And Electronic Monitoring2350 Words à |à 10 Pages Moral Rights in the Work Place Research Question: Privacy and Electronic Monitoring in the Work Place? Introduction: Work is one of the most important and highly valued human activities in large part because it is necessary for so many other central human goods. Moral Rights and Work are connected because by the actions of others opportunities to work can be jeopardized. The expansion and proliferation of technology has dawned a new era. Employers can easily monitor various side ofRead MoreInternets Adverse Effects on Teenagers1781 Words à |à 8 Pagesfigures above are a direct indication that there is an overwhelming increase in the number of teenagers accessing the internet over the last few years. This information implies that most teenagers are therefore openly vulnerable to some of the evil practices that go on over the internet. As a result, the society has continued to bring up teenagers who are morally corrupt. Refutation: It is important to note at this point that most teenagers are quickly getting addicted to internet use. Most teenagers
Why Sports Free Essays
Why Sports!! Why wouldnââ¬â¢t you play a sport? Everyone has something that they like that they are good at. Whether you are good at skating on ice, throwing balls, hitting balls, running, etc. , there are many different sports to learn about and play including baseball, basketball, hockey, and football. We will write a custom essay sample on Why Sports or any similar topic only for you Order Now Just by observing these sports you might see youââ¬â¢re into one that you like. I say everyone should play a sport. First of all baseball is a terrific team sport. It is a simple sport in that there is a diamond of bases and an outfield. Your goal on offense is that you want to hit the ball so that you are safe on one of the bases (the bases go clockwise). If the ball gets to the person on the base before you get there then you are out. On defense you are put in a certain position and if the ball comes to you on the ground you must throw it to which ever base that the runner is running to. If the ball is hit in the air and itââ¬â¢s caught then you are automatically out. There are nine innings in baseball. An inning is the period which each team hits once. Choose this sport if you like a nice, aggressive team game. Basketball is another simple sport that consists of two baskets and one ball. The first basketball hoop was made of peach buckets. The goal is to shoot the ball into the basket that your team is going at. Each basket is worth 2 points but if you shoot it from beyond the three point line then you get three points. There are certain rules like you canââ¬â¢t hold on to the ball and run or itââ¬â¢s traveling. And there are physical fouls like slapping and tripping stuff like that. If you get fouled then you get foul shots which count as one point. Choose this sport if you want to develop coordination. Football is a physical sport with hard hitting and a lot of running. Football was so popular that Galileo played it. The goal of this game is to get the football to the touchdown zone. If you accomplish this there then you get six points and then you can try for the extra point. For the extra point you have to kick the football through the field goal. In this game there are downs. If you obtain a 4th down then you will lose the football but if you make it past you have to get past the line then you keep the ball with a first down. Choose this sport if you like a fast, hard hitting game. Now if none of hose sports interest you then you might like calmer sports like golf, bowling, swimming or cheerleaders. Or there are extreme sports like sky diving, mountain climbing, cliff diving, air kicking volcano surfing, etc. Will not go into deep detail with these sports but if you are interested then check them hope you will hopefully try one of these sports for yourself. Sports out. Are fun and good exercise for your body. And even if you donââ¬â¢t do sports then try to go out an hour a day. How to cite Why Sports, Papers
Cloud Computing Cloud Service Structure
Question: Discuss about the Cloud Computing for Cloud Service Structure. Answer: 1. Definition of Cloud Computing Cloud computing is nothing but a structure that comprised of on- request, ubiquitous and convenient accessing of network to a shared pool of configurable computing resources such as servers, networks and services (Dinh et al., 2013). This network application can be released and provisioned with a minimum management effort or interaction between service providers. Cloud structure is comprised of five crucial characteristics within it. These are: self-service on-demand, broadly allowed network access, pooling of resources, rapid elasticity and measured services (Fernando et al., 2013). There are various service models available for different application based services. This cloud based model mainly follows three service models: Software as Service (SaaS), Platform as a Service (PaaS) and Infrastructure as a Service (IaaS). Figure 1: Cloud Computing (Source: Garg et al., 2013, p. 1020) Software as Service (SaaS): Every consumer is provided the competence to use the providers request running in the cloud substructure (Kliazovich et al., 2012). These applications are accessible with the help of client interface or a program interface. These application interfaces are controlled with the help of software platforms like Windows, Linux or Android etc. Platform as a Service (PaaS): The competence provided to the customers to prevent the storage, dispensation and other basic computing possessions from running the any arbitrary software. This includes operating system and applications as well (RittinghouseRansome, 2016). Figure 2: SaaS, PaaS and IaaS (Source: Wang et al., 2012, p. 230) Infrastructure as a Service (IaaS): The capability provided to the consumers is to deploy in to the cloud infrastructure. This can be done through the services, libraries or programming languages (Xu, 2012). The consumers do not directly the server but indirectly they have the control over these servers and networks. The consumers have the choice select the proper platform for their network and application. Advantages of Cloud Computing There are various advantages of cloud computing applications, these benefits are explained bellow: Flexibility: Cloud based application are perfect for the business with increasing fluctuating bandwidth demands (ZissisLekkas, 2012). Cloud allows the flexible range of increase in the scale of cloud capacity. Disaster recovery: Business of all sizes is investing their money for the disaster recovery. This is more than ideal than reality seems to be because of cloud service. Automatic software update: The cloud service providers always take care of the software updates so the consumers do not feel disturbance during their operation (Chen Zhao, 2012). Capital- expenditure Free: Cloud platform provides consumers the minimal rate for total application as the hardware cost is minimized. Increased collaboration:A Cloud service provides the user to operate more than one application at a time. Cloud based workflow and file sharing app supports this. Work from anywhere: Cloud service provides the high accessibility from any place of the world, this makes it more compatible (Moreno-Vozmediano et al., 2013). Document control: One application handles more than several document related to each individual. Cloud based platform provides this facility to the users. Security: Cloud service provides special protection to the documents and applications from being hacked or leaked. Competitiveness: Among all of the services in the market cloud service is the most compatible service that have platform independent feature that make it more competitive in the market place (Dinh et al., 2013). Environment friendly: When the cloud needs to fluctuate the server capacity scales up and down accordingly to match this change. 2. Implementation of SaaS for ABC Payrolls Software as a Service provides the capability to the consumers for accessing the interfaces through software help. ABC Payrolls can also implement SaaS to improvise their database handling capability through software support. This aspect will make the organization more competitive in the marketplace (Garg et al., 2013). Following are the considered benefits and challenges for ABC Payrolls if they implement SaaS within their organization: Advantages and Use of SaaS Providers for ABC Payrolls There are several advantages of applying SaaS model with ABC Payrolls, these are as follows: Lower cost of entry: In case SaaS the user dont have to buy a new hardware set up for establishing connection. So entry cost is low (Kliazovich et al., 2012). Reduced time to benefit: SaaS model is configured and installed from the begging, therefore rapid prototyping is possible. Pay according to demands: In the SaaS platform users dont have to pay excessive amount, they only pay what they are using (RittinghouseRansome, 2016). Upgrade and updated facility: The SaaS providers systematically update and upgrade the applications. High adoption rate: SaaS is platform independent, therefore it adaptation rate so much high (Kliazovich et al., 2012). Integration and scalability:This application supports the customization of business purpose. It allows internal service like ERP, CRM as well as external applications. Work anywhere: This application is usable at place the user wants. Its platform independence property helps it to be more compatible (Wang et al., 2012). Challenges to the use of SaaS provider for ABC Payrolls Following are the challenges that may be faced by ABC Payrolls: Security and privacy testing: All the users are living in the multi- tenant environment that must ensure safety, accessibility and confidentiality concerns (Xu, 2012). Therefore, the SaaS platform should assures the user that the platform should share the data with any other tenant. Frequent release of data: The frequent updates and upgrades from the SaaS developer make many problematic issues in front of the users that may harm their utilization. Performance testing: It is the most usable platform by users, so maintain their demands and competing with the trends SaaS platform should regularly tested for its performance rating (Zissis Lekkas, 2012). Integration and migration: Migrating to any other platform SaaS needs to check both the outgoing and incoming data, this is one of the disadvantages of SaaS. Business knowledge: Business knowledge should be in mind of the SaaS developer, as it specifically built for business applications (Chen Zhao, 2012). Licensing: This varies according to usages by users. Numbers of concurrent user are mainly influence in this case. 3. Difference between the Migration and Implementation Process of IaaS in ABC Payrolls Below the difference between conventional applications followed by ABC Payrolls and IaaS is discussed with explanations: Figure 3: Important factors affecting migration and implementation of IaaS in ABC Payrolls (Source: Moreno-Vozmediano et al., 2013, p. 20) Factors Implementation of IaaS in ABC at beginning Migration of services from regular information structure to IaaS Compatibility for meeting future demands The upgrade and update techniques concerned with the cloud services make this application more compatible in the competitive market of ABC Payrolls. This will satisfy their objectives properly. Migration of conventional services may be suggested for improving the on- going condition on ABC Payrolls. This can maintain a sustainable system for the organization. Complexity The applications provided by the cloud services are very much easy to be operated by the users, as these applications are platform independent and compatible with any kind of critical situation (Wang et al., 2012). At the beginning of the ABC Payrolls it was very tough to implement cloud services within their organization, but migration of services will leads to sustainable situation for ABC Payrolls (Chen Zhao, 2012). Scalability Cloud services are compatible with any kind platform. So the scalability of the application increases. In case of migration of services it is also helpful, as in this case both the services involved in the operational measures. Supporting applications Supporting applications are: IaaS, PaaS and SaaS (Kliazovich et al., 2012). Operational structures of data, networking etc. are the supporting applications for the migrated platform. Performance Cloud application is dominating the marketplace in case of business applications. In case of migrated service the performance level is almost very high, as the services are combined with each other. Reliability This system less reliable than migrated one. This system is more reliable than conventional cloud services (RittinghouseRansome, 2016). Suggestion for the Best Way to be implemented in the ABC Payrolls According to the study done non- cloud and cloud based application; it will be beneficial for ABC Payrolls to migrate their system from conventional cloud service to IaaS (ZissisLekkas, 2012). This will provide them high scalability, reliability several other benefits. In addition to this, migration will reduce cost involved with in the transformation of service, as they can use convention equipment as well as their old employees to operate them. This aspect will bring loyalty benefits to them. References Chen, D., Zhao, H. (2012, March). Data security and privacy protection issues in cloud computing. InComputer Science and Electronics Engineering (ICCSEE), 2012 International Conference on(Vol. 1, pp. 647-651).IEEE. Dinh, H. T., Lee, C., Niyato, D., Wang, P. (2013). A survey of mobile cloud computing: architecture, applications, and approaches.Wireless communications and mobile computing,13(18), 1587-1611. Fernando, N., Loke, S. W., Rahayu, W. (2013). Mobile cloud computing: A survey.Future Generation Computer Systems,29(1), 84-106. Garg, S. K., Versteeg, S., Buyya, R. (2013). A framework for ranking of cloud computing services.Future Generation Computer Systems,29(4), 1012-1023. Kliazovich, D., Bouvry, P., Khan, S. U. (2012).GreenCloud: a packet-level simulator of energy-aware cloud computing data centers.The Journal of Supercomputing,62(3), 1263-1283. Moreno-Vozmediano, R., Montero, R. S., Llorente, I. M. (2013). Key challenges in cloud computing: Enabling the future internet of services.IEEE Internet Computing,17(4), 18-25. Rittinghouse, J. W., Ransome, J. F. (2016).Cloud computing: implementation, management, and security.CRC press. Wang, C., Wang, Q., Ren, K., Cao, N., Lou, W. (2012). Toward secure and dependable storage services in cloud computing.IEEE transactions on Services Computing,5(2), 220-232. Xu, X. (2012). From cloud computing to cloud manufacturing.Robotics and computer-integrated manufacturing,28(1), 75-86. Zissis, D., Lekkas, D. (2012).Addressing cloud computing security issues.Future Generation computer systems,28(3), 583-592.
Wednesday, April 29, 2020
Relational Overview of America and Chinese Economies
Introduction Market economy is characterized by free movement of goods and services. The market involves price determination by laws of supply and demand without interference from the government. In contrast, a socialist market does not allow the market to dictate prices.Advertising We will write a custom research paper sample on Relational Overview of America and Chinese Economies specifically for you for only $16.05 $11/page Learn More Prices in a socialist market are set by external forces, such as government. For example, through monopolization of factors of production by the Chinese government, the prices of commodities are centrally determined. The current essay is an attempt to look at the relationships between the US and China regarding their trade and Foreign Direct Investment (FDI). The essay will also contrast their types of markets and look at quality control issues China is facing in exporting commodities to the US. Trade Relationship Betwee n US and China The United States has a low saving rate that has resulted in frequent deficits in federal budgets and shortage of domestic investment funds. To bridge these gaps, the United States has to borrow from countries with high saving rates such as China. In 2009, the International Monetary Fund (IMF) ranked US as the global leader in foreign capital importation with a global total of 38.2 percent. China was also ranked first among foreign capital exporters with a global total of 24.2 percent. The difference in saving rates has encouraged trade between US and China as the former tries to reduce domestic deficit, and the latter tries to invest the surplus. However, balance of trade is tilted to the favour of China (Morrison and Labonte 1; Schnabil and McKinnon 1). Difference Between US Market Economy and Chinaââ¬â¢s Socialist Market The Peopleââ¬â¢s Republic of China (PRC) practises a type of market known as ââ¬Å"Market Socialismâ⬠. This type of market is characte rized by ownership of means of production by the communist party or the state. The United States, on the other hand, practices a democratic market or what has come to be known as ââ¬Å"free marketâ⬠.Advertising Looking for research paper on business economics? Let's see if we can help you! Get your first paper with 15% OFF Learn More Although the PRC has been trying to decentralize its economy and move towards capitalistic economy, much of its assets are still under the control of the state. The PRC has a strong influence on the currency as it still maintains total control of Commercial Banks. Huang (118) asserts that in 1995 China forced private companies like Urban Credit Cooperatives (UCC) to surrender a bulk of shares to the municipal governments. Although both the United States and China have invested heavily in each otherââ¬â¢s economies, the balance of trade favours China. Between 2003 and 2009, the US capital provided 29.0 percent of foreign direct in vestment (FDI) in China. However, the investment of Peopleââ¬â¢s Republic of China (PRC) in the United States has been substantially smaller. For example, during the same period (2003-2009), PRC contributed to less than one percent of US inflows. Comparatively, the average total foreign investment between the two countries has been $ 84 billion per year in the United States and $ 91 billion per year in China indicating a US trade deficit (Hufbauer and Woollacott 3). China has adopted an economic policy that enables it to intervene in currency markets and limit its appreciation against the dollar (and other currencies). This has made it not only the world largest holder of foreign exchange, but also the fastest growing holder. As of June 2011, China was holding $ 3.2 trillion. China recycles some of this money back to the U.S. through investing in U.S. shares and long-term treasury bills (T-Bills). Why China Is Keeping the US Dollar in its reserves The major reasons as to why Chin a is keeping the US dollar in its reserves is to prevent the Chinaââ¬â¢s currency (renminbi) from appreciating against the dollar, and thus they have to purchase more and more dollars. Consequently, Chinaââ¬â¢s foreign exchange reserve as of June 2011 grew to a staggering amount of $ 3.2 trillion (Morrison and Labonte 4).Advertising We will write a custom research paper sample on Relational Overview of America and Chinese Economies specifically for you for only $16.05 $11/page Learn More Quality control issues faced by China in exporting materials to the US: Corporation or Chinese problem? The US has adopted stringent quality control measures against goods imported from China because it believes that China could be exporting some inferior goods to the US market, and thus turning the US market into a dumping site for low quality products. Conclusion The saving rate differences between the US and China has spurred trade between the two nations. Beca use of the low saving rate in US, its economy is dependent on nations like China, which has high saving rates. However, the balance of trade is tilted towards China. China has a trade surplus and thus exports this surplus to US in form of foreign direct investments (FDI). The Chinese government has amassed large US dollar in its reserves so as to prevent the currency (renminbi) from appreciating against the dollar. Although China and United States are trading partners, their markets are quite different. The use practises a market economy while Chinaââ¬â¢s market is socialistic. The latter dictates prices while the former is a free market where prices are determined through laws of demand and supply. Despite their cooperation in trade, the United States and China are engaged in occasional trade in regards to quality of goods. The United States accuses China of turning its market into a dumping site of low quality goods. Works cited Huang, Yasheng. Selling China: Foreign Direct Inv estment during the Reform Era, Cambridge: Cambridge University Press, 2003. Print. Hufbauer, Gary, and Jared Woollacott 2010, Trade Disputes Between China and the United States: Growing Pains so Far, Worse Ahead? PDF file. 6 Dec. 2012. https://piie.com/publications/wp/wp10-17.pdf.Advertising Looking for research paper on business economics? Let's see if we can help you! Get your first paper with 15% OFF Learn More Morrison, Wayne, and Marc Labonte. Chinaââ¬â¢s Holdings of U.S. Securities: Implications for the U.S. Economy, Washington DC: Congressional Research Service, 2011. Print. Schnabl, Gunther, and Ronald McKinnon. ââ¬Å"China and Its Dollar Exchange Rate: A Worldwide Stabilising Influence?â⬠The World Economy 35.1 (2012): 1-27. Print. This research paper on Relational Overview of America and Chinese Economies was written and submitted by user Alaya Bruce to help you with your own studies. You are free to use it for research and reference purposes in order to write your own paper; however, you must cite it accordingly. You can donate your paper here.
Monday, April 13, 2020
Create a Tweet College Essay Sample
Create a Tweet College Essay SampleTwitter is the newest social networking website, and because of its popularity, many students are using it to create a tweet college essay sample. However, you should know that it can take a lot of time before you can get all the words down, which means you need to have a plan in place and stick to it.One of the best ways to complete a tweet college essay sample is to start by writing in a pre-approved topic. In other words, think of a subject that has been taught in an English class, or a subject you know anything about. Once you have decided on a topic, write the entire article without deviation from the topic.You also want to put your text in a Twitter timeline, which makes it easy for others to follow along. Your tweet college essay sample can help guide you as you learn how to write a tweet essay.When you are first writing a tweet college essay, you should remember to write for clarity and brevity. Remember to use a topic that is relevant to th e essay that you are writing. You don't want to bore your readers with too much detail; if you don't know much about the topic, then you don't have to go into it too much.Also, keep in mind that the style of writing a tweet college essay sample is similar to how you would write a book review. Don't be afraid to read between the lines, just remember that when you begin writing, you need to make sure your writing style is clear.Before you finish, make sure that you actually have your tweet college essay sample ready to show the class. Many students come unprepared when they want to complete a tweet college essay sample, so make sure you have it ready to show off.Ifyou find that you need to improve your tweet college essay sample, don't worry. Because once you finish this first draft, you will probably want to start over.
Friday, March 20, 2020
All About Serializing in Visual Basic
All About Serializing in Visual Basic Serialization is the process of converting an object into a linear sequence of bytes called a byte stream. Deserialization just reverses the process. But why would you want to convert an object into a byte stream? The main reason is so you can move the object around. Consider the possibilities. Since everything is an object in .NET, you can serialize anything and save it to a file. So you could serialize pictures, data files, the current state of a program module (state is like a snapshot of your program at a point in time so you could temporarily suspend execution and start again later) ... whatever you need to do. You can also store these objects on disk in files, send them over the web, pass them to a different program, keep a backup copy for safety or security. The possibilities are quite literally endless. Thats why serialization is such a key process in .NET and Visual Basic. Below is a section on custom serialization by implementing the ISerializable interface and coding a New and a GetObjectData subroutine. As a first example of serialization, lets do one of the easiest programs, but also one of the most useful: serializing data, and then deserializing data in simple class to and from a file. In this example, the data is not only serialized, but the structure of the data is saved too. The structure here is declared in a module to keep things ... well ... structured. Module SerializeParmsSerializable() Public Class ParmExampleà à à Public Parm1Name As String Parm1 Nameà à à Public Parm1Value As Integer 12345à à à Public Parm2Name As Stringà à à Public Parm2Value As DecimalEnd ClassEnd Module Then, individual values can be saved to a file like this: Imports System.Runtime.Serialization.Formatters.BinaryImports System.IOPublic Class Form1à à à Private Sub mySerialize_Click( _à à à à à à ByVal sender As System.Object, _à à à à à à ByVal e As System.EventArgs) _à à à à à à Handles mySerialize.Clickà à à à à à Dim ParmData As New ParmExampleà à à à à à ParmData.Parm2Name Parm2 Nameà à à à à à ParmData.Parm2Value 54321.12345à à à à à à Dim s As New FileStream(ParmInfo, FileMode.Create)à à à à à à Dim f As New BinaryFormatterà à à à à à f.Serialize(s, ParmData)à à à à à à s.Close()à à à End SubEnd Class And those same values can be retrieved like this: Imports System.Runtime.Serialization.Formatters.BinaryImports System.IOPublic Class Form1à à à Private Sub myDeserialize_Click( _à à à à à à ByVal sender As System.Object, _à à à à à à ByVal e As System.EventArgs) _à à à à à à Handles myDeserialize.Clickà à à à à à Dim s New FileStream(ParmInfo, FileMode.Open)à à à à à à Dim f As New BinaryFormatterà à à à à à Dim RestoredParms As New ParmExampleà à à à à à RestoredParms f.Deserialize(s)à à à à à à s.Close()à à à à à à Console.WriteLine(RestoredParms.Parm1Name)à à à à à à Console.WriteLine(RestoredParms.Parm1Value)à à à à à à Console.WriteLine(RestoredParms.Parm2Name)à à à à à à Console.WriteLine(RestoredParms.Parm2Value)à à à End SubEnd Class A Structure or a collection (such as an ArrayList) rather than a Class could also be serialized to a file this same way. Now that we have gone over the basic serializing process, lets look at the specific details that are part of the process on the next page. One of the first things you should notice about this example is the Serializable() attribute in the Class. Attributes are just more information that you can provide to VB.NET about an object and theyre used for a lot of different things.à The attribute in this code tells VB.NET to add extra code so that later on, everything in this class can be serialized. If there are specific items in the Class that you dont want to be serialized, you can use the NonSerialized() attribute to exclude them: NonSerialized() Public Parm3Value As String Whatever In the example, notice is that Serialize and Deserialize are methods of the BinaryFormatter object (f in this example). f.Serialize(s, ParmData) This object takes the FileStream object and the object to be serialized as parameters. Well see that VB.NET offers another object that allows the result to be expressed as XML. And one final note, if your object includes other subordinate objects, theyll be serialized too! But since all objects that are serialized must be marked with the Serializable() attribute, all of these child objects must be marked that way too. Just to be completely clear about what is happening in your program, you might want to display the file named ParmData in Notepad to see what serialized data looks like. (If you followed this code, it should be in the bin.Debug folder in your project.) Since this is a binary file, most of the content isnt readable text, but you should be able to see any strings in your serialized file. Well do an XML version next and you might want to compare the two just to be aware of the difference. Serializing to XML instead of a binary file requires very few changes. XML isnt as fast and cant capture some object information, but its far more flexible. XML can be used by just about any other software technology in the world today. If you want to be sure your file structures dont tie you into Microsoft, this is a good option to look into. Microsoft is emphasizing LINQ to XML to create XML data files in their latest technology but many people still prefer this method. The X in XML stands for eXtensible. In our XML example, were going to use one of those extensions of XML, a technology called SOAP. This used to mean Simple Object Access Protocol but now its just a name. (SOAP has been upgraded so much that the original name doesnt fit that well anymore.) The main thing that we have to change in our subroutines is the declation of the serialization formatter. This has to be changed in both the subroutine that serializes the object and the one that deserializes it again. For the default configuration, this involves three changes to your program. First, you have to add a Reference to the project. Right-click the project and select Add Reference .... Make sure ... System.Runtime.Serialization.Formatters.Soap ... has been added to the project. Then change the two statements in the program that references it. Imports System.Runtime.Serialization.Formatters.SoapDim f As New SoapFormatter This time, if you check out the same ParmData file in Notepad, youll see that the whole thing is in readable XML text such as ... Parm1Name idref-3Parm1 Name/Parm1NameParm1Value12345/Parm1ValueParm2Name idref-4Parm2 Name/Parm2NameParm2Value54321.12345/Parm2Value There is also a lot of additional XML there thats necessary for the SOAP standard in the file as well. If you want to verify what the NonSerialized() attribute does, you can add a variable with that attribute and look at the file to verify that its not included. The example we just coded only serialized the data, but suppose you need to control how the data is serialized. VB.NET can do that too! To accomplish this, you need to get a little deeper into the concept of serialization. VB.NET has a new object to help out here: SerializationInfo. Although you have the ability to code custom serialization behavior, it comes with a cost of extra coding. The basic extra code is shown below. Remember, this class is used instead of the ParmExample class shown in the earlier example. This isnt a complete example. The purpose is to show you the new code that is needed for custom serialization. Imports System.Runtime.SerializationSerializable() _Public Class CustomSerializationà à à Implements ISerializableà à à data to be serialized hereà à à Public SerializedVariable as Typeà à à Public Sub New()à à à default constructor when the classà à à is created - custom code can beà à à added here tooà à à End Subà à à Public Sub New( _à à à à à à ByVal info As SerializationInfo, _à à à à à à ByVal context As StreamingContext)à à à à à à initialize your program variables fromà à à à à à a serialized data storeà à à End Subà à à Public Sub GetObjectData( _à à à à à à ByVal info As SerializationInfo, _à à à à à à ByVal context As StreamingContext) _à à à à à à Implements ISerializable.GetObjectDataà à à à à à update the serialized data storeà à à à à à from program variablesà à à End SubEnd Class The idea is that now you can (and, in fact, you must) do all of the updating and reading of data in the serialized data store in the New and GetObjectData subroutines. You must also include a generic New constructor (no parameter list) because youre implementing an interface. The class will normally have formal properties and methods coded as well ... Generic PropertyPrivate newPropertyValue As StringPublic Property NewProperty() As Stringà à à Getà à à à à à Return newPropertyValueà à à End Getà à à Set(ByVal value As String)à à à à à à newPropertyValue valueà à à End SetEnd Property Generic MethodPublic Sub MyMethod()à à à method codeEnd Sub The resulting serialized class can create unique values in the file based on the code you supply. For example, a real-estate class might update a the value and address of a house but the class would serialize a calculated market classification as well. The New subroutine will look something like this: Public Sub New( _à à à ByVal info As SerializationInfo, _à à à ByVal context As StreamingContext)à à à initialize your program variables fromà à à a serialized data storeà à à Parm1Name info.GetString(a)à à à Parm1Value info.GetInt32(b)à à à New sub continues ... When Deserialize is called on a BinaryFormatter object, this sub is executed and a SerializationInfo object is passed to the New subroutine. New can then do whatever is necessary with the serialized data values. For example ... MsgBox(This is Parm1Value Times Pi: _à à à (Parm1Value * Math.PI).ToString) The reverse happens when Serialize is called, but the BinaryFormatter object calls GetObjectData instead. Public Sub GetObjectData( _à à à ByVal info As SerializationInfo, _à à à ByVal context As StreamingContext) _à à à Implements ISerializable.GetObjectDataà à à update the serialized data storeà à à from program variablesà à à If Parm2Name Test Thenà à à à à à info.AddValue(a, This is a test.)à à à Elseà à à à à à info.AddValue(a, No test this time.)à à à End Ifà à à info.AddValue(b, 2) Notice that the data is added to the serialized file as name/value pairs. A lot of the web pages Ive found in writing this article dont seem to have actual working code. One wonders whether the author actually executed any code before writing the article sometimes.
Wednesday, March 4, 2020
Filling Vacancies in the US Senate
Filling Vacancies in the US Senate Senate seats become vacant for a variety of reasons the Senator dies in office, resigns in disgrace or resigns to assume another position, usually an elected or appointed government position.What happens when a Senator dies in office or resigns? How is the replacement handled?Procedures for electing Senators are outlined in Article I, Section 3 of the U.S. Constitution, as later amended by paragraph 2 of the Seventeenth (17th) Amendment. Ratified in 1913, the 17th Amendment not only changed how Senators are to be elected (direct election by popular vote) but it also outlined how Senate vacancies are to be filled: When vacancies happen in the representation of any State in the Senate, the executive authority of such State shall issue writs of election to fill such vacancies: Provided, That the legislature of any State may empower the executive thereof to make temporary appointments until the people fill the vacancies by election as the legislature may direct. What Does This Mean in Practice? The U.S. Constitution grants the state legislatures the power to determine how U.S. Senators are to be replaced, including empowering the chief executive (the governor) to make these appointments.Some states require a special election to fill a vacancy. A few states require the governor to appoint a replacement of the same political party as the previous incumbent. Typically, a replacement holds office until the next scheduled statewide election.From the Congressional Research Service: Prevailing practice is for state governors to fill Senate vacancies by appointment, with the appointee serving until a special election has been held, at which time the appointment expires immediately. In the event a seat becomes vacant between the time of a general election and the expiration of the term, however, the appointee usually serves the balance of the term, until the next regularly scheduled general election. This practice originated with the constitutional provision that applied prior to the popular election of senators, under which governors were directed to make temporary appointments when state legislatures were in recess. It was intended to ensure continuity in a stateââ¬â¢s Senate representation during the lengthy intervals between state legislative sessions. Exceptions or Where Governors Do Not Have Unlimited Powers: Alaska, Oregon, and Wisconsin do not allow the governor to make interim appointments; state laws require a special election to fill any Senate vacancy. Oklahoma also requires that Senate vacancies be filled by special elections, with an exception. If the vacancy occurs after March 1 of any even-numbered year and the term expires the following year, no special election is held; rather, the governor is required to appoint the candidate elected in the regular general election to fill the unexpired term. Arizona and Hawaii require the governor to fill Senate vacancies with a person affiliated with the same political party as the previous incumbent. Utah and Wyoming require the governor to select an interim senator from a list of three candidates proposed by the state central committee of the political party with which the previous incumbent was affiliated. In the event of a Senatorââ¬â¢s death, his or her staff continue to be compensated for a period not exceeding 60 days (unless the Senate Committee on Rules and Administration determines that more time is needed to complete the closing of the office), performing duties under the direction of the Secretary of the Senate.
Subscribe to:
Posts (Atom)