Sunday, December 29, 2019

Use Windows Hooks in Delphi Applications

Code submitted by Jens Borrisholt. Text by Zarko Gajic. By Jens: Hooks, I’ve seen a lot of people trying to make a clean solution for hooking messages in an application. So I decided some time ago to implement hooks as a class, with nice events and stuff :) Hook.pas makes it possible to assign a method pointer to a procedure pointer (with some help from assembler). For example: if you want to trap ALL keystrokes in your application - simply declare an instance of TKeyboardHook, assign an event handler for OnPreExecute or OnPostExecute, or both. Set you KeyboadHook active (KeyboardHook.Active : True) and you are out and running .. On Windows Hooks A hook is a point in the system message-handling mechanism where an application can install a subroutine to monitor the message traffic in the system and process certain types of messages before they reach the target window procedure. Put shortly, a hook is a function you can create as part of a dll or your application to monitor the goings on inside the Windows operating system. The idea is to write a function that is called every time a certain event in windows occurs - for example when a user presses a key on the keyboard or moves the mouse. For a more in depth introduction to hooks, take a look at What Windows hooks are and how to use them within a Delphi application. Hooking mechanism relies on Windows messages and callback functions. Types of Hooks For example:You can use the WH_KEYBOARD hook to monitor keyboard input posted to a message queue;You can use the WH_MOUSE hook to monitor mouse input posted to a message queue;You can a WH_SHELL hook procedure when the shell application is about to be activated and when a top-level window is created or destroyed. Hooks.pas TCBTHook - called before activating, creating, destroying, minimizing, maximizing, moving, or sizing a window; before completing a system command; before removing a mouse or keyboard event from the system message queue; before setting the input focus; or before synchronizing with the system message queue.TDebugHook - called before calling hook procedures associated with any other hook in the systemTGetMessageHook - enables an application to monitor messages about to be returned by the GetMessage or PeekMessage functionTJournalPlaybackHook - enables an application to insert messages into the system message queue.TJournalRecordHook - enables you to monitor and record input events (to record a sequence of mouse and keyboard events to play back later by using the WH_JOURNALPLAYBACK Hook).TKeyboardHook - enables an application to monitor message traffic for WM_KEYDOWN and WM_KEYUP messages.TMouseHook - enables you to monitor mouse messages about to be returned by the GetMessage or PeekMes sage function.TLowLevelKeyboardHook - enables you to monitor keyboard input events about to be posted in a thread input queue.TLowLevelMouseHook - enables you to monitor mouse input events about to be posted in a thread input queue. TKeyboardHook example Download hooks.pas demo application uses hooks, .... var   Ã‚  KeyboardHook: TKeyboardHook; .... //MainForms OnCreate event handlerprocedure TMainForm.FormCreate(Sender: TObject) ; begin   Ã‚  KeyboardHook : TKeyboardHook.Create;   Ã‚  KeyboardHook.OnPreExecute : KeyboardHookPREExecute;   Ã‚  KeyboardHook.Active : True; end; //handles KeyboardHooks OnPREExecuteprocedure TMainForm.KeyboardHookPREExecute(Hook: THook; var Hookmsg: THookMsg) ; var   Ã‚  Key: Word; begin   Ã‚  //Here you can choose if you want to return   Ã‚  //the key stroke to the application or not   Ã‚  Hookmsg.Result : IfThen(cbEatKeyStrokes.Checked, 1, 0) ;   Ã‚  Key : Hookmsg.WPARAM;   Ã‚  Caption : Char(key) ; end; Ready, set, hook :)

Saturday, December 21, 2019

Is Japan An Extraordinary Novel Performing Art - 2513 Words

