Tuesday, December 31, 2019

Get My IP With Delphi Programming

Internet this and internet that. Everybody wants to be on the internet nowadays. Everyone wants to program internet nowadays. One of the most interesting tasks when starting to code for the internet is how to obtain the IP address of a computer connected to the internet. IP? TCP? Simply technical: the internet is built on TCP/IP connections. The TCP part describes how two computers set up a connection to each other and transfer data. The IP part primarily deals with how to get a message routed across the internet. Each connected machine has a unique IP address that allows others to figure out a path to any computer around the world wide web (or the world precisely). Uses Winsock To obtain the IP address of the computer you are using when connected to the internet, we need to call some of the API functions *defined* in the Winsock unit. Well create a GetIPFromHost function that calls several Winsock API functions in order to get the IP. Before we can even use WinSock functions, we must have a valid session. This session is created with the WinSock WSAStartup function. At the end of our function, a call to SAC leanup is made in order to terminate the use of the Windows Sockets APIs. To obtain the computers IP address, we must use GetHostByName in conjunction with GetHostName. Each computer is called a host and we can get the hostname with a special function call: GetHostName. We then use GetHostByName to get the IP-address, related to this hostname. Get IP Delphi.Project.Code Start Delphi and place one Button and two Edit boxes on a newly created Form. Add the GetIPFromHost  function to the implementation part of your unit and assign the following code to the OnClick event handler of a button (below): uses Winsock; function GetIPFromHost(var HostName, IPaddr, WSAErr: string): Boolean; type Name array[0..100] of Char; PName ^Name; var HEnt: pHostEnt; HName: PName; WSAData: TWSAData; i: Integer; begin Result : False; if WSAStartup($0101, WSAData) 0 then begin WSAErr : Winsock is not responding.; Exit; end; IPaddr : ; New(HName); if GetHostName(HName^, SizeOf(Name)) 0 thenbegin HostName : StrPas(HName^); HEnt : GetHostByName(HName^); for i : 0 to HEnt^.h_length - 1 do IPaddr : Concat(IPaddr, IntToStr(Ord(HEnt^.h_addr_list^[i])) .); SetLength(IPaddr, Length(IPaddr) - 1); Result : True; end else begin case WSAGetLastError of WSANOTINITIALISED:WSAErr:WSANotInitialised; WSAENETDOWN :WSAErr:WSAENetDown; WSAEINPROGRESS :WSAErr:WSAEInProgress; end; end; Dispose(HName); WSACleanup; end; procedure TForm1.Button1Click(Sender: TObject); var Host, IP, Err: string; begin if GetIPFromHost(Host, IP, Err) then begin Edit1.Text : Host; Edit2.Text : IP; end else M essageDlg(Err, mtError, [mbOk], 0); end;

Monday, December 23, 2019

The Epic of Gilgamesh Essay - 1245 Words

