Wednesday, March 18, 2020

A Comparison of the Merits of using Software or Hardware Transactional Memory, against Traditional ‘Semaphore’ Locking The WritePass Journal

A Comparison of the Merits of using Software or Hardware Transactional Memory, against Traditional ‘Semaphore’ Locking A Comparison of the Merits of using Software or Hardware Transactional Memory, against Traditional ‘Semaphore’ Locking ]. Bright, P. (2011) IBM’s new transactional memory: make-or-break time for multithreaded revolution. Available at: http://arstechnica.com/gadgets/2011/08/ibms-new-transactional-memory-make-or-break-time-for-multithreaded-revolution/ Â  [Accessed 12th March 2014]. Detlefs, D., Martin, P.A., Moir, M. Steele, G.L., (2001) ‘The Twentieth Annual ACM Symposium on Principles of Distributed Computing’, in Lock-free Reference Counting, ACM Press: New York. Maged, M.M. (2004) ‘Proceedings of the ACM SIGPLAN 2004 Conference on Programming Language Design and Implementation’, in Scalable Lock-free Dynamic Memory Allocation, ACM Press: New York.

Monday, March 2, 2020

String Types in Delphi

String Types in Delphi As with any programming language, in Delphi, variables are placeholders used to store values; they have names and data types. The data type of a variable determines how the bits representing those values are stored in the computers memory. When we have a variable that will contain some array of characters, we can declare it to be of typeString.  Delphi provides a healthy assortment of string operators, functions and procedures. Before assigning a String data type to a variable, we need to thoroughly understand Delphis four string types. Short String Simply put,  Short String  is a counted array of (ANSII) characters, with up to 255 characters in the string. The first byte of this array stores the length of the string. Since this was the main string type in Delphi 1 (16 bit Delphi), the only reason to use Short String is for backward compatibility.  To create a ShortString type variable we use:   var s: ShortString; s : Delphi Programming;​ //S_Length : Ord(s[0])); //which is the same as Length(s) The  s  variable is a Short string variable capable of holding up to 256 characters, its memory is a statically allocated 256 bytes. Since this is usually wasteful - unlikely will your short string spread to the maximum length - second approach to using Short Strings is using subtypes of ShortString, whose maximum length is anywhere from 0 to 255.   var ssmall: String[50]; ssmall : Short string, up to 50 characters; This creates a variable called  ssmall  whose maximum length is 50 characters. Note: When we assign a value to a Short String variable, the string is truncated if it exceeds the maximum length for the type. When we pass short strings to some Delphis string manipulating routine, they are converted to and from long string. String / Long / Ansi Delphi 2 brought to Object Pascal  Long String  type. Long string (in Delphis help AnsiString) represents a dynamically allocated string whose maximum length is limited only by available memory. All 32-bit Delphi versions use long strings by default. I recommend using long strings whenever you can.   var s: String; s : The s string can be of any size...; The  s  variable can hold from zero to any practical number of characters. The string grows or shrinks as you assign new data to it. We can use any string variable as an array of characters, the second character in  s  has the index 2. The following code   s[2]:T; assigns  T  to the second character os the  s  variable. Now the few of the first characters in   s  look like:  TTe s str....Dont be mislead, you cant use s[0] to see the length of the string,  s  is not ShortString. Reference counting, copy-on-write Since memory allocation is done by Delphi, we dont have to worry about garbage collection. When working with Long (Ansi) Strings Delphi uses reference counting. This way string copying is actually faster for long strings than for short strings.  Reference counting, by example:   var s1,s2: String; s1 : first string; s2 : s1; When we create string  s1  variable, and assign some value to it, Delphi allocates enough memory for the string. When we copy  s1  to  s2, Delphi does not copy the string value in memory, it only increases the reference count and alters the  s2  to point to the same memory location as  s1. To minimize copying when we pass strings to routines, Delphi uses copy-on-write technique. Suppose we are to change the value of the  s2  string variable; Delphi copies the first string to a new memory location, since the change should affect only s2, not s1, and they are both pointing to the same memory location.   Wide String Wide strings  are also dynamically allocated and managed, but they dont use reference counting or the copy-on-write semantics. Wide strings consist of 16-bit Unicode characters. About Unicode character sets The ANSI character set used by Windows is a single-byte character set. Unicode stores each character in the character set in 2 bytes instead of 1. Some national languages use ideographic characters, which require more than the 256 characters supported by ANSI. With 16-bit notation we can represent 65,536 different characters. Indexing of multibyte strings is not reliable, since  s[i]  represents the ith byte (not necessarily the i-th character) in  s. If you must use Wide characters, you should declare a string variable to be of the WideString type and your character variable of the WideChar type. If you want to examine a wide string one character at a time, be sure to test for multibite characters. Delphi doesnt support automatic type conversions betwwen Ansi and Wide string types.   var s : WideString; c : WideChar; s : Delphi_ Guide; s[8] : T; //sDelphi_TGuide; Null terminated A null or  zero terminated  string is an array of characters, indexed by an integer starting from zero. Since the array has no length indicator, Delphi uses the ASCII 0 (NULL; #0) character to mark the boundary of the string.  This means there is essentially no difference between a null-terminated string and an array[0..NumberOfChars] of type Char, where the end of the string is marked by #0. We use null-terminated strings in Delphi when calling Windows API functions. Object Pascal lets us avoid messing arround with pointers to zero-based arrays when handling null-terminated strings by using the PChar type. Think of a PChar as being a pointer to a null-terminated string or to the array that represents one. For more info on pointers, check:Pointers in Delphi. For example, The  GetDriveType  API function determines whether a disk drive is a removable, fixed, CD-ROM, RAM disk, or network drive. The following procedure lists all the drives and their types on a users computer. Place one Button and one Memo component on a form and assign an OnClick handler of a Button: procedure TForm1.Button1Click(Sender: TObject); var Drive: Char; DriveLetter: String[4]; begin for Drive : A to Z do begin DriveLetter : Drive :\; case GetDriveType(PChar(Drive :\)) of DRIVE_REMOVABLE: Memo1.Lines.Add(DriveLetter Floppy Drive); DRIVE_FIXED: Memo1.Lines.Add(DriveLetter Fixed Drive); DRIVE_REMOTE: Memo1.Lines.Add(DriveLetter Network Drive); DRIVE_CDROM: Memo1.Lines.Add(DriveLetter CD-ROM Drive); DRIVE_RAMDISK: Memo1.Lines.Add(DriveLetter RAM Disk); end; end; end; Mixing Delphis strings We can freely mix all four different kinds of strings, Delphi will give its best to make sense of what we are trying to do. The assignment s:p, where s is a string variable and p is a PChar expression, copies a null-terminated string into a long string. Character types In addition to four string data types, Delphi has three character types:  Char,  AnsiChar, and  Ã¢â‚¬â€¹WideChar. A string constant of length 1, such as T, can denote a character value. The generic character type is Char, which is equivalent to AnsiChar. WideChar values are 16-bit characters ordered according to the Unicode character set. The first 256 Unicode characters correspond to the ANSI characters.

