Saturday, December 28, 2019

How to Exchange Data Over a Network Using Delphi

Of all the components that  Delphi provides to support applications that exchange data over a network (internet, intranet, and local), two of the most common are  TServerSocket and TClientSocket, both of which are designed to support read and write functions over a TCP/IP connection. Winsock and Delphi Socket Components Windows Sockets (Winsock) provides an open interface for network programming under the Windows operating system. It offers a set of functions, data structures, and related parameters required to access the network services of any protocol stacks. Winsock acts as a link between network applications and underlying protocol stacks. Delphi socket components (wrappers for the Winsock) streamline the creation of applications that communicate with other systems using TCP/IP and related protocols. With sockets, you can read and write over connections to other machines without worrying about the details of the underlying networking software. The internet palette on the Delphi components toolbar hosts the TServerSocket and TClientSocket components as well as TcpClient, TcpServer,  and TUdpSocket. To start a socket connection using a socket component, you must specify a host and a port. In general, host specifies an alias for the IP address of the server system; port specifies the ID number that identifies the server socket connection. A Simple One-Way Program to Send Text To build a simple example using the socket components provided by Delphi, create two forms—one for the server and one for the client computer. The idea is to enable the clients to send some textual data to the server. To start, open Delphi twice, creating one project for the server application and one for the client. Server Side: On a form, insert one TServerSocket component and one TMemo component. In the OnCreate event for the form, add the next code: procedure TForm1.FormCreate(Sender: TObject);begin ServerSocket1.Port : 23; ServerSocket1.Active : True;end; The OnClose event should contain: procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);begin ServerSocket1.Active : false;end; Client Side: For the client application, add a TClientSocket, TEdit, and TButton component to a form. Insert the following code for the client: procedure TForm1.FormCreate(Sender: TObject);begin ClientSocket1.Port : 23; //local TCP/IP address of the server ClientSocket1.Host : 192.168.167.12; ClientSocket1.Active : true;end;procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);begin ClientSocket1.Active : false;end;procedure TForm1.Button1Click(Sender: TObject);beginif ClientSocket1.Active then ClientSocket1.Socket.SendText(Edit1.Text);end; The code pretty much describes itself: when a client clicks a button, the text specified inside the Edit1 component will be sent to the server with specified port and host address. Back to the Server: The final touch in this sample is to provide a function for the server to see the data the client is sending. The event we are interested in is OnClientRead—it occurs when the server socket should read information from a client socket. procedure TForm1.ServerSocket1ClientRead(Sender: TObject; Socket: TCustomWinSocket);begin Memo1.Lines.Add(Socket.ReceiveText);end; When  more than one client sends data to the server, youll need a little more to code: procedure TForm1.ServerSocket1ClientRead(Sender: TObject; Socket: TCustomWinSocket);var i:integer; sRec : string;beginfor i : 0 to ServerSocket1.Socket.ActiveConnections-1 dobeginwith ServerSocket1.Socket.Connections[i] dobegin sRec : ReceiveText; if sRecr thenbegin Memo1.Lines.Add(RemoteAddress sends :) ; Memo1.Lines.Add(sRecr); end; end; end;end; When the server reads information from a client socket, it adds that text to the Memo component; both the text and the client RemoteAddress are added, so youll know which client sent the information. In more sophisticated implementations, aliases for known IP addresses can serve as a substitute. For a more complex project that uses these components, explore the Delphi Demos Internet Chat project. Its a simple network chat application that uses one form (project) for both the server and the client.

Friday, December 20, 2019

My Experience In My Life - 723 Words