As the music rose through the midst of tranquility, a woman by the name of Okuni with excessive abstract makeup on her white-painted face like a mask, wearing an extravagant kimono with sophisticated details, danced slowly in to the stage in a dry riverbed outside of Kyoto. She fiercely dressed herself as a man to perform on stage, an act that had never been done before. Okuni skillfully â€Å"danced like a jaunty, carefree man†¦Ã¢â‚¬  and successfully pushed back all conventional boundaries of performance to create the first kabuki play (Thornbury 129). This woman offered the world an extraordinary novel performing art that lives on through centuries of restrictions and discrimination to become Japan’s well-preserved cultural play. Japan’s cultural pastimes, namingly dances and dramas, contain more than a millennium of uninterrupted history. The seriousness employed within different forms of play, theatrically speaking, makes Japan an extraordinary and unique country. In all of Asia, where tradition is generally subjected to assimilation, Japan’s theatre culture stands out as an art form that has never suffered a decline nor undergone any drastic change. The most traditional well-preserved form of theater in Japan is kabuki. It is a theatrical form that harmonizes singing, acting, and dancing to create a stylized performance. Kabuki’s unique characteristics specialize in elaborate colorful costumes, excessive makeup on white-painted faces, traditional Japanese folk music, andShow MoreRelatedVirtue: Comparing the Views of Confucius and Aristotle Essay2072 Words   |  9 Pagesthis time Gwendolyn Brooks was writing poems and novels about racism, sexism and classism through the eyes of an Afr ican American woman during, before and after World War II. This critically acclaimed piece was the autobiographical novel Maud Martha (1953). (According to the Opera Quarterly 2002,) Camilla Williams was a distinguished concert artist, performing throughout the United States, in fourteen African countries and in South Korea, Japan, the Philippines, New Zealand, and Australia. CamillaRead MoreHumanities11870 Words   |  48 Pagesprovides an overview on the subject of art appreciation for those entirely new to the subject. This is a complex topic to deal with and it is impossible to have a truly comprehensive discussion on the topic in such a brief essay. The student is advised to consult more advanced texts to gain further understanding of how to appreciate art more fully. HUMANITIES: What is it? †¢ The term Humanities comes from the Latin word, â€Å"humanitas† †¢ It generally refers to art, literature, music, architectureRead More Software Patents and Copyright Laws Destroy Free Competition5813 Words   |  24 Pagesenough for 20 years. Global State of Patent : USA, Japan and European Union Corporate patent lawyers and lawyers in general wield great influence in the United States. One Japanese book is titled Litigating a Country to Death -- The United States of America. Like in Britain, the patent system ran out of control rather early in the US. In the 80s, this was partially reinterpreted as an american national pro-patent policy by which Japan and east-asian tiger states could be kept at bay. TheRead MoreResearch Methodology16940 Words   |  68 PagesRajasekar School of Physics, Bharathidasan University, Tiruchirapalli – 620 024, Tamilnadu, Indiaâˆâ€" P. Philominathan Department of Physics, Sri AVVM Pushpam College, Poondi, Thanjavur – 613 503, Tamilnadu, India V. Chinnathambi Department of Physics, AKGS Arts College, Srivaikundam – 628 619, Tamilnadu, India In this manuscript various components of research are listed and brieï ¬â€šy discussed. The topics considered in this write-up cover a part of the research methodology paper of Master of Philosophy (M.PhilRead MoreARTIFICIAL INTELLIGENCE6331 Words   |  26 Pagesprovide AI with billions of dollars, but by the late 80s the investors became disillusioned and withdrew funding again. This cycle of boom and bust, of AI winters and summers, continues to haunt the field. Undaunted, there are those who make extraordinary predictions even now. Progress in AI has continued, despite the rise and fall of its reputation in the eyes of government bureaucrats and venture capitalists. Problems that had begun to seem impossible in 1970 have been solved and the solutionsRead MoreGoal Movie Review10720 Words   |  43 Pagesseemed incredible to me that the world’s biggest sport—and, in fact, the biggest form of content on television today—has never been the subject of a decent movie,† says Jefferies. It was in 2002, when Jefferies and Barrelle were at the World Cup in Japan, that their idea really began to take shape. Barrelle then spent a year researching the movie industry in general and the intricacies of this film in particular. They also got American Danny Stepper in on the venture. The project was gathering steamRead MoreRastafarian79520 Words   |  319 Pagesâ€Å"coronation† of Bob Marley as a culture hero in the late 1970s, and ï ¬ nally to the culture tourism of the 1980s and 1990s. Rastas inï ¬â€šuence on Jamaicas indigenous culture is quite pervasive, especially in popular parlance, the visual arts, tourist art, and the performing arts. However, their most celebrated contribution INTRODUCTION 5 is to the development of reggae music, which Jamaicans regard as their cultural contribution to the world. Later I will return to these issues and will demonstrateRead MoreOne Significant Change That Has Occurred in the World Between 1900 and 2005. Explain the Impact This Change Has Made on Our Lives and Why It Is an Important Change.163893 Words   |  656 Pagesopportunities available to them at different times and in diverse settings. She places special emphasis on the important but often overlooked roles they played in politics, particularly those associated with resistance movements, and their contributions to arts and letters worldwide. Drawing on the essay collections and series on women in world history that she has edited over the past decade, Smith’s fully global perspectives make clear that even though gender parity has rarely been attained in any societyRead MoreManagement Course: Mba−10 General Management215330 Words   |  862 PagesManagement Capital Feigenbaum−Feigenbaum International Management, Sixth Edition Hodgetts−Luthans−Doh Contemporary Management, Fourth Edition Jones−George Driving Shareholder Value Morin−Jarrell Leadership, Fifth Edition Hughes−Ginnett−Curphy The Art of M A: Merger/Acquisitions/Buyout Guide, Third Edition Reed−Lajoux and others . . . This book was printed on recycled paper. Management http://www.mhhe.com/primis/online/ Copyright  ©2005 by The McGraw−Hill Companies, Inc. All rights reservedRead MoreLogical Reasoning189930 Words   |  760 PagesCalvin and Hobbes cartoon in which Calvin finds some charred rocks and ashes in his back yard and claims this is dramatic proof that UFOs landed in his backyard. That cartoon also illustrates the following principle of logical reasoning: Extraordinary statements require extraordinarily good evidence to back them up. A bit of charcoal is not extraordinarily good evidence of a UFO landing, but you ought to have extraordinarily good evidence if you are going to believe in such an unlikely