At the heart of a tale about slaying mystical creatures, scorning a goddess, and traveling to fantastical places, lies the narrative of a profound friendship between two men. In The Epic of Gilgamesh, an ancient Mesopotamian literary masterpiece, all of its events are centered around the development of the friendship between Gilgamesh, the tyrannical and stubborn king of Uruk, and the man created by the Gods to both complement and challenge his nature: Enkidu. Each of the three dream sequences in the epic represent different stages of Enkidu’s life – one portends his birth, another foretells the actions that will ultimately lead to his demise, and the final predicts his death. In the Epic of Gilgamesh dreams are utilized as a tool to†¦show more content†¦Gilgamesh’s mother, Ninsun, also aptly interprets that Enkidu will be a â€Å"mighty comrade† and become â€Å"[Gilgamesh’s] saviour† ; his mother also states that Enkidu â€Å"ofte n will save [Gilgamesh].† The repetition of the idea of saving suggests that Gilgamesh will be dependent on Enkidu, which is contrary to the nature of Gilgamesh, who often appears as the most powerful and independent character in the epic. This particular language strengthens the subtle foreshadowing that Gilgamesh will undergo a radical change in his outlook on life and death. As such, after Gilgamesh and Enkidu â€Å"kiss each other and form a friendship,† Gilgamesh begins to reform his ways and become a more just ruler. After some time, the two companions decide to journey into the Cedar Forest to slay the divine demon, Humbaba, in order to establish glory and eternal fame. Initially, Enkidu is weary and repeatedly warns Gilgamesh with the use of potent and acerbic words - â€Å"Humbaba, his voice is the Deluge, his speech is fire and his breath is death!† As they travel to the Cedar Forest, Gilgamesh, through dream incubation, has a series of five dreams f illed with violent imagery indicating the consequences of killing Humbaba. However, like the true â€Å"companion† and â€Å"saviour† heShow MoreRelatedGilgamesh And The Epic Of Gilgamesh988 Words   |  4 PagesThe maturation of Gilgamesh and his desire to acquire wisdom throughout his journey is quite apparent. By overcoming difficulties such as upholding Uruk, becoming friends with Enkidu, and various other scenarios, Gilgamesh proves that he did in fact grow up throughout the epic. As the epic starts, Gilgamesh is portrayed as a self-centered, self-admiring leader who believes that he is the only individual that can lead the city of Uruk. Gilgamesh believes that he is a god-like figure and often refersRead MoreThe Epic Of Gilgamesh : Gilgamesh1013 Words   |  5 Pages Gilgamesh in 2015 Even though the epic Gilgamesh is thousands of years old, it is still read today. Why would the era of technology read an epic this old? This is because the themes in Gilgamesh are still relevant. In addition, the themes are experiences that Gilgamesh went through in his life period, and serve as lessons for the current readers. Gilgamesh’s themes include journey, legacy, love, and death. These themes make Gilgamesh a vital reading for the 21st century citizens because peopleRead MoreGilgamesh : The Epic Of Gilgamesh1194 Words   |  5 Pages The Epic of Gilgamesh is a Mesopotamian epic poem loosely based on a real king who ruled sometime around 2700 BCE. The standard version of this epic was written in the Akkadian language. In this epic poem, Gilgamesh is King of Uruk, he is one third mortal and two-thirds god; he is described as a strong, arrogant, and unruly king that does not show much consideration for his actions. Gilgamesh is a very egocentric person; he has no res pect for the feelings of others and does not care about howRead MoreGilgamesh : The Epic Of Gilgamesh909 Words   |  4 Pages â€Å"The Epic of Gilgamesh† is a didactic story set out to expose the inevitability of death. The true meaning of this story is sometimes overlooked because the story is told in heighten language not easily understood. The epic hero in this story is Gilgamesh; he undertakes a quest for knowledge which is overshadowed by his ignorance. The tragic death of Enkidu, Gilgamesh’s trusted companion forces the epic hero to change his perception of death. To overcome great obstacles one must be willing to putRead MoreGilgamesh The Epic Of Gilgamesh877 Words   |  4 PagesThe Epic of Gilgamesh the lines that are repeated at the beginning and end of the epic show that only immortality a human can gain lies in creating things that last beyond a person’s lifetime. While at the beginning of the epic Gilgamesh is seeking eternal life, when he concl udes his journey he realizes that he has created an enduring legend through the foundation of his city, Uruk. Through this legend, Gilgamesh can live on in the memory of his people, long after he has passed away. The epic is ableRead MoreThe Epic Of Gilgamesh And Gilgamesh1422 Words   |  6 PagesIn the Epic of Gilgamesh there are many notable relationships but the relationship between Gilgamesh and Enkidu is hands down the most noteworthy. When analyzing the relationship of Gilgamesh and Enkidu there are many factors that go into play. It is really the sole foundation of the whole Sumerian epic and it really changes the whole personality of Gilgamesh. In order to get a better understanding of how the two characters complement each other we have to first break down their individual appearancesRead MoreGilgamesh : The Epic Of Gilgamesh876 Words   |  4 PagesIn The Epic of Gilgamesh a young man meets and befriends a wild man named Enkidu. Enkidu, once a man who lived among animal s, became civilized after having sex with a female. From this point on Gilgamesh and Enkidu’s relationship start, but shortly into the novel Enkidu becomes sick and dies. This is the start to Gilgamesh journey in attempting to avoid death by seeking immortality. In his quest Gilgamesh meets several people all who assign different routes to the next person he should speak to.Read MoreGilgamesh : The Epic Of Gilgamesh1400 Words   |  6 Pages The Epic of Gilgamesh Introduction The Epic of Gilgamesh is the story about Gilgamesh, the King of Uruk and Enkidu, their friendship, how Enkidu dies, how Gilgamesh mourns the death of his friend and finally he understands enlightened truth . Most of this story is narrated from Gilgamesh’s point of view. The story is set in Mesopotamia and the portrayal of Gilgamesh is ironical. He is described as a king of immense vigor and strength who is not benevolent with his subjectsRead MoreThe Epic Of Gilgamesh By Gilgamesh1476 Words   |  6 PagesThe Epic of Gilgamesh was the earliest surviving written epic that told story of Gilgamesh king of Uruk that was the world first cities that was built along the Tigris and Euphrates River 5,000 years ago. Aruru created the human race, Enkidu and a wild man who roamed the pasture like a gazelle. The epic of Gilgamesh goddesses and scared harlots wild men who cavort in the fields with the gazelles kings who are descended from gods. The Urban Revolution was recognize the elemen ts of our own world byRead MoreThe Epic Of Gilgamesh And Gilgamesh Essay2053 Words   |  9 PagesWhile the women in the Epic of Gilgamesh may not be the primary focus of the epic, which instead recounts more of Gilgamesh’s own trials and travails, they still play quite vital roles in their interactions with both Enkidu and Gilgamesh. Women such as Shamhat, Ninsun, and Ishtar in The Epic of Gilgamesh are often portrayed with a particular emphasis on their intrinsic connections to civilization—and in the case of Shamhat and Ninsun, in terms of their motherly characteristics as well—which serves