-The environment in which I was raised was great. It was better than I would have ever asked for. My childhood was filled with so much love. I have a ton of amazing memories and moments that I will cherish for the rest of my life. My family, my home, and the environment in which I was raised definitely shaped me into who I am today. I am truly grateful for how I was raised. - My family is amazing and I am very grateful for them. They were the first ones to teach me how to love unconditionally. They have given and taught me so many things that have helped me become who I am today. I am very close to my mothers side of the family they have always been there for me and they are truly the ones who have shaped me. Everything I am today is†¦show more content†¦This home is where we have all been together, spent time together, and enjoyed being with each other. Now my home is in Alice with my mom, stepfather, brother, sister, and pets. Although it wasnt my first home this is where I grew from a child to a teen. This home also contains many memories and also many firsts. Its where I enjoy going because I know my family is there. No matter what my home will always be where my family is they are the most important people to me. -My family has shaped me to become smart and strong. Without them knowing and me myself even knowing they have shown me the importance and value of family and love. They gave me the tools I needed to become smart and strong. They taught me right from wrong. They taught me to be polite and kind. They taught me to have manners. They taught me to never give up. They taught me to value my education. They taught me to always strive to be the best version of myself. They have given me so much love and support. They taught me to go after my dreams. They taught me to learn from my mistakes. Who I am today I owe to them. My family, home, and the environment I was raised in shaped me to be a strong, smart, kind, caring, loving, and independent young woman. They shaped me to want to become everything I am today. If it wasnt for them who knows if I would be shaped into the person I am today. Everything that has happened in my life has helped me become who I am today. Whether it was good,Show Mor eRelatedMy Experience In My Life742 Words   |  3 Pagesone has a perfect life or even a perfect family. At times I have experienced what losing someone or something that meant so much to me. I always wondered to myself about why these situations happen to me, which also led me to put myself in a depression stage. My father was diagnosed with liver cancer and infection in his stomach area in March 2015. As he was in and out of the hospital. First, Growing up I never had a good life but I was lucky to have both of my parents in my life. It was a bond withRead MoreMy Experience In My Life1013 Words   |  5 Pages At this point in my life , if i review my previous experiences i would say that i am fairly pleased. Ive been able to gain numerous life and academic skills through hard work and determination. Though many of my experiences havent been pleasant ,in a way it has helped me grow and build my character as a person. As individuals we all go through many harsh obstacles , obstacles we sometimes think we will never overcome . but eventually we do . right ? think about it evenRead MoreMy Experience With My Life1356 Words   |  6 Pagesdo not have an abundant number of passions myself. In fact, as I think about it there are really only two subjects of interest that I feel rise to the level of passion for me; my God and sports. These two areas have been integral parts of my life for as long as I can remember. I grew up in the church and much of my young life was spent either there or on a sports field of some sort. These two institutions, I feel have shaped me into the adult that I have become and the career I feel myself called toRead MoreMy Experience On My Life1202 Words   |  5 PagesAll I could think of sitting at my desk at work was about the conversation me and my husband had the night before. I sat there staring at my computer screen wondering if it was the right thing to do, or was I just wasting my time on a hope long forgotten. The hours slowly ticked by, and everything I was working on with my customers and their loans were a blur. I couldn’t get that thought out of my head. It was eating away at me. This is something that I have wanted for a long time. I put it on holdRead MoreMy Experience In My Life942 Words   |  4 PagesThroughout a person’s life, there can be many things, such as friends and family, education, or sports, that help them develop skills to turn them into the person they are today. Without these different skills, it can possibly lead to a lower standard of living, which is not what we strive for. The thing that helped me develop my unique skill set that I can use through the rest of my life, which is also my cultural artifact, is a football. Football has taught many different things that I am ableRead MoreMy Experience In My Life905 Words   |  4 Pagesmajority of my life I have belonged in the little world , stretching from Chicago to Cleveland and South Bend to Nashville. The boundaries of my known world have always felt like a limiting factor in my life. While my friends ventured to far away lands every year, I would spend the night at my grandparents house or we would make a day-trip to a city. With spring break approaching my family and I were going to change that, we were going to South Carolina. One dreary cold Indiana morning my family andRead MoreMy Personal Experience : My Experience In My Life1003 Words   |  5 Pagesdifficult to write about my life—not because I do not know what to say, but because I am often fearful of sharing my experiences and having them impact how people view me. My identity and upbringing are not necessarily unique, but I have been in situations that society tends to be uncomfortable with. Repeated sexual assaults, psychological abuse, neglect, and financial hardships are factors in my life that I tried to forget when I started college. Now that I am at the end of my undergraduate educationRead MoreMy Writing Experience : My Experience In My Life921 Words   |  4 PagesAs a Human, throughout life there are many skills that are critical to acquire, during childhood and as you become older. One of the most important and useful skill you will need is writing. From first, learning to write words and sentences, to more advanced writing like essays. Everyone learns to write a little differently, some ways are learning from your parents or learning words and letters in kindergarten. As you get further down the path of life you develop higher skills of writing. As peopleRead MoreMy Experience On My Life953 Words   |  4 PagesThe wind was slicing through my hair as my sweat was dripping off my metallic purple frames. I placed each foot on each of the pedals and took off. My whole world was filled with the rattling sounds coming from the dreaded training wheels. Everything would always come to a stop whenever I would hit each bump. â€Å"I need to get these thing off!† I thought constantly. The training wheels were such a nuisance because they gave me a wobble that kept me off balance, and they provided no extra speed. ThereRead MoreMy Experience In My Life1850 Words   |  8 Pagesthrough while growing up and forming into the person I am today. Going through all the experiences I have gone through, I didnâ€⠄¢t realize how much they would impact me today and serve as lessons. Today I am a freshman in college. I did not think I would make it this far. The precious gift of life is to enjoy every moment as if it is your last. May 12, 2007. Boom. A sound I will remember forever. My eyes are wide and my jaw drops. I can’t believe what I’m seeing. Let’s start from the beginning. On this