Friday, February 14, 2020

A clue about current socialpolitical issue Essay

A clue about current socialpolitical issue - Essay Example work to pass fundamental values and assumption by using one of the protagonists to show the effect drugs have to young people who engage themselves in drug trafficking. Maria Alvarez work at the rose plantation where she could use the little salary she get to support her family. In her ambition to find a well-paying job and the need to get fulfill Maria, she ends up suffering emotional and psychologically. The author has done his research perfectly, and this enables him to know the major thing that is causing young people to engage themselves in drug trafficking. The argument he present in his play depicts a solid reasoning that Joshua possess as his argument were not based on rumors or wishful thinking hence enabled him to present his work on an empirical manner. The author has tried to convince his audiences that poverty is the main factor that is causing young people like Maria to become mules. However, poverty is not necessary the main cause that is making people be mule but greed is also another factor responsible in causing other people like Maria to join drug traffickers. Therefore, Joshua have is jumping to the conclusion without considering other factors like gluttony which some use to became drug traffickers. Despite, poor economic conditions and moral failures of people such as Lucy, Maria and Blanca, political corruption still contributes to an increase in drug traffickers. Many individual have used their economic and political power to facilitate drug trafficking as they used their political power and money to bribe the police. Therefore, the government must also not concentrate on people like Maria but also on those who are harnessing their financially viable and political power to perpetuate the drug