Sunday, December 15, 2019

Ethical Dilemmas of an Attorney Free Essays

Ethical Dilemma’s of an Attorney Gina Boldt ADJ 235 March 22, 2013 John Ellison Ethical Dilemma’s of an Attorney The three major ethical dilemmas faced by a defense attorney are client perjury, delivery of physical evidence and the disclosure of prior convictions (Boldt, 2013). They are bound to provide thieir client with courage and devotion (Pollock, 2012, 2010). This dilemma, at times, tries the attorneys personal morals and ethics, though, once again, the protection of the defendant overrules all. We will write a custom essay sample on Ethical Dilemmas of an Attorney or any similar topic only for you Order Now They must also refrain from taking any case that presents a conflict of interest with said client. Though there are times that plea bargaining is in the best interest of the defendant, this process can be misused as a conveinence, this would be an example of ethical conflict. In order to provide such a fierce and devoted defense, the attorney must not engage is such practices as pergury and corruption to aid a positive outcome for their client. Many of these obligations are quite similar and relate to both a prosecuting and defense attorney, such as confidentiality, attorney-client privelage, the handling of evidence and the responsibility of maintaining the safety of others. The ethical obligations of a prosecuting attorney is to seek truth and justice, However, this singular responsibility insures several ethical burdens. The duties of this position are to indict as many criminals as possible and maintain justice within our system. With this responsibility comes many opportunities to step into the unethical realm of practice in order to secure prosecution. The obligation of this profession, once again, can test an individuals strength and inner morals. The key is to maintian honesty and intergrity and to set aside all personal beliefs, though this may not be the easiest, it is the only way to ensure justice. How to cite Ethical Dilemmas of an Attorney, Essay examples

Saturday, December 7, 2019

Principles of Financial Management Theory and Practice

Question: Discuss about the Principles of Financial Management for Theory and Practice. Answer: Introduction: In the given case, Teal has tried to alter the fixed rate plant-wide overhead system to a department linked overhead system which is a significant improvement to the previous system but still has glaring issues which would not be adequately addressed through this system and is also apparent in the various objections raised by the various department heads. The alternative techniques that could have been employed in the given case are highlighted below. Activity Based Costing - It is an effective technique which is widely used to allocate the overhead costs in a manner which is not based on any of the direct costs. Instead, the overhead costs are related to various activities that are involved in the manufacturing costs which are then broken down into collection of smaller activities with an appropriate cost driver allocated for each of the smaller activities. Once the cost related to each of the small activities is determined, the number of repetitions required for the manufacturing of various product lines typically tends to give a realistic and accurate estimation of the overheads cost associated with a particular product (Bhimani et.al., 2008). This approach makes up for the shortcomings of the volume approach in estimation of overheads costs as there are fixed and variable manufacturing overheads and these need to be accounted for in a different manner which is assured in case of ABC costing. Further, the various overheads costs using ABC would not be linked to the departments but rather to the activities that are being conducted and hence would present a more logical and coherent breakup of the overhead cost which can be used to enhance efficiency through process redesigning or other suitable means (Drury, 2008). One of the precautions that need to be taken with regards to implementation of ABC is that the activities should be sub-divided only to a particular level or else the complexity of the system and the underlying cost tends to overweigh the advantages (Seal, Garrison and Noreen, 2012). Additionally, experienced and skilled manpower should be allocated with regards to appropriately identifying the cost drivers of th e activities and appropriate determine the overheads cost associated with each of the product line (Petty et. al., 2015). Usage of ABC at Evergreen Based on the information provided, it is apparent that the current focus is the LMC division which primarily performs the following functions. HC-13 Lawn Mower Spare part for inventory Work for other divisions For all the above three activities performed by the LMC division, the direct costs and material costs need to be allocated to the respective services considering the individuals tasks required and the underlying cost. This information has already been captured in the case study. The core concern of the ABC costing would be with regards to allocation of the fixed and variable overheads cost which are being departmentally allocated and then being levied on the various functions in the LMC division. In this regard, the appropriate cost driver need to be identified for each of the overhead activities and then based on the number of repetition that is involved in a particular overhead activity, the overheads need to be allocated across the three services which are listed below. The various benefits of allocating overheads cost as per ABC in the LMC division are stated below. It would lead to appropriate pricing of the HC-13 Lawn Mower due to correct allocation of the overhead costs and hence would enhance the competitiveness of the product as it seems that the product is overpriced due to higher burden of overhead costs (Parrino and Kidwell, 2011). The ABC costing would also result in accurate costing of the services provided to other divisions along with the spare inventory. This is pivotal so that these services and spares are not provided to the customers at a loss and appropriate profit margins should be kept. The concerns of the various managers would be addressed as the cost would become more transparent and acceptable to the various managers. Further, this would ensure that the departmental compartmentalisation is avoided to represent cost in a more effective and transparent manner which would improve not only decision making with regards to pricing of products and services but also the overall operational efficiency (Brigham and Ehrhardt, 2013). Lean costing methods The lean costing methods in the recent times are gaining popularity as it enables in enhancing the overall efficiency and eliminate the various incremental costs that may not be required (Bhimani et. al., 2008). Unlike the focus of the ABC method, lean costing aims to identify the cost that are not value adding and hence aims to take measures to eliminate the same so that only those costs remain in the value chain which are actually adding some value. This is an advanced concept which is more suitable for new age service based businesses and would not yield much dividend for Evergreen which first needs to make a transition to ABC (Drury, 2008). It is undoubtedly expected that the new system would have resistance from the various stakeholders who are driven by their own vested interests. Some measures to deal with such resistance are highlighted below (Brealey, Myers and Allen, 2008). Consultation with internal stakeholders based on open communication so that the need and necessity of migration to the new costing system can be clearly established. In this regards, reference needs to be on the incremental gains for the company as an identity rather than harping on departmental gains and losses. Appropriate platform must be accorded to the senior managers so as to voice their concerns and the same must be dealt in a transparent but prompt manner. Successful case studies of rivals may also be presented so as to establish the credibility of the new system and the potential shortcomings of the old system. Special focus needs to be given to departments and managers that are likely to be represented under bad light as a result of new systems and assurance must be provided to them with regards to taking appropriate measures for fixing up the issue. Seeking regular feedback from the key stakeholders during the migration process so that their support does not wane away. References Bhimani, A., Horngren, C.T., Datar, S.M. and Foster, G. (2008), Management and Cost Accounting, Harlow: Prentice Hall/Financial Times. Brealey, R., Myers, S. and Allen, F. (2008), Principles of Corporate Finance, New York: McGraw Hill Publications, Brigham, E.F. and Ehrhardt, M.C. (2013). Financial Management: Theory Practice, New York: South-Western College Publications, Drury, C. (2008), Management and Cost Accounting, London: Thomson Learning Parrino, R. and Kidwell, D. (2011), Fundamentals of Corporate Finance, London: Wiley Publications Petty, J.W., Titman, S., Keown, A.J., Martin, P., Martin J.D. and Burrow, M. (2015), Financial Management: Principles and Applications, Sydney: Pearson Australia, Seal, W.B., Garrison, R.H. and Noreen, E.W. (2012), Management Accounting, Maidenhead: McGraw -Hill Higher Education.