Thursday, December 12, 2019

Tourism in Australia

Question: Discuss about the Tourism in Australia. Answer: Inroduction: Tourism in Australia is an important part of the economy of the country. This industry contributes a huge amount to the GDP of the country (Mahadevan 2014). Tourism in Australia involves visit of the international and national visitors (Amelung and Nicholls 2014). Australia has a diverse geographic features ranging from mountains to oceans, desserts to plain lands, which attract visitors from all over the world. It was seen that certain special attraction of every country attracts the visitors to their country. In this assignment, the destinations that attract tourists most to Australia would be explored. Information would be given about the process of data collection and methods of analysis of the data. The expected outcome of the analysis would also be discussed in this assignment. Problem Statement The problem statement of the research is to identify the destination that attracts most of the tourists to Australia. Research Aim The aim of the research is to find the most attractive tourist destination of Australia that attracts the tourists to visit Australia. Research Objective The objective of the research is as follows: To understand the tourism industry of Australia To find out the most attractive tourist destination of Australia Research Questions The research questions are as follows: How did the tourism industry in Australia change over the last ten years? Which is the most preferred destination of Australia by the tourists of Australia? What is the most desired special attraction of Australia that attracts maximum tourists? Literature Review According to the viewpoint of Mahadevan (2014), it was found that the tourism industry represents 3.0% of the economy of Australia in the year 2014 2015. There were about 7.4 million visitors to Australia in the year 2015. The tourism industry provides jobs to about 580800 people of Australia in the year 2014 2015. It was also seen that tourism industry in Australia contributes about 8.0% of the total export earnings in the year 2010 2011 (Harvey et al. 2013). Thus, it can be seen that tourism industry is one of the most important industry in Australia. It was seen that there are various attractive destinations in Australia that ranges from hillsides to sea beaches, natural phenomenon to high profile destinations. The popular destinations in Australia involve various coastal cities like Brisbane, Sydney and Melbourne. There are high profile destinations in Australia, which includes Queensland, the Great Barrier Reef and the Gold Coast (Techera and Klein 2013). The attractive natural phenomenon of Australia includes the Uluru or the Ayres Rock and the Australian outback. Tasmania is a part of Australia, which is full of natural beauty. Tasmanian wilderness is another attractive destination for the tourists in Australia. The wildlife of Tasmania is another attractive feature of Australia. The Sydney Opera House is another attractive destination in Australia (Amelung and Nicholls 2014). As per the viewpoint of Abascal et al. (2016), it is seen that the animals like kangaroo and koala bear attracts tourists to Australia. These animals are indigenous to Australia. People visit Australia in order to see the natives of these animals and experience the beauty of Australia. Australia has diversity of climate and tourists can enjoy both temperate and tropical climate in Australia. As per the viewpoint of Pham et al. (2014), it is seen that aboriginals of Australia and their natives is another major attraction of Australia. These people are the indigenous people of Australia. According to the viewpoint of Scott and Ruhanen (2015), sports are another major attraction of Australia. From cricket to football, rugby to tennis and surfing to diving, every sports of Australia is adventurous and attractive. There are different sports of aboriginals, which are equally attractive as the other sports of Australia. These are other attractions of the tourists as they get to experience varieties of sports in Australia. All these places and adventures are equally attractive to attract tourists in Australia. However, the most attractive place and most visited place of Australia could not be determined. In this assignment, an idea about the most preferred and the most attractive place of Australia would be given. Methodology Variables Primary variables that would be considered in this research includes the destinations visited by the tourists, number of times the tourist had visited the destination, reasons of visiting the destination repeatedly and the most attractive destination of Australia for the tourist. Secondary variable would be the most rated websites of the destinations of Australia. The dependent variable for this research would be most attractive destination of Australia and the independent variables would be number of times the tourist had visited the destination, reasons of visiting the destination repeatedly and the most rated websites of the destinations of Australia. Data Collection and Research Design Primary data would be collected by the method of survey. Thirty tourists would be randomly selected and they would be provided with a questionnaire to fill up. This would provide the primary data of the survey. Secondary data would be collected from the various websites of tourism of Australia. These websites would give an idea about the most rated websites of the destinations of Australia. Data Analysis The collected data would be subjected to statistical analysis, which includes methods of frequency and methods of correlation and regression in order to find the most attractive destination of Australia. The method of frequency would give a count of the most visited places of Australia and the methods of correlation and regression would give an idea about the dependency of the dependent variable on the independent variable. Conclusion From the above research proposal, it could be concluded that the visit to various locations of Australia varies from person to person. This visit depends on various factors that range from financial to adventures. The degree of dependency of the dependent variable on the independent variables would be analysed in this research, which would give an idea about the extent to which the most attractive place is influenced by the independent variables. Recommendation It is recommended that the most attracted place of Australia must add new features at the place so that tourists find more reasons to visit them frequently. The other attractive places must improve their features in order to draw more tourists to their places. This would help the tourism industry of Australia to increase their revenue over the years. References Abascal, T.E., Fluker, M. and Jiang, M., 2016. Domestic demand for Indigenous tourism in Australia: understanding intention to participate.Journal of Sustainable Tourism, pp.1-19. Amelung, B. and Nicholls, S., 2014. Implications of climate change for tourism in Australia.Tourism Management,41, pp.228-244. Harvey Lemelin, R., Powys Whyte, K., Johansen, K., Higgins Desbiolles, F., Wilson, C. and Hemming, S., 2013. Conflicts, battlefields, indigenous peoples and tourism: addressing dissonant heritage in warfare tourism in Australia and North America in the twenty-first century.International Journal of Culture, Tourism and Hospitality Research,7(3), pp.257-271. Mahadevan, R., 2014. Understanding senior self-drive tourism in Australia using a contingency behavior model.Journal of Travel Research,53(2), pp.252-259. Pham, T.D., Kookana, J. and Silec, D., 2014. The State Tourism Satellite Accounts series has been produced as part of a modelling program established and funded in partnership with the Australian Government and each of the state and territory tourism offices to enhance understanding of the economic dynamics of tourism. Tourism Research Australia thanks the state and territory tourism offices who have reviewed and contributed to this report. Scott, N. and Ruhanen, L., 2015. Tourism Queensland, Australia. Techera, E.J. and Klein, N., 2013. The role of law in shark-based eco-tourism: lessons from Australia.Marine Policy,39, pp.21-28.