Sunday, February 2, 2020

Marketing Fundamentals and Enviroment Coursework

Marketing Fundamentals and Enviroment - Coursework Example The more the communication is done better result would be. The good result is, of course, the desire of every marketing personal. Communication is the act of influencing and inducing others to act in the manner intended. Sharing of ideas with others is basically communication. Thus, we could simply say that normally there is a duration of the time period for a particular organization/brand to simply be identified in a particular market. For all this, there are certain factors that should be followed in order to be successful. (DiMaggio, n.p, 2001) Time utilization is one of the most essential elements in the promotion of any organization/brand. If the allocation of proper time is done and every specific factor is taken under consideration then the desired result could easily be achieved in less time period. An excellent example of a very successful brand is 'mother care'. This specific brand by the name of 'mother care' is a unique collection of all the items of children wear, as well as furniture, stationery, toy and much more. This brand has got a very good collection of everything that a child basically requires and at a reasonable price. It is due to this reason, that people like shopping in 'mother care'. One of the other reason is that ' mother care' have got their outlet basically in all the countries of the world, no matter where you go and if you would like to buy their product you can easily get it anywhere in the world. It is very much true that these organizations/brands do have to face a lot of challenges in the market, their unique collection of stock. Let, we take 'levis'. This brand is famous for its good quality of products. These products are durable, comfortable and good to wear; especially the youth of today really likes this brand.  Ã‚  

Friday, January 24, 2020

Romanticism :: Romantic Movement Essays

Romantics often emphasized the beauty, strangeness, and mystery of nature. Romantic writers expressed their intuition of nature that came from within. The key to this inner world was the imagination of the writer; this frequently reflected their expressions of their inner essence and their attitude towards various aspects of nature. It was these attitudes that marked each writer of the Romantic period as a unique being. These attitudes are greatly reflected in the poem â€Å"When I Heard the Learned Astronomer† by Walt Whitman.   Ã‚  Ã‚  Ã‚  Ã‚  Walt Whitman reflects this Romantic attitude in the speaker of his poem. He situates the speaker in a lecture about astronomy that the speaker finds very dull and tedious. Thus the speaker looks past the charts, diagrams and the work that is involved with them and starts to imagine the beauty of the stars alone. Being lifted out of the lecture room, the speaker is freed of his stress and boredom and is able to enjoy the peace and true beauty that the stars embrace.   Ã‚  Ã‚  Ã‚  Ã‚  Varying degrees of Romantic attitude has affected many areas in our lives today. A vast area that Romantic attitude has affected is The Arts. The Arts, composed of many types of genre, are composed and interpreted very different. Some people may look at a painting and imagine extremely different attitudes than the artist who painted it had intended. Another area that the Romantic attitude has drastically affected is fashion. As you glance around you’ll probably observe that very few people dress similar and each person has developed their own style of dress. Fashion often reflects a person’s attitude towards life and may express the mood that the particular person has, this gives each person a unique quality to distinguish them from the rest of society.

Thursday, January 16, 2020

Huckleberry Finn Paper: Why the Ending Was a Let Down Essay