Friday, December 13, 2019

Listening Skills Free Essays

Effective communication dramatically distinguishes humans from other forms of life. It allows us to organize and work together in groups and develop a civilized society. In fact, without communication, there can be no social organization. We will write a custom essay sample on Listening Skills or any similar topic only for you Order Now Besides being important in todays changing business environment, effective communication is vital for personal satisfaction and success. Through communication, people are able to clarify their concepts and ideas. It enables us to understand, persuade, and work with other people. In many ways, our success in personal and corporate life is based on our ability to communicate effectively. After having laid so much importance on communication, we must also understand that communication is never one way. Communication in simple terms can be defined as ‘the process of sharing by which messages produce responses’ (Munter, 1987). It is always a two way process with a ‘sender’ sending a message and a ‘receiver’ providing a feedback of its reception. The success of an effective communication therefore rests on the ‘receiver’ who is at the listening end. A research proves that â€Å"Communication is 85 percent listening and 15 percent talking† (Pierce and Palmer, 2006). Not denying the significance of effectively putting across your message, listening to others is equally important and surprisingly difficult skill. We have to be an effective listener when we are brainstorming ideas with others, collecting data, talking on the telephone, resolving conflicts, attending lectures and even while conversing with our kids. We must remember that the person who is talking can sense whether listener is attentive or not. So, how to improve our listening skills? Various researchers have given various techniques to be an effective listener. There is however consensus on first removing the internal and external blocks which may be affecting our concentration. A major internal block stems from our ability to think so much faster than a speaker can possibly talk. People on average talk at about 125 words per minute but our brain can process information at more than 600 words per minute (Munter, 1987). With so much extra time available in our brain, we tend to wander to completely unrelated topics. Another important internal block to listening is emotional. It’s hard to resist jumping to conclusions, defending our own position, contesting new ideas, and indulging into a thought process of preparing our own response. The external blocks on the other hand can be your uncomfortable seat, distractions caused by various sounds, a glance at papers in our hands/desk or even some pleasant smell of perfume or food coming from nearby. Of all the external blocks, time is probably the most important. Removing all such blocks is the first step to effective listening. The second step in developing listening skills is adopting a suitable posture or ‘how we look’ when we are listening. A good listener needs to stand or sit with an ‘open posture’ that is facing the other person and looking alert. On the other hand ‘closed or aggressive postures’ like keeping the arms crossed, turning away, bowing shoulders or keeping hands on hips do not give a positive feedback to the person who is talking. Similarly ‘nervous gestures’ such as cleaning fingernails, drumming with fingers or keeping hands on or near the face tend to make the talker feel uncomfortable. Another aspect of improving the nonverbal signs of listening is the facial expression. A good listener needs to avoid a deadpan and stony face. Instead, look interested; raising and lowering of eyebrows, occasionally smiling or nodding can help establish rapprt. Perhaps the most important signal of attentive listening is maintaining the eye contact. Staring should be avoided however constantly looking away is also interpreted as lack of interest. The appropriate distance between the talker and listener also indicates the level of interest and involvement. The distance may be appropriate for conversational listening. Altogether, the importance thing to keep in mind about nonverbal signals of listening is how they make the speaker feel (Knapp, 1980). We can not fake good listening by merely adopting a suitable posture and maintaining an eye contact. Good listening must be sincere. The third step of improving listening skills is therefore embedded in controlling our feelings and thoughts (Knapp, 1980). Controlling our feelings is often difficult. We tend to interrupt or disagree before the person speaking is finished. To improve our listening skills, we need to be patient and give the speaker time. A good listener should avoid interrupting and do not block communication by arguing, criticizing or becoming angry too soon. To control your feelings, you must avoid prejudging either the topic or the speaker. Moreso, do not be overly affected by the initial impressions the topic or the speaker make on you. The best way to control our feelings is to empathize with the talker that is by putting ourselves in his or her shoes. Besides controlling the feelings, a good listener should think objectively and analytically. A good way of analyzing is to take notes mentally, write down key words, mentally summarize what the talker has said so far and weigh the evidence. Besides listening to the speaker’s content, a good listener will always analyze the speaker’s feelings so as to evaluate the motivation/intention behind his or her talk. Listen not only to what the speaker is saying, but how she or he says it. Be aware, in other words, of the speaker’s voice, volume, facial expression, and body language. Sometimes, people say one thing but a good listener can hear that they really mean something else. The last step to effective listening is ‘what to say.’ Obviously, most of the time you are listening you are not saying anything. Humans by nature prefer talking to listening. A good listener should however learn to tolerate silence. Instead of feeling unconfortable with silence, think of it as a chance to let other person be heard. Although the most important listening skill is to listen and remain silent, however a good listener might have to say few things to encourage the other person to talk. Asking for clarifications, rephrasing/restating ideas for confirmation and asking few questions when given an opportunity to speak are few techniques not only to enhance own receptivity but are also indicative of the listener’s interest and involvement in the talk. For encouraging the speaker to talk, use small phrases such as â€Å"I see,† â€Å"Uh-huh,† and â€Å"Go on.† These phrases are not considered as interruptions rather these help to portray your interest in what the speaker is saying (Barker Watson, 2000). To conclude, listening skills are important not only for a successful career, but are very helpful for becoming good students, parents, and friends. Its importance is much more highlighted in the corporate world which relies on good leadership and as it is pointed out that â€Å"Good leaders build teams by being willing to hire people better than themselves, staying secure in their own roles and by listening† (Maxell, 2006). The four step approach to effective listening discussed in this paper is not a final word on such an important aspect of human life but it gives a guideline for developing this skill in a methodological manner. In nut shell, to be an effective listener we need to first remove or minimize various internal and external blocks to listening, concentrate on how we look by adopting a suitable gesture, feel, analyze the content and intentions of the speaker and should know what to say at what time. We must remember that if we will not listen to people around us, under us or in our homes, they will take their ideas or problems elsewhere; subordinates may feel discontended if they are not properly heard; colleagues and friends may even stop sharing their feelings with you; customers may take their business elsewhere, and at homes you will never get to know your children. References Barker, Larry Watson, Kittie. (2000). Listen Up: How To Improve Relationships, Reduce Stress. NY: St. Martins Press. Knapp, K. (1980). Essentials of Nonverbal Communication. New York: Holt, Rinehart Winston. Maxwell, J. (2006). The 360-Degree Leader. Business book review library, 23 (11), 1-11. Munter, Mary. (1987). Business Communications: Strategy and Skill. Eaglewood Cliffs, New Jersey: Prentice-Hall, Inc. Pierce, E., Palmer, L. (2006). 24 Things Experts are Dying to Tell You. Redbook, 206 (6), 102-111. How to cite Listening Skills, Essay examples

Thursday, December 5, 2019

Culture shock Essay Example For Students

Culture shock Essay The United States of America is a country in which many people from all over the world comes to live harmoniously with each other. Unlike Canada, which is a multicultural country, it is a melting pot since each person brings his peculiarity to enrich the culture of this country. But this melting process is not always without pain or hurt. I felt the life in Canada is more comfortable According to John J. Macionis, the author of Sociology, secondary Canadian edition. Culture shock Essay is a state of bewilderment, anxiety, disorientation and distress as an individual suddenly exposed to a social or cultural environment radically different from his own. It happens frequently for the international students and immigrants. Culture conflicts appear not only when students come to school and learn new ways of living there, but also when they come back home and live with their own families or their own societies. The reason for that is the students are young and easy to change, but the adults are not ready to follow their example and adapt to the new situation. When I first come to live in the states, my system of values must change in order for me to survive. When I first came to the states, I was unprepared to live there, thats why I always suffer from stress because of culture shock. I felt as if I was going to enter a different world far from the one I had become so accustomed to. I can remember sitting around in an awkward anticipation wondering when my first interaction with someone from a different culture or color would occur. To my dismay I found that I wasnt the person who had difficulty accepting where I was. It so happened that it was the other students in the school who felt that I did not belong. My first day staying at the dorms is a day that I would never forget as long as I live. It was a day that changed my opinion of every race but mine. My roommate happened to be a Hispanic who didnt know a word of Spanish but that didnt seem to matter if he did or didnt. My dorm room was a small white box with a sink a closet and a dry erase board on the outside of the door. I remember coming back to my room from a welcome session feeling I had made the right decision on what school to attend, only to find on my door a written message saying Go home Mexicans. I was appalled by what I saw, the next thing I know I had began knocking on the doors of every room in my hall demanding that someone tell me who had written that message that had outraged me so. Out the corner of my eye I saw a guy with a big smile on his face that happened to be white my judgment being clouded by anger I immediately swung my fist across his face knocking him to the floor. Instead of fighting back he stood up looked me in the eye and assured me it wasnt him who had written the message. Confused about how to handle the situation I went to my room and contemplate of a solution. After days and weeks of profound thinking I found that it would be in my best interest to associate with people of my own race. I spent the majority of my first year like this, isolating myself as much as possible. I thought that I would continue on like this for the next four years. When I came home for Christmas vacation I spoke to my mom about school and she told me to get as much as I could from school cause it would be my last chance to be a kid and experience new things. I reflected on what my mom had said and decided to rush the most popular fraternity in school and was determined to make it. My pledge class brothers were of all types of races, but the majority we white. We were forced to band together and help one another get through pledging. Before we new it, we had become best of friends and the color and different culture just erased we were brothers and what was inside was that mattered. I am unsure where I would be if I hadnt made the decision to give my school .