Tuesday, November 26, 2019
How to Add Resource Files in Delphi Executables
How to Add Resource Files in Delphi Executables Games and other types of applications which use multimedia files like sounds and animations must either distribute the extra multimedia files along with the application or embed the files within the executable. Rather than distribute separate files for your applications use, you can add the raw data to your application as a resource. You can then retrieve the data from your application when it is needed. This technique is generally more desirable because it can keep others from manipulating those add-in files. This article will show you how to embed (and use) sound files, video clips, animations and more generally any kind of binary files in a Delphi executable. For the most general purpose, youll see how to put an MP3 file inside a Delphi exe. Resource Files (.RES) In the Resource Files Made Easy article you were presented with several examples of the use of bitmaps, icons, and cursors from resources. As stated in that article we can use the Image Editor to create and edit resources that consist of such types of files. Now, when we are interested in storing various types of (binary) files inside a Delphi executable well have to deal with resource script files (.rc), the Borland Resource Compiler tool and other. Including several binary files in your executable consists of 5 steps: Create and/or collect all the files you wish to put in an exe.Create a resource script file (.rc) that describes those resources used by your application,Compile the resource script file (.rc) file to create a resource file (.res),Link the compiled resource file into the applicationââ¬â¢s executable file,Use individual resource element. The first step should be simple, simply decide what types of files you would like to store in your executable. For example, we will store two .wav songs, one .ani animations and one .mp3 song. Before we move on, here are a few important statements concerning limitations when working with resources: Loading and unloading resources is not a time-consuming operation. Resources are part of the applications executable file and are loaded at the same time the application runs.All the (free) memory can be used when loading/unloading resources. In other words, there are no limits on the number of resources loaded at the same time.Of course, resource files do double the size of an executable. If you want smaller executables, consider placing resources and parts of your project in a dynamic link library (DLL) or its more specialized variation. Lets now see how to create a file that describes resources. Creating a Resource Script File (.RC) A resource script file is a just a simple text file with the extension .rc that lists resources. The script file is in this format: ResName1 ResTYPE1 ResFileName1ResName2 ResTYPE2 ResFileName2...ResNameX ResTYPEX ResFileNameX... RexName specifies either a unique name or an integer value (ID) that identifies the resource. ResType describes the type of resource and the ResFileName is the full path and file name to the individual resource file. To create a new resource script file, simply do the following: Create a new text file in your projects directory.Rename it to AboutDelphi.rc. In the AboutDelphi.rc file, have the following lines: Clock WAVE c:\mysounds\projects\clock.wavMailBeep WAVE c:\windows\media\newmail.wavCool AVI cool.aviIntro RCDATA introsong.mp3 The script file simply defines resources. Following the given format the AboutDelphi.rc script lists two .wav files, one .avi animation, and one .mp3 song. All statements in a .rc file associate an identifying name, type and file name for a given resource. There are about a dozen predefined resource types. These include icons, bitmaps, cursors, animations, songs, etc. The RCDATA defines generic data resources. RCDATA let you include a raw data resource for an application. Raw data resources permit the inclusion of binary data directly in the executable file. For example, the RCDATA statement above names the applicationââ¬â¢s binary resource Intro and specifies the file introsong.mp3, which contains the song for that MP3 file. Note: make sure you have all the resources you list in your .rc file available. If the files are inside your projects directory you dont have to include the full file name. In my .rc file .wav songs are located *somewhere* on the disk and both the animation and MP3 song are located in the projects directory. Creating a Resource File (.RES) To use the resources defined in the resource script file, we must compile it to a .res file with the Borlands Resource Compiler. The resource compiler creates a new file based on the contents of the resource script file. This file usually has an .res extension. The Delphi linker will later reformat the .res file into a resource object file and then link it to the executable file of an application. The Borlands Resource Compiler command line tool is located in the Delphi Bin directory. The name is BRCC32.exe. Simply go to the command prompt and type brcc32 then press Enter. Since the Delphi\Bin directory is in your Path the Brcc32 compiler is invoked and displays the usage help (since it was called with no parameters). To compile the AboutDelphi.rc file to a .res file execute this command at the command prompt (in the projects directory): BRCC32 AboutDelphi.RC By default, when compiling resources, BRCC32 names the compiled resource (.RES) file with the base name of the .RC file and places it in the same directory as the .RC file. You can name the resource file anything you want, as long as it has the extension .RES and the filename without the extension is not the same as any unit or project filename. This is important because, by default, each Delphi project that compiles into an application has a resource file with the same name as the project file, but with the extension .RES. Its best to save the file to the same directory as your project file. Including (Linking/Embedding) Resources to Executables After the .RES file is linked to the executable file, the application can load its resources at run time as needed. To actually use the resource, youll have to make a few Windows API calls. In order to follow the article, youll need a new Delphi project with a blank form (the default new project). Of course add the {$R AboutDelphi.RES} directive to the main forms unit. Its finally time to see how to use resources in a Delphi application. As mentioned above, in order to use resources stored inside an exe file we have to deal with API. However, several methods can be found in the Delphi help files that are resource enabled. For example, take a look at the LoadFromResourceName method of a TBitmap object. This method extracts the specified bitmap resource and assigns it TBitmap object. This is *exactly* what LoadBitmap API call does. As always Delphi has improved an API function call to suit your needs better. Now, add the TMediaPlayer component to a form (name: MediaPlayer1) and add a TButton (Button2). Let the OnClick event look like: One minor *problem* is that the application creates an MP3 song on a user machine. You could add a code that deletes that file before the application is terminated. Extracting *. Of course, every other type of a binary file can be stored as a RCDATA type. The TRsourceStream is designed specially to help us extract such file from an executable. The possibilities are endless: HTML in an exe, EXE in exe, empty database in an exe, and so and so forth.
Friday, November 22, 2019
How to Write and Submit an Excellent Precis
How to Write and Submit an Excellent Precis How to Write a Precis Flawlessly Numerous academic assignments can be quite a big challenge for students who prefer avoiding too complex tasks. Often, students who have no interest in dedicated learning and personal skillsââ¬â¢ constant improvement, face many problems once dealing with academic assignments. Still, no matter what reason is, every student needs to submit his academic papers on time. Writing a precis is probably one of the most difficult tasks for students. This academic assignment requires a proper structure and planning thus make sure to discover all the tips and guides on how to perform a precis mentioned in this article. The Definition of a Precis When dealing with a precis, it is great to know in advance what the kind of task you are dealing with and how to write it properly. In fact, a precis is a short summary. If translating the word ââ¬Å"precisâ⬠from French, it will be ââ¬Å"cut briefâ⬠. The precis is an outline of a published work, like dissertation or article. The student needs to provide a summary of the read text but without paraphrasing it. This task requires summing up ideas of the checked literature work and making some conclusions. Be aware, a precis is an important and separate work, thus it never remains a simple paraphrasing. Besides, a precis does not require mentioning all the details presented in an analyzed literature work. You need to sum up the main ideas and discover the structure of a checked article or dissertation. Remember, that a precis needs an objective view, thus there is no need to provide your personal opinion. This academic task requires essential points, clear structure, and precise revealing of the main ideas presented in work. You can find many precis samples online, and complete your task flawlessly. Make sure to check the main tips of critical precis presented below. Remember to summarize the main ideas presented in the analyzed paper and never try to provide your personal opinion. How to Start Performing a Precis Writing a precis is quite a complex process, which requires an ability to think critically, distinguish the main ideas from the entire content, and to provide an objective point of view. Here are some tips you can use for your precis performing: Read the analyzed article carefully and list the main ideas. Try to figure out what the author wanted to tell in his work. Check the evidence provided by the author. Restate the thesis provided by the author in your own words. Your opinions must be on-point and precise. Write a few sentences for each section. A precis is a short summary, thus it should not be too long. Re-read the article and make sure it is in accord with your summary. Check whether you have covered the main ideas. Make sure you use a logical structure. Check the accuracy of the written text. Check it for a few times to submit a flawless precis. Make sure to provide in your paper an analysis of the authorââ¬â¢s tone and the way he used to communicate with the audience. The Main Features of a Good Precis A precis is quite a difficult work, but it can be performed perfectly if you know the main features of a good precis: Clear and precise text. No paraphrased sentences, but only own words used. Logical order of the provided text. Great title of the paper. Lack of any irrelevant details. Lack of any outside information. How to Write a Rhetorical Precis Rhetorical precis is a greatly structured piece of writing, which requires summing up the main ideas. It should be a brief summary, with the outlined main ideas and points. Make sure to check a needed format and stick to your writing plan. Follow the next useful tips and guides: Mention the name of the author, the title of the article, and the date of publishing. Explain the way the author proves the main arguments of the paper. State the main purpose of the authorââ¬â¢s work. Reveal the way the author tries to communicate with the audience. When writing a precis, try to put all the ideas together, and catch the readersââ¬â¢ attention. Make a precis short and precise. Use your own words and an objective point of view. When writing a good precis, the student needs to provide a summary of the read text, article or dissertation, but without paraphrasing it. This complex academic task requires summing up ideas of the checked literature work and making some conclusions. A precis is an important and separate work, thus it never remains a simple paraphrasing. Besides, a precis does not require mentioning all the details presented in an analyzed literature work. You need to sum up the main ideas and discover the structure of a checked article or dissertation. Remember, that you must provide only an objective view, thus there is no need to tell your personal opinion. This task requires essential points, clear structure, and precise revealing of the main ideas presented in work.
Thursday, November 21, 2019
Osmosis Movie Review Example | Topics and Well Written Essays - 250 words
Osmosis - Movie Review Example The disease that invaded Frankââ¬â¢s body is called ââ¬ËAnthraxââ¬â¢ which is caused by the bacteria Bacillus Anthracis. It is a deadly disease that can affect the lungs, intestines or skin. In Frankââ¬â¢s case it affected the lungs leading him to experience severe throat ache and flu. He was also prone to the gastrointestinal infection caused by the hard boiled egg that frank had consumed. Also Frankââ¬â¢s eating habits and the ten seconds rule where pushing him closer to this disease anyways. The image of this bacteria is given below: In order to cure Frank, he was given the drug Drixenol as this drug soothes colds and flu. In my opinion this movie was a good show making kids understand the immune system. This movie was close to reality in the sense that it explained the ways in which an unhealthy lifestyle can endanger the human life. What had happened to Frank could happen to anyone in real life because if one continues to dwell upon such unhealthy eating habits he is prone to major illness just like Frank. Thus this movie had a good message in a very unique
Tuesday, November 19, 2019
Editi a paper Essay Example | Topics and Well Written Essays - 500 words
Editi a paper - Essay Example Moreover, since we dealt with employees in different companies in Saudi Arabia, a survey was the only possible way viable alternative to reach those employees. The survey consists comprised of 18 questions. A total of 43 people responded to it. 93% (40) of the respondents were male, and 7% (3) were female. The sample size was ample adequate to determine ascertain the real genuine needs of the above mentioned employees target group. The second (change this to ââ¬Å"first questionâ⬠if the mistake is not deliberate) question was about the employeesââ¬â¢ highest level of education. This question included 4 subcategories: vocational certificate, bachelorââ¬â¢s degree, masterââ¬â¢s degree, and doctoral degree; 32.6% (14) of the respondents have reportedly had a vocational degree, 7.0% (3) have had a masterââ¬â¢s degree, 2.3% (1) have a doctoral degree, and the rest (58.1% or 25) have a bachelorââ¬â¢s degree. (See Figure#1) Since we are dealing this survey dealt with employees who rarely enroll in English courses due to the busy nature of their job their busy work schedules, another question asked seeking information regarding their enrollment in programs imparting English education was included in the survey design whether they still study English. The result revealed that 59.5% (25) are were enrolled in still taking English courses, and while the remaining 17 are were not. This The outcomes suggests highlights the participantsââ¬â¢ need willingness to improve their English language skills. Although it is relatively difficult to derive accurate inferences regarding an individualââ¬â¢s aptitude towards a particular language a person cannot judge his or her level of proficiency in language due to owing to variable proficiency measurements, the specific questions designed to seek information regarding their proficiency level were included in this survey asked the employees about their proficiency level. The results indicated that 42.9% (18) considered their proficiency
Sunday, November 17, 2019
Financial Statement Essay Example for Free
Financial Statement Essay The first issue to discuss is the four different types of financial statements and the use of each that a business will use. The second issue to discuss is what financial statements that an investor will review. The third issue to discuss is what financial statements a creditor will review. The fourth will be what financial statements that management within a company will review. The first financial statement is the income statement (Kimmel et al, 2009). The income states will show the success or the failure of a companyââ¬â¢s operations for a certain period. The income statement will have the revenue the company will make, the expenses the company will spend, and the net income of the difference of each. The second financial statement is the retained earnings statement (Kimmel et al, 2009). Retained earnings mean the net income that is retained in the corporation. The statement will show the amount and the cause of changes that can occur in the retained earnings during a certain period. The period of both the retained earnings and the income statement have the same period. The information covered on the retained earnings would be the earnings from the month prior, add the net income, minus the dividends, and the outcome for the retained earnings for a certain month. The next financial statement would be the balance sheet (Kimmel et al, 2009). The use of the balance sheet is so a company can report the assets and the claims to the assets during a certain period. The claims to assets can be from two groups, the first would be the claims to creditors that would be the liabilities and the second would be the claims to owners that would be the stockholders equity. The basic accounting equation is Assets = Liabilities + Stockholdersââ¬â¢ Equity. Both sides of this equation must balance out. The last financial statement will be the statement of cash flows (Kimmel et al, 2009). The statement of cash flows will provide financial information about the cash receipts and payments of business for a certain period. The statement of cash flows will report the cash effects of the companyââ¬â¢s expenses. Those expenses can be through the operating, investing, and financing activities. The statement of cash flows will also show the net increase or decrease in cash during a certain period. The statement will also show the amount of cash at the end of another period. The information found on the statement of cash flows will be the operating expenses, the investing expenses, the financing expenses, the net increase, the cash at the beginning and end of a period. Investors will view the income statement to see the future performance of a company (Kimmel et at, 2009). Creditors will view the income statement for loans. Creditors will also view the retained earnings statement and the balance sheet to see the ability for a company to repay debt. Management will view each financial statement to see the financial health of the company (Kimmel et al, 2009). Management can view the income statement to see if the company is a success or failure. The retained earnings statement to see how much income will return to the company. The balance sheet to see how much cash is on hand for certain needs and to ensure there is a satisfactory proportion of debt to common stock. The statement of cash flows to see the entire picture of what is going on within the company financially. In conclusion, the highlight of the four different types of financial statements and the use of each that a business will use. The highlight of the financial statements an investor will review for the company. The highlight of the financial statements a creditor will review for the company. The highlight of which financial statements the management of the company will review for the organization.
Thursday, November 14, 2019
Steven Coveys The 7 Habits of Highly Effective People Essay -- Stephe
Steven Covey's The Seven Habits of Highly Effective People In the book, The Seven Habits of Highly Effective People by Steven Covey, lessons for personal change are presented in a very powerful and understandable way. The Habits can be applied to our own lives, our leadership of other people, a school or any other organization that can be run more effectively. However, before an application of these Habits can be made, a basic understanding of the material presented in the book must be obtained. Comparison with other leadership styles and theories can also clarify and reinforce this understanding as well. Finally, application can be made to a particular setting, a school. Where a person or organization falls on a continuum from immaturity to maturity or from dependence to independence to interdependence is a key to determining its effectiveness. In developing effectiveness then a movement toward interdependence (maturity) must be made. This is similar to the Immaturity-Maturity Theory proposed by Argyris (Hersey 73-76). As we move along a continuum from immaturity to maturity, we become more independent, active, self-aware and in control of our own lives. This movement requires a change in our habits and change is usually difficult. If we are to become more effective people or increase the effectiveness of the organization we are a part of we must accept the reality of, ââ¬Å"No pain, no gain.â⬠In order to facilitate the change process, Covey suggests that a focus on the character ethic is important. Many people today, in contrast, focus on the personality ethic. They focus on skills and techniques and their public image in dealing with people. They do what they have to do to look good in the public eye but often ... ...ion, educational leaders are going to need to continue to work on changing the current paradigms of public education. The entire idea behind the Seven Habits of Highly Effective People is that we must start where we are with who we are to become self-aware. Self-awareness, imagination, conscience and independent will allow us to creatively encounter our daily lives, situations, or others and effectively affect our lives. By taking control of our own lives and responding positively we can grow as people and live happier lives. Works Cited Covey, Stephen R. (1989). The Seven Habits of Highly Effective People: Powerful Lessons in Personal Change. New York, New York: Fireside. Hersey, P., Blanchard, K., & Johnson, D. (1996). Management of Organizational Behavior: Utilizing Human Resources (7th ed.). Upper Saddle River, NJ: Prentice Hall.
Tuesday, November 12, 2019
Friend Classification
Friend Classification Having friends is an important part of life. It is friends that I share everything with. There are many types of people in the world and many types of friends. Knowing that, it becomes all the more important to select the right people so that I might have the correct friends. A friend is somebody that will always be there for me. I always have a great bunch of friends but sometimes some people are more of a friend then others. I have my general acquaintance friends and then I have my best friends. What is the difference between a best friend and a general acquaintances friend? A best friend is a person that I know well and regard with affection and trust. My best friend knows me better than anyone, definitely better than my parents, and sometimes better than I know myself. For best friends there is a feeling, and an emotion for every event shared together: a feeling of love, a feeling of happiness and a feeling of remorse; a feeling of laughter, and a feeling of tears. My best friend has seen me at my worst, and helped me be my best. My best friend will always tell me that I look good, even on my worst days. My best friend is someone with whom I've shared my most intimate secrets with, and laughed the loudest. I've already made plans to name one of my children after her, in hopes that my next of one is a girl. And although we may grow apart and not talk to each other as much, it is safe to say that true best friends are the ones you have for life. My best friend always understands me, or at least pretends to, and she is always willing to listen to my opinions and never criticizes them, even if they are a little weird. We have a secret language with special codes that no one would ever be able to crack. She was with me and held my hand when I got my belly button pierced and she was there with me when my dad threatened to rip it out. She comes to all my family functions like Christmas, Thanksgiving, and Easter and makes fun of my strange great-aunts with me. When we go through these emotions together, we learn and grow from them and become closer than ever before. A general acquaintance friend is just simply an acquaintance. This means that I basically only know their name. I might not even remember what they look like if I go away for a short vacation. Usually, I meet these types of friends in school, at work, on the bus, in the gym, or anywhere else I might be. I normally would not mind having a cup of coffee with them, but if anything else came up, I usually would have no problem parting company. I normally donââ¬â¢t miss them when they are elsewhere. It is also this type of friends who give me the most amount of aggravation. Since most of the time I am placed in a position where you have to act friendly, such as school or work, I would not normally tell an acquaintance when he or she is doing something aggravating, such as tapping the fingers a table or chewing gum loudly. This is why I call them ââ¬Å"pest friends. A general acquaintance friend is not someone I would ever really consider hanging out with a lot or getting to know more than I have to. Human survival is based on some kind of friendship. From the highest authority to the lowest bums living on the streets all of us have experienced in some way or the other one of these different kinds of friendships. I take this friendship for granted because it is something that exists naturally in society and I never really have to actually go out into the world looking for a friend. My personal realization came when I had to start life in a new city, in different surroundings. The feeling of loneliness I had was enough to drive a person to near madness. So in conclusion what Iââ¬â¢m trying to say is that we cannot thrive successfully as individuals or as a society without having some form of friendship with other individuals rather it be general acquaintance friends or best friends.
Saturday, November 9, 2019
Best Friend Comparison
Many people have two best friends that are similar and different in many ways. These similarities are usually in age, attitude, and interests; on the other hand, some of the differences between these two friends can include height, beliefs, goals, ethnicities, cultures, and much more. Some people may not find any similarities or differences in their best friends, and others may find many similarities and differences in their friends.However, I find three distinct similarities and three differences within these similarities between my two best friends Daniella and Ashley, which allows me to see that despite these similarities and differences, they are still my best friends. Both Daniella and Ashley have boyfriends, but both boys are treated differently. Daniella and Ashley both live with their mom, but one house is cleaner then the other. Finally, Daniella and Ashley are both very smart, but one applies this smartness more then the other.My two best friends, Daniella and Ashley have b oyfriend. They both have been in their relationships for about 3 years, and they both met their boyfriends in freshman year of high school. Despite the similarity of both having boyfriends for the same amount of time, they treat their boyfriends differently. Daniella treats every moment with her boyfriend as if it were their last moment together. For example, every weekend, she picks her boyfriend up for a date. On the other hand, Ashley takes her boyfriend for granted.For instance, every other weekend, Ashley's boyfriend will pay for dinner and they never go on any dates. Both of my friends have boy friends, but Daniella treats her boyfriend with more respect than Ashley. In addition, Daniella and Ashley live with both their mom in a house. Daniella and Ashley both live in the same neighborhood as me. However, Daniella keeps her house immaculate. Her house is always clean and everything is in order. For example, her carpets always look brand new. Her bathroom is spotless, and her k itchen has everything organized, with the dishes always put away.Ashley's house looks like a tornado ran through it. Ashley's house is always a disaster. For instance, Ashley always has clothes all over the place and shoes everywhere. Her bathroom is completely disgusting. Her kitchen has filthy dishes all over the place and food on the floor. Her place also smells, unlike Daniella's house. Both of my friends live with both their mom in a house, but Daniella clearly knows how to maintain her home, while Ashley either does not care or does not know how to keep a clean home.Finally, both of my best friends, Daniella and Ashley, are extremely smart. Both of them speak very well and read lots of books daily. Daniella and Ashley usually get through the same book in the same amount of time, which is a 200-300 page book every four to five days. Both of my friends know how to discuss the text and analyze it. However, Daniella applies this talent to her schooling and future goal of becoming an Athletic Director, while Ashley does not apply herself at all. Daniella goes to all her classes and passes them with straight A's and B's.On the other hand, Ashley still, after many years, goes to school, but usually has to repeat her courses because she does not go to class regularly, and she is lazy to do the work. If Ashley did apply himself, I believe she would be the same to Daniella and also doing well in school. Either way, both are smart, but one applies herself, while the other does not. In conclusion, my two best friends Daniella and Ashley share many similarities, but within these similarities, they are both different.Both Daniella and Ashley have boyfriends, live with their mom in a house, and they both are very smart. However, Daniella treats her boyfriend with respect and takes him on dates every weekend, while Ashley never checks in with her boyfriend or buys him gifts or go on dates. Daniella's house is very clean and has everything in order. Her dishes are always clean, and her carpets are spotless, while Ashley's house is disgusting. Her bathroom is filthy, and her dishes are always dirty.Ashley also always has clothes all over her floor as well as shoes throwed everywhere. Finally, Daniella and Ashley are very smart and read a lot, but Daniella applies her smartness to school and future, while Ashley fails to discipline herself to move on with school. Either way, my two best friends may have similarities that differ in many and various ways, but one similarity that has no differences is that they are my best friends, and I care about them equally.
Thursday, November 7, 2019
The Age of Innocence by Edith Wharton Journal
The Age of Innocence by Edith Wharton Journal The struggle between the individual and the society is one of the main themes in The Age of Innocence by Edith Wharton. During the whole discussion, the author tries to create a contradiction between one person and the society from different angles. Still, there is one peculiar aspect that should be pointed at.Advertising We will write a custom essay sample on ââ¬Å"The Age of Innocenceâ⬠by Edith Wharton Journal specifically for you for only $16.05 $11/page Learn More Medora Manson, Agathon Carver, Emerson Sillerton, and Ned Winsett are the bohemian characters who make cameo appearances in the novel The Age of Innocence by Edith Wharton. The main idea of such appearances is to show the differences in the society. The time discussed in the novel is characterized by the sharp differences between different countries, layers of population, etc. To show the difference between Europe and America the author inserts an aunt, Medora Manson, who took Ellen to E urope when she was a child. Being brought up in another country her return to America helps to see the difference in views. Reading the novel, it is possible to notice that in most cases the similar class is shown. There is no lower class or the middle one. Still, the appearance of the journalist, Ned Winsett, who is from a different social circle, is important. This part in the novel helps a reader to get the whole situation in the society. Much attention is paid to discussion of one particular class of people who depict one social circle. However, it is important to make sure that the reader understands the time which is considered and can see the whole picture (Bloom 169). The appearance of these several characters helps the reader to get the necessary information and draw appropriate conclusions. These small scenes are the only ones which are created for making a contradiction between classes and people as the structures. In other cases a person is confronted to the whole societ y. Whartons representation of the demi-monde gives us a very partial vision of the city which ignores the very real existence of underclasses. The author wanted to show the confrontation of people of one and the same class, to present the differences which exist in the society at one and the same level. The presence of the different classes could lead to misunderstanding of the theme in the novel. However, the author needed to present the time he depicts to make sure the reader can understand the whole picture.Advertising Looking for essay on american literature? Let's see if we can help you! Get your first paper with 15% OFF Learn More The bohemian characters that make cameo appearances are important in this way. However, the main idea the author wanted to present is the problems which existed in one social circle. The struggle of one person against the whole society is exactly what the problem is and the author of the text could underline this problem only by means of presenting only one society. The ignorance of the underclasses is intentional as those classes are not necessary in presenting the conflict the author depicts. Reading the novel, it is possible to understand the great difference between American and European societies. American society is too conservative. People in that society cannot understand how it is possible to run away from a husband, how it is possible to have such a scandal reputation as Ellen Olenska has and still appear in the society, lead a normal life and express personal point of view, dissatisfaction with a husband and his decision. The difference of the European and American societies may be seen through Ellen Olenska and May Welland. These two women are brought up in different societies and they have absolutely different modes of behavior. Ellen Olenska has decided to leave her husband and how has a love affair with another man, who has a wife. If Ellen Olenska got to know that her husband has a lover should would leave without thinking of the consequences. However, May Welland a wife of that man acts absolutely different. Family is everything for her and she is ready to protect her family using all possible means. Being aware of the husbandââ¬â¢s betrayal, May Welland does not leave the country looking for protection, she does all possible to convince Ellen Olenska that she is pregnant and she is to leave. Then, when she understands that her husband is about to leave her, she says him about her pregnancy (Wharton 305). A man in that society cannot leave a woman with a child alone. That is why, he stays. The difference in behavior, points of view and the consideration of life are obvious. American society reflected through the main characters May Welland and Newland Archer is confronted to the European one presented by Ellen Olenska and her husband Polish Count Olenski, a European nobleman. The difference in vision of the family is obvious.Advertising We will write a c ustom essay sample on ââ¬Å"The Age of Innocenceâ⬠by Edith Wharton Journal specifically for you for only $16.05 $11/page Learn More Americans respect the institution of a family and do all possible to conserve their relationships, while Europeans do not treat family as something sacred. That is why they have problems, scandals, etc. The social, cultural and other differences may be followed through the relation to the family by the characters mentioned above. Bloom, Harold. Edith Whartons The Age of Innocence. New York: Infobase Publishing, 2005. Print. Wharton, Edith. The Age of Innocence. New York: Forgotten Books, 2010. Print.
Tuesday, November 5, 2019
How to Manipulate INI files from Delphi
How to Manipulate INI files from Delphi INI files are text-based files used for storing an applications configuration data. Even though Windows recommends using the Windows Registry to store application-specific configuration data, in many cases, youll find that INI files provide a quicker way for the program to access its settings. Windows itself even uses INI files;à desktop.inià and boot.inià being just two examples. One simple use of INI filesà as a status saving mechanism would be to save the size and location of a form if you want a form to reappear at its previous position. Instead of searching through a whole database of information to find the size or location, an INI file is used instead. The INI File Format Initialization or Configuration Settings file (.INI) is a text file with a 64 KB limit divided into sections, each containing zero or more keys. Each key contains zero or more values. Heres an example: [SectionName] keyname1value ;comment keyname2value Section names are enclosed in square brackets and must begin at the beginning of a line. Section and key names are case-insensitive (the case doesnt matter), and cannot contain spacing characters. The key name is followed by an equal sign (), optionally surrounded by spacing characters, which are ignored. If the same section appears more than once in the same file, or if the same key appears more than once in the same section, then the last occurrence prevails. A key can contain string, integer, or boolean value.ââ¬â¹ Delphi IDE uses the INI file format in many cases. For example, .DSK files (desktop settings) utilize the INI format. TIniFile Class Delphi provides the TIniFile class, declared in the inifiles.pas unit, with methods to store and retrieve values from INI files. Prior to working with the TIniFile methods, you need to create an instance of the class: uses inifiles; ... var à à IniFile : TIniFile; begin à à IniFile : TIniFile.Create(myapp.ini) ; The above code creates an IniFile object and assigns myapp.ini to the only property of the class - the FileName property - used to specify the name of the INI file you are to use. The code as written above looksà for the myapp.ini file in the \Windows directory. A better way to store application data is in the applications folder - just specify the full pathname of the file for the Create method: // place the INI in the application folder, // let it have the application name // and ini for extension: iniFile : TIniFile.Create(ChangeFileExt(Application.ExeName,.ini)) ; Reading From INI The TIniFile class has several read methods. The ReadString reads a string value from a key, ReadInteger. ReadFloat and similar are used to read a number from a key. All read methods have a default value that can be used if the entry does not exist. For example, the ReadString is declared as: function ReadString(const Section, Ident, Default: String): String; override; Write to INI The TIniFile has a corresponding write method for each read method. They are WriteString, WriteBool, WriteInteger, etc. For example, if we want a program to remember the name of the last person who used it, when it was, and what the main form coordinates were, we might establish a section called Users, a keyword called Last, Dateà to track the information, and a section called Placementà with keys Top,à Left,à Width, and Height. project1.ini à [User] à LastZarko Gajic à Date01/29/2009 à [Placement] à Top20 à Left35 à Width500 à Height340 Note that the key named Last holds a string value, Date holds a TDateTime value, and all keys in the Placement section hold an integer value. The OnCreate event of the main form is the perfect place to store the code needed to access the values in the applications initialization file: procedure TMainForm.FormCreate(Sender: TObject) ; var à à appINI : TIniFile; à à LastUser : string; à à LastDate : TDateTime; begin à à appINI : TIniFile.Create(ChangeFileExt(Application.ExeName,.ini)) ; à à try à à à à //if no last user return an empty string à à à à LastUser : appINI.ReadString(User,Last,) ; à à à à //if no last date return todays date à à à à LastDate : appINI.ReadDate(User, Date, Date) ; à à à à //show the message à à à à ShowMessage(This program was previously used by LastUser on DateToStr(LastDate)); à à à à Top : appINI.ReadInteger(Placement,Top, Top) ; à à à à Left : appINI.ReadInteger(Placement,Left, Left); à à à à Width : appINI.ReadInteger(Placement,Width, Width); à à à à Height : appINI.ReadInteger(Placement,Height, Height); à à finally à à à à appINI.Free; à à end; end; The main forms OnClose event is ideal for the Save INI part of the project. procedure TMainForm.FormClose(Sender: TObject; var Action: TCloseAction) ; var à à appINI : TIniFile; begin à à appINI : TIniFile.Create(ChangeFileExt(Application.ExeName,.ini)) ; try à à à à appINI.WriteString(User,Last,Zarko Gajic) ; à à à à appINI.WriteDate(User, Date, Date) ; à à à à with appINI, MainForm do à à à à begin à à à à à à WriteInteger(Placement,Top, Top) ; à à à à à à WriteInteger(Placement,Left, Left) ; à à à à à à WriteInteger(Placement,Width, Width) ; à à à à à à WriteInteger(Placement,Height, Height) ; à à à à end; à à finally à à à à appIni.Free; à à end; end; INI Sections The EraseSection erases an entire section of an INI file. ReadSection and ReadSections fillà a TStringList object with the names of all sections (and key names) in the INI file. INI Limitations Downsides The TIniFile class uses the Windows APIà which imposes a limit of 64 KB on INI files. If you need to store more than 64 KB of data, you should use the TMemIniFile. Another problem might arise if you have a section with more than 8 K value. One way to solve the problem is to write your own version of the ReadSection method.
Sunday, November 3, 2019
Macca and Madina Revelation Essay Example | Topics and Well Written Essays - 1250 words
Macca and Madina Revelation - Essay Example Discussion The Mecca sanctuary lies in the SW region of the Modern day Saudi Arabia, close to the Red Sea. Many years prior the emergence of Islamic Religion, the city served as the fundamental, trade, socio-cultural and evangelistic House for all communities in Arabic world. Mecca City gave rise to the most prominent antichrist ever to exist in the last over two thousand years) and to the Islamic religion. It became the epitome of Islamic territory and the main dwelling palace of Allah. Therefore, and hence then, Mecca sanctuary attained its title ââ¬Å"almadina almukarramaâ⬠(a sacred and bountiful city). All Muslims should direct their players to the sanctuary and Kaââ¬â¢ba, Meccaââ¬â¢s shrine. Similarly, it is Muslims obligation and a fundamental five aspects of Islamic doctrine to go to the prayer center once in the course of their living age. Additionally non-believers are restricted to touch the sacred Mecca soil, and if one touches it, the law states that he shoul d be sentenced to death, (Nomachi and Seyyed 85). Mecca is a popularly known sacred center and Islamic religious universe. Mecca is a sanctified preservation recommended for believers and is humanity guidance. Mecca is an indisputable memorial (of the guidance of God), a holy place where Abraham prayed, and every person who enters Mecca is safe. Humanity has a Hajji or excursion obligation unto the creator to the center. The Islamic holy book, Koran states that every person who enters the sacred Mecca is safe and believers should not harm or interfere with people going to the city for pilgrimage, (Shahrukh 25). According to Islamic traditions, even criminals are safe from the penalty and imprisonment inside the sanctuary. The safeguarded reputation of the sanctuary and the inviolability of the city are further reinforced historically in that all over the period of drastic warfare amid Medina Muslims, and Meccan pagans, the sanctuary of Mecca was exempted from struggles and bloodshed within its quarters. Similarly, when Mecca was lastly captured, about 8 years after the departure of Muhammad and his believers, the city was a nearly bloodless conquest. Significance of the city to Muslims The significance of the city for Muslims believers is irrefutable, and all Muslims around the world must pray at least five times daily facing Meccaââ¬â¢s shrine, Kaââ¬â¢ba. Additionally, a pilgrimage to the city is a requirement for all believers who can afford a tour to the city as a crucial aspect of the five faith pillars. Every year more than 3m people gather for main Hajj (pilgrimage) during the Dhuââ¬â¢l-Hijja Muslim month, and others perform Umrah (a minor pilgrimage) at diverse periods in the year, (Locate 36). Some non-Muslims have witnessed Hajji Rituals and rites, as they are mainly restricted from entering sacred Medina and Mecca cities. Several roadblocks are designed along the pathways and roads heading to Mecca to prevent non-Muslim entry. The popular no n-Muslim case entering the sanctuary was that of Richard Burton, a traveler from Britain, exploration in 1853. Sir Richard camouflaged himself as an Islamic believer from Afghanistan to enter and draft unique excursion story to both Mecca sanctuary and Medina. Muslim believes that the primary center of Mecca
Subscribe to:
Posts (Atom)