Throughout the novel, Huck and Jim are faced with problems and adventures. Jim teaches Huck the ‘right’ way to go about things and how to treat people. Most of the novel Huck grows as a person and matures. One might argue that it was because he was around other adults. But towards the latter part of the book, his old friend, Tom Sawyer arrives and Huck is up to his old tricks again. In the earlier parts of the book, Huck was very independent and thought of his own plans to get out of bad situations, but right after Tom wandered back into the story Huck just agrees with everything and anything that his friend suggests. He asks questions and tells Tom that it would be easier to perform the plan his own way, but Tom always puts his ideas down and disagrees with it. Clearly, throughout the first two-thirds of the novel, Huck’s character grows and Huck becomes more self-dependent, but every part of the story that Tom is involved in, he causes Huck to go back to his sam e old way. In chapter 16, there are two men that talk to Huck and ask if he’s seen any runaway slaves. At first Huck hesitates to answer because he’s had a southern upbringing which taught him to think that slaves are people’s property and if you see one trying to escape, you turn them in. But in another thought, Huck doesn’t really want to turn him in because he’s been having such a good time with Jim and they’ve become really good friends at this point. In the end, Huck makes up a story that his Pap is in the wigwam and that he has smallpox. The men in the canoe are put off by this information and feel sorry for Huck and his father, so they put forty dollars on a piece of drift wood and tell Huck to take it. â€Å"Then I thought a minute, snd says to myself, hold on: s’pose you’d ‘a’ done right and give Jim up, would you felt better than you do now? No, says I, I’d feel bad—I’d feel just the same way I do now Well, then, says I, what’s the use you learning to do right when it’s troublesome to do right and ain’t no trouble to do wrong†¦?† (Pg. 91) This attitude towards Jim is very different from his earlier one, in a previous chapter Tom helps Huck sneak out of the Widow’s house and Jim hears them making noise in the bushes. The two boys wait in the brush until Jim falls asleep and before they leave Tom has an idea that Huck doesn’t really want to do because he thinks that they might get caught. Tom ends up doing it anyway though; he takes Jim’s hat and puts it in the branches and ties Jim to the tree that he fell asleep under. None of this was Huck’s ideas, which makes Tom the less mature of the two. This is the starting level of Huck’s character where Tom is able to tell Huck what to do and his friend does never protests for long because he believes that Tom is so amazing and he really looks up to him. Huck thinks that if he does what Tom says, then he will be just as cool as his best friend. Later on in the novel this changes and he starts to form a mind of his own. He even starts to stray from what he knows as ‘what is right’. In chapter 26, the duke and the dauphin try to con $6,000 out of the Wilk’s family. One of the daughters, Joanna, can feel that something is up and starts to question Huck to see whether they’re lying or not. At first Huck tries to lie to her, but as Joanna’s interrogation goes on, her sisters tell her to be courteous towards their guests. Huck felt bad about the situation because he knew that his trickster companions were going to take this family’s money. â€Å"I felt so ornery and low down and mean that I says to myself, my mind’s made up; I’ll hive that money for them or bust †(175). So he thinks of a plan to take back the money that the duke and the dauphin took from them. I believe that if he had not grown up from his previous adventures with Jim, he would not have cared that these men were taking all this money from these people, in fact he’d probably want some of it for helping out. But Huck was very sympathetic for the family and tried to his best extent to fix what the conmen had done. This is a situation that proves how far Huck has come from being told what to do and looking up to Tom. Huck is now able to form his own opinions about things and starts to think â€Å"Hey, I am able to do things on my own. I don’t need Tom, or conmen, or anybody else to tell me what to do any more.† In chapter 31, Huck discovers that Jim is sold to a family by the dauphin. After he learns this, he starts to write a note to Tom so that he can tell the Widow were Jim is so she can go get him, but then he decides that he doesn’t want to turn Jim in. He’s had so many experiences with him on the river; he’s practically his family now. He even cried earlier when he found out that Jim had been captured. If he had been the same kid that he was before the adventures with Jim, he would have thought that it was the right thing for him to do by turning his friend in. But throughout the novel he learned that Jim is a human too, he’s not a piece of property. Jim has feelings, thoughts, and even a family. Huck was brought up to think that helping slaves was a bad thing, but from now on he knew that he would follow his heart and decided â€Å"All right then, I’ll go to hell!† (214). Here is another example that proves that Huck’s character has been growing throughout the novel. It shows this because of everything that this boy has gone through he has learned that it’s not always best to do what society says is right, sometimes it’s even extremely wrong and should never be done. In chapter 35, the two boys think of plans to get Jim out. Huck thinks of a short and easy plan, while Tom thinks of something more complicated. Tom also complains about how his Uncle Silas should have a watchman, watch dogs, a moat, and a handful of other obstacles that make their task harder to perform. By this time, Huck is so mesmerized by Tom because he thinks that everything that his friend does is so great that nothing can go wrong if Tom’s doing it. Tom gets his way, as usual, and they start stealing things that they need from Aunt Sally. They spend weeks on getting Jim out, when Huck’s idea would have only taken a few days at the most; Tom probably would not have gotten shot either. At one point Jim even lifted his chain from underneath the bed and went outside to help the boys. They could have just left then and there, but Tom had to make Jim’s escape as difficult as possible. If it was just Huck and Jim, they would have just left! This part of the novel was extremely hard to read, there was no point to prolong Jim’s escape, at this time in the plotline everything that had been made before was just being erased and there was just no point to the rest of this particular adventure with Tom; it was certainly not helping Huck’s character out. This last section of the book took strides backwards from Huck’s development of maturity throughout the novel. It was like taking a few steps forward only to take twenty more backwards. And overall makes the ending of the book a bit disappointing, Huck is right back where he started, he’s now living in a house with another family that will try to strip him of his freedom and make him more civilized. In my opinion, the last adventure of the story ruined what the others had built up for Huck’s character. At the end of the story Huck had reverted back to idolizing Tom and falling for all of his manipulative lies just as before.

Wednesday, January 8, 2020

Essay On Current Events In Nepal - 1650 Words

Some of the major current events the Nepali are dealing with include the always volatile weather, which can cause drought or famine depending on the timing, as well as the formation of a solid political foundation. After large scale elections which are supposed to take place before the new year, Nepal’s constitution will allow for a return to elected prime ministers after a ten year period of control by Maoist insurgents ended in 2006 (The World Factbook). The current events that most obviously affect the logistical situation in Nepal are the twin Earthquakes that happened in Spring of 2015, which killed more than 20,000 people and forced efforts toward relief for the numerous who were left homeless, and even town-less (BBC).†¦show more content†¦Nepal Airlines operates some intra-country flights but is banned from flying to the E.U. for safety reasons (Nepal-Transportation). There are no pipelines within the country, however negotiations are underway from the constru ction of a pipeline from India to Nepal; gasoline is trucked from India to Nepal currently (Tendering Starts). The road system in Nepal is used as the primary means of transport throughout the country. The Mahendra Highway stretches over 1000 kilometers from East to West across the country. Most of the major highways are in decent condition, but delays can still happen on these due to inclement weather and traffic buildup (Nepal Logistics). Roads off the main highways frequently suffer from disrepair and neglect; from simple gravel roads to whole sections of the road being washed out, logistics companies have to plan for delays. Storage in Nepal is plentifully available for commercial needs in the form of large-scale warehouses, but these are largely operated by the Nepal Food Corporation and their availability is tied to harvest times. The Nepali Red Cross is one of the only NGOs that operates a warehouse in the country (Nepal Logistics). The major inventory types handled in Nepal are Work-in-Process and Raw Materials. The Nepali import spun wool and export finished textiles and rugs. They also ship timber, a raw material, as well as food products and metals like quartz. RequiredShow MoreRelatedHow Radical Change Is More Effective Than Incremental Change1371 Words   |  6 PagesFurthermore, with current greenhouse gas concentration in the atmosphere, while emissions continue to rise each year, especially in developing countries with their high economic growth, incremental change alone is inadequate. Non-radical option is no longer applicable, while low-carbon supply technology alone is not enough to carry on the necessary rate of emission reductions. Rather, it should be complemented with rapid, deep and early reduction of the energy consumption (Anderson, 2013). Current belief thatRead MoreIntergovernmental Panel On Climate Change2626 Words   |  11 Pages2012, O’Brien, K., 2012). The term ‘radical’ and ‘transformational’ will be used interchangeably in this essay. This essay begins with an extensive description of characteristic of radical change and followed by discussion of the preference to enforce radical than incremental change to tackle the impact of climate change, both sections including specific examples from the previous or current adaptation strategy employed in some regions across the world. Shortly after, radical change which appliedRead MoreNiche Tourism2488 Words   |  10 PagesThe aim of this essay is to discuss the relevance of niche tourism and what facts may affect it. It discusses briefly what a niche market is and what role has in the tourism industry. Different facts are exposed during the essay in order to give a better understanding on how economy, politic, technology and social affect tourism in general and the construction of niche markets. In addition, other influences have been discussed to give more information on current facts affecting the industry. An interestingRead MoreRelationship Between Age and Learning a Second Language1698 Words   |  7 Pagesthrough experience in the world individuals accrue idiosyncratic aversions and preference, which lead them to like certain things and dislike others. Organisms seem to determine value on the basis of certain criteria. These appraisals assign value to current stimuli based on past encounter. The value mechanisms influence the perceptions, memory, actions, and attentions devoted to learning. In contrast to the prompt advancement of my verbal skills and experience, my mother had a lot of problems teachingRead MoreWater as a Source of Future Conflict in Sa26984 Words   |  108 Pagesallotment are the basic strategic distress over the state relations billion people will be† (Kshatri 2004, 4). 2. The melted snow of the Himalayas plays an important role in Water Resources of South Asia, which are shared by India, Pakistan, Bangladesh, Nepal and Bhutan via several international rivers. South Asia (SA) is facing deficit of; useable water for the existing and future needs, deterioration of water resources, management inefficiencies and development concerns. The infrastructure developmentRead MoreScience and Technology13908 Words   |  56 Pages2009 Award Winning Essays Organized by Supported by T he Goi Peace Foundation U N ESC O Japan Airlines Foreword The International Essay Contest for Young People is one of the peace education programs organized by the Goi Peace Foundation. The annual contest, which started in the year 2000, is a UNESCO/Goi Peace Foundation joint program since 2007. The United Nations has designated 2001-2010 as the International Decade for a Culture of Peace and Non-Violence for the Children ofRead MoreAP Human Geography Religion Notes Essay1830 Words   |  8 Pagesï » ¿Religion Unit Essay Notes 1. Secularism began to arise with the seperation of church and state in Europe. A. Why is this so? (Deblij 207, 222-224) Secularism is the indifference to or rejection of formal religion. The most secular countries today are in Europe. Secularism has become more widespread during the past century due to the rise in democracy. Democratic governments disadvantage the traditional practices of a religion because they offer freedom, whereas other forms of government mayRead MoreEssay about Rise of China and India2237 Words   |  9 Pagestheir way to the top, these two economies are China’s and India’s. The question being answered in this essay is: ‘does the rise of developing countries like China and India pose a serious challenge to US power?’ I believe yes, mainly because for so long the world has revolved around the American economy and with the rise of these two countries America will gradually start to lose its power. This essay will also address both China’s and India’s relatively quick rise to power over the last 25 years. Read MoreImperialism, Imperial Po licies and Global/ Regional Status Quo and Its Development Response After Terrorist Attacks of 9/113668 Words   |  15 Pagesthat stabilized the region since the last general war. Thus status quo is about keeping things the way it is, its motive is to preserve and not necessarily gain, boast or heavily influence any new positions that may break the balance. To apply it in current times and specifically to the new and less known form of war- unconventional terrorist war post 9/11, it has shifted global status quo to a certain degree and definitely shifted regional status quo in areas such as North Africa, the Middle East andRead MoreMr Abdul Moeed5308 Words   |  22 PagesMedia[show] Sport Monuments[show] Symbols[show] Culture portal Pakistan portal v t e This article has multiple issues. Please help improve it or discuss these issues on the talk page. This article is written like a personal reflection or opinion essay rather than an encyclopedic description of the subject. (March 2013) This article may contain original research. (March 2013) This article needs additional citations for verification. (June 2012) The 17th century Badshahi Mosque built by Mughal