Featured Post

How To Write An Essay In English

How To Write An Essay In English But college students need professional writing help more frequently. That’s because at this level of e...

Saturday, March 14, 2020

How to Place a Checkbox Into a DBGrid

How to Place a Checkbox Into a DBGrid There are numerous ways and reasons to customize the output of a DBGrid in Delphi. One way is to add checkboxes so that the result is more visually attractive. By default, if you have a boolean field in your dataset, the DBGrid displays them as True or False depending on the value of the data field. However, it looks much better if you choose to use a true checkbox control to enable editing the fields. Create a Sample Application Start a new form in Delphi, and place a TDBGrid, TADOTable, and TADOConnection, TDataSource. Leave all the component names as they are when they were first dropped into the form (DBGrid1, ADOQuery1, AdoTable1, etc.). Use the Object Inspector to set a ConnectionString property of the ADOConnection1 component (TADOConnection) to point to the sample QuickiesContest.mdb MS Access database. Connect DBGrid1 to DataSource1, DataSource1 to ADOTable1, and finally ADOTable1 to ADOConnection1. The ADOTable1 TableName property should point to the Articles table (to make the DBGrid display the records of the Articles table). If you have set all the properties correctly, when you run the application (given that the Active property of the ADOTable1 component is True) you should see, by default, the DBGrid display the boolean fields value as True or False depending on the value of the data field. CheckBox in a DBGrid To show a checkbox inside a cell of a DBGrid, well need to make one available for us at run time. Select the Data controls page on the Component Palette and pick a TDBCheckbox. Drop one anywhere on the form - it doesnt matter where, since most of the time it will be invisible or floating over the grid. Tip: TDBCheckBox is a data-aware control that allows the user to select or deselect a single value, which is appropriate for boolean fields. Next, set its Visible property to False. Change the Color property of DBCheckBox1 to the same color as the DBGrid (so it blends in with the DBGrid) and remove the Caption. Most importantly, make sure the DBCheckBox1 is connected to the DataSource1 and to the correct field. Note that all the above DBCheckBox1s property values can be set in the forms OnCreate event like this: procedure TForm1.FormCreate(Sender: TObject);begin DBCheckBox1.DataSource : DataSource1; DBCheckBox1.DataField : Winner; DBCheckBox1.Visible : False; DBCheckBox1.Color : DBGrid1.Color; DBCheckBox1.Caption : ; //explained later in the article DBCheckBox1.ValueChecked : Yes a Winner!; DBCheckBox1.ValueUnChecked : Not this time.; end; What comes next is the most interesting part. While editing the boolean field in the DBGrid, we need to make sure the DBCheckBox1 is placed above (floating) the cell in the DBGrid displaying the boolean field. For the rest of the (non-focused) cells carrying the boolean fields (in the Winner column), we need to provide some graphical representation of the boolean value (True/False). This means you need at least two images for drawing: one for the checked state (True value) and one for the unchecked state (False value). The easiest way to accomplish this is to use the Windows API DrawFrameControl function to draw directly on the DBGrids canvas. Heres the code in the DBGrids OnDrawColumnCell event handler that occurs when the grid needs to paint a cell. procedure TForm1.DBGrid1DrawColumnCell( Sender: TObject; const Rect: TRect; DataCol: Integer; Column: TColumn; State: TGridDrawState); const IsChecked : array[Boolean] of Integer (DFCS_BUTTONCHECK, DFCS_BUTTONCHECK or DFCS_CHECKED);var DrawState: Integer; DrawRect: TRect;beginif (gdFocused in State) thenbeginif (Column.Field.FieldName DBCheckBox1.DataField) thenbegin DBCheckBox1.Left : Rect.Left DBGrid1.Left 2; DBCheckBox1.Top : Rect.Top DBGrid1.top 2; DBCheckBox1.Width : Rect.Right - Rect.Left; DBCheckBox1.Height : Rect.Bottom - Rect.Top; DBCheckBox1.Visible : True; endendelsebeginif (Column.Field.FieldName DBCheckBox1.DataField) thenbegin DrawRect:Rect; InflateRect(DrawRect,-1,-1); DrawState : ISChecked[Column.Field.AsBoolean]; DBGrid1.Canvas.FillRect(Rect); DrawFrameControl(DBGrid1.Canvas.Handle, DrawRect, DFC_BUTTON, DrawState); end; end; end; To finish this step, we need to make sure DBCheckBox1 is invisible when we leave the cell: procedure TForm1.DBGrid1ColExit(Sender: TObject);beginif DBGrid1.SelectedField.FieldName DBCheckBox1.DataField then DBCheckBox1.Visible : Falseend; We need just two more events to handle. Note that when in editing mode, all keystrokes are going to the DBGrids cell, we have to make sure they are sent to the CheckBox. In the case of a CheckBox we are primarily interested in the [Tab] and the [Space] key. [Tab] should move the input focus to the next cell, and [Space] should toggle the state of the CheckBox. procedure TForm1.DBGrid1KeyPress(Sender: TObject; var Key: Char);beginif (key Chr(9)) then Exit; if (DBGrid1.SelectedField.FieldName DBCheckBox1.DataField) thenbegin DBCheckBox1.SetFocus; SendMessage(DBCheckBox1.Handle, WM_Char, word(Key), 0); end;end; It could be appropriate for the Caption of the checkbox to change as the user checks or unchecks the box. Note that the DBCheckBox has two properties (ValueChecked and ValueUnChecked) used to specify the field value represented by the checkbox when it is checked or unchecked. This ValueChecked property holds Yes, a Winner!, and ValueUnChecked equals Not this time. procedure TForm1.DBCheckBox1Click(Sender: TObject);beginif DBCheckBox1.Checked then DBCheckBox1.Caption : DBCheckBox1.ValueChecked else DBCheckBox1.Caption : DBCheckBox1.ValueUnChecked;end; Run the project and youll see the checkboxes all over the Winner fields column.

Thursday, February 27, 2020

I just need the bibliography to be done Essay Example | Topics and Well Written Essays - 500 words

I just need the bibliography to be done - Essay Example 2006. africaresource. 17 Dec. 2007 . 8. Kiehl, Stephen. â€Å"Cashing in on the pop and hip-hop name-drop†. Baltimore Sun. 2004. Commercial Alert. 17 Dec. 2007 . 9. Mattus, Carolyn. â€Å"Hip-hops evolution, success examined†. THE HEIGHTS. 2005. BCHEIGHTS.com. 17 Dec. 2007 . 11. Silverstien, Matt. â€Å"Concerning Hip-Hop: A Repressive Agent or Vehicle for Activism?† Commercial Hip-Hop and Social Grassroots. 2006. africaresource. 17 Dec. 2007 . 14. â€Å"Since 1994, violent crime rates have declined, reaching the lowest level ever in 2005†. Bureau of Justice Statistics. 2006. Office of Justice Programs. U.S. Department of Justice. 17 Dec. 2007 . 16. Howard, Theresa. â€Å"Rapper 50 Cent sings a song of business success†. Advertising & Marketing. 2005. USA TODAY. 17 Dec. 2007 . 21. Ogunnaike, Lola. â€Å"Jay-Z, From Superstar to Suit†. The New York Times. 2005. NYTimes.com. 17 Dec. 2007 . 24. Wasserman, Todd. â€Å"Playing The Hip-Hop Name Drop†. Brandweek. 2005. ISIDE BRANDED ENTERTAINMENT. 17 Dec. 2007

Tuesday, February 11, 2020

Freuds Ideas Remain Influential Even When They Seem Implausible Essay

Freuds Ideas Remain Influential Even When They Seem Implausible - Essay Example According to Freud, the ego comes about during the infancy stage of human development and the goal of this aspect of mental development is to find satisfaction for the desires of the id but in a manner which is safe (Freud, 2010). While the id is mostly dominated by the instincts of the individual, the ego is dominated by reality and despite the fact that it works towards the fulfilment of the desires of the id, the ego can be said to be based on the control of these desires so that they do not get out of hand. The ego, therefore, functions not only in the unconscious level but also in the conscious level and this ensures that there is a balance between the two. The superego, on the other hand, develops during early childhood when the child comes to identify with the parent of the same sex, and this parent becomes the compass for the child’s moral development. It is the superego which is responsible for the development and upholding of moral values among individuals as a means of ensuring that they behave in a manner which is in accordance with the values and norms of the society. Moreover, it is responsible for the feelings of guilt which afflict individuals when they commit acts which go against the values of the society (Freud, 2013), and this enables them to correct their mistakes. According to Freud, there comes a time when there are conflicts between the id and the superego and when this occurs, it is normally the role of the ego to act as a mediator and to decide the best course of action that can be undertaken to solve the conflict. It is because of this that in some cases, the ego puts in place defence mechanisms which are designed to ensure that it is not overwhelmed by anxiety and this enables it to make the right decision about what to do.  It has been declared that the theories brought forth by Freud, while very good at providing explanations for behaviour, are not quite good at making predictions for the possible occurrence of such behavi our. It is for this reason that there has arisen a belief that Freud’s theories are not scientific because they can neither be proven false nor true. An example of such a scenario is the determination of what takes place in the unconscious mind because of the fact that this is something which cannot be tested or measured in an objective manner (Levin, 2010). It is because of this that it is believed that the theories propagated by Freud are neither scientific nor do they have objectivity. Because of the relatively few samples that he used, it has been declared that Freud’s studies and results were unrepresentative of the general population since he mainly made studies of himself, his patients and only one child. Since most of the studies consisted of his patients, mostly women of middle age.  

Friday, January 31, 2020

Analyse the way Beatrice and Benedick Essay Example for Free

Analyse the way Beatrice and Benedick Essay The characters Beatrice and Benedick in the William Shakespeare play â€Å"Much Ado About Nothing† can be described as sparring lovers. At the start of the play, it is difficult for them to converse without becoming involved in a â€Å"merry war† or a â€Å"skirmish of wit†. This attitude gradually changes as the play progresses. I shall analyse the way in which this attitude changes as Beatrice and Benedick engage in parlance. From Act One, Scene One, Beatrice demonstrates hypocrisy when to Benedick she says â€Å"I wonder that you will still be talking, Signor Benedick, nobody marks you†. The ironic part of this is that she is actually listening to him. Therefore, as much as she may like to deny it, she is giving the man she â€Å"detests† her undivided attention, and is noticing him. Benedick, in a quick flash of wit answers back â€Å"What, my dear Lady Disdain! Are you yet living? † As Benedick asks Beatrice if she is living, it presents the witty assumption that Benedick has not been aware of Beatrice’s presence. A very well-put reply to this from Beatrice is that â€Å"Disdain† can’t die whilst Benedick is there â€Å"feeding† it to carry on. This battle of wit which occurs between the both of them illustrates the deep loathing that they appear to have for one another. As we shall discover further on in the play, this seems only to be a guise for the immense passion they have for each other. There is, here, however, a suggestion from Beatrice that both of them have had a relationship before: â€Å"You always end with a jade’s trick. I know you of old†. The aforementioned evidence of a possible relationship provides a reason for the skirmish of wit, and also implies there may still be romantic feelings between the two. In Act Two, Scene One, Beatrice is dancing and having a conversation with a masked Benedick. It is not clear, and remains the decision of the reader whether Beatrice truly knows that she is speaking with Benedick. She goes on to describe him as â€Å"the prince’s jester, a very dull fool†. As there is a sense of possession â€Å"the prince’s jester†, it creates the impression that Beatrice sees Benedick as nothing more than a puppet. When speaking with Claudio, Benedick makes it clear he was shocked by this: â€Å"Lady Beatrice should know me, and not know me: the prince’s fool! Hah†¦Ã¢â‚¬  †¦ â€Å"Every word stabs†. Here, Shakespeare has used a dramatic device, ie: the masqued ball, and the inherent identity confusion to make Benedick believe that Beatrice had all along intended to speak ill of him. It is for this reason that I believe that Beatrice knew full well that she was indeed speaking to Benedick. In Act Two, Scene Three, Benedick is successful tricked into thinking that Beatrice is in love with him. However, this trick has not yet been carried out on Beatrice. In the garden, Beatrice approaches Benedick and announces â€Å"I do spy some marks of love in her†. This is ironic because there are none. The passion she shows is one of hate for what she is about to say: â€Å"Against my will I am sent to bid you come in to dinner†. When asked by Benedick if she â€Å"takes pleasure in the message†, she says â€Å"Yea, just so much as you may take upon a knife’s point† (ie: not at all). Benedick has got completely the wrong end of the stick in his soliloquy: â€Å"there’s a double meaning in that†, and thinks that she does not want him to come in, but instead to stay out in the garden with her. Hence, his going inside would not be a pleasurable message for her. However, this is an example of dramatic irony as we know this is not the case at all. Shakespeare points out the truth beneath the characters surface, as well as using language as his tool to juxtapose these feelings, in effect, switching the meaning around so that the connotations are what illuminate the truth. He is also able to use a technique to capture the truth beneath the surface of the characters. Everything that is spoken by the characters seems to have a deeper or double meaning under the words. In Act Four, Scene One, Benedick declares his love for Beatrice. He does this so she will call upon him to right Hero from the terrible injustice that recently occurred at the wedding scene. He asks her if it seems strange that he loves her. This is again an example of dramatic irony, because the audience knows that it’s not strange – she knows already that he loves her. Beatrice, usually extremely able to articulate herself is strangely not able to here. The use of commas and colons break up the following speech, as she is overcome by fierce emotions. She is therefore not able to articulate anything but the fact that she feels sorry for her poor cousin who has been wronged. â€Å"It were as possible for me to say, I loved nothing so well as you, but believe me not, and yet I lie not, I confess nothing, nor I deny nothing. † Beatrice, therefore equivocates here being deliberately ambiguous or unclear in order to mislead or withhold information, ie: her love for Benedick. This is particularly emphasised by the long sentence length. Benedick’s immediate rejection at the idea of killing Claudio â€Å"Not for the wide world! † elicits anger, and impatience in Beatrice who doesn’t wish to converse with Benedick any longer. After much deliberation, knowing it will please Beatrice, Benedick agrees to â€Å"use† his hand â€Å"in some other way than swearing by it†. In other words, he has agreed to engage Claudio in a duel. Beatrice’s reason for wanting him killed is that â€Å"he is now as valiant as Hercules†. This allusion to Hercules implies that Claudio has become too boastful, too big for his boots. In conclusion, it’s clear to see how the attitude between the two changes, and the relationship progresses. Shakespeare employs the use of juxtaposition to mask true feelings. The best illustration of this juxtaposition masking is of the relationship between Beatrice and Benedick. Their incessant banter and wit-battles mask the true feelings each has for the other.

Wednesday, January 22, 2020

The Art of Hospitality - The Greeks and the Odyssey Essay -- essays re

Each culture treats strangers and guests with distinct differences from every other culture. One of the most hospitable cultures was that of the ancient Greeks, exemplified in Homer’s The Odyssey by both gracious hosts and guests. In Greece and The Odyssey, not only was good hospitality etiquette expected, but the added pressure from the conviction that the gods would punish the host if guests were treated without respect (whether they were poor or rich) further compelled excellent manners. The Odyssey illustrates the proper etiquette when dealing with guests.   Ã‚  Ã‚  Ã‚  Ã‚  Whether friend or stranger, when a guest of any sort arrived the host would greet them and offer them food and drink before any further conversation or engagement of any kind would occur. If the host had considerable wealth, a maid would bring out a basin of water in a â€Å"graceful golden pitcher† to rinse their hands, seen in Book I (line 160) when Athena visits Telemachus, again in Book 4 (60) when Menelaus takes Telemachus and Athena as guests, and also in Book 7 when the King of the Phaeacians greets Odysseus. Appetizers, meats, and wines are all brought out and laid before the guest, as their coming is seen as a celebration, as seen when Telemachus is hosting Athena, â€Å"A staid housekeeper brought on bread to serve them,/appetizers aplenty too, lavishwith her bounty./A carver lifted platters of meat toward them,/meats of every sort†¦Ã¢â‚¬  (Book 1, 163-166) On several occasions, a particularly h...

Tuesday, January 14, 2020

Philosophy- Rationalism and Empiricism Essay

Immanuel Kant found the way to put subjective and objective perspectives together as part of the human transcendental structure. The idea of subjective truth comes from Rene Descartes and his vision on rationalism based on innate ideas that allow people to appreciate what they see in order to reach a conclusion. Secondly, we have John Locke’s idea of objective truth based on a blank state of mind and a phenomenon that allows people to appreciate their reality by relying on experiences with any object, human, place or something else. Descartes and Locke rejected the possibility of bringing these two elements together for a better understanding. Since both focused on what people see through their eyes and their mind process, without considering the importance of the physical nature, Kant argued that they both should work together in order to understand the physical nature of different things. Kant focused on the conscious mental state which explains the importance of both of these elements together. Thomas Nagel highlighted Kant’s perspective and argued that subjective phenomenon’s are linked to single points of view that the objective theory will never be able to abandon. If a person separates them from each other there will be no idea of how something could be true. Since we live in a society with different perspectives, truth is what everyone looks for in order to draw their own conclusions. Nagel argued that having personal experience is enough to have the necessary material for imagination. For example, Nagel offered a metaphor about a bat, in which he suggest the use of imagination to ask ourselves what would be like for us to behave as the bat behaves. It’s clear that Nagel relies on Aristotle’s vision of reality because his realism on subjectivity creates a belief in the existence of facts over the concepts that we create as humans. Although there are facts that people will never comprehend, there is a possibility that through a combination of both people can find the truth of things that they can’t understand. According to Nagel, there is no difference between mental and physical events because there are experiences in which people process things to reach a conclusion. People have the ability to perceive and behave and they both come along together. On the other side, Donald Davidson argued that mental events have physical causes and that we have reason to believe this even though people don’t know if there is a general psychophysical theory. But, what about non-intentional events? Nagel argued that his argument only applies to intentional mental events without considering that as humans have reasons to believe that sensations are physical processes as well. Physical processes don’t have the necessity to look for answers of how something happened. Finally, Kant’s theory argues that our experiences are significant since they can’t be the same because people’s different states of mind, but as human beings it’s important to be subjective to appreciate different phenomenon’s around them. Kant’s made these two perspectives dependent from each other, without leaving any gap in which they both could separate by any chance.

Monday, January 6, 2020

The Theory Of The Victim Mentality Essay - 1602 Words

The victim mentality is an acquired personality characteristic where a person blames others for the challenges in their life, even without clear evidence of such situations. This attitude leads to lack of diversity of ideas by the victims to solve problems or change the situation they are in as they believe it is not their fault and therefore they can do nothing about it. Philosophy helps study the fundamental problems concerning such matters as the reason, language, and issues to resolve such personalities. Through Epistemology, it is easier to understand the nature of knowledge, the belief, and justification of the victims. According to Bertrand Russell, it is through self-examination that people are able to distinguish trustworthy beliefs from untrustworthy or discriminative beliefs. I’ve come to understand that this is an essential part of philosophy to help people who are led to beliefs through invalid inductions. Nothing holds someone back more than seeing themselves as victims; they find little or no chance of improving their lives which make them unhappy, frustrated and angry. Many African Americans believe that they don’t have any role to play in order to improve their life and are angry for not achieving their desired success both educationally and socioeconomically; instead, with the victim mentality, they believe that a strong leader is their only hope which will drastically improve the lives of all black communities and alleviate their educational and social,Show MoreRelatedThe Science of Criminology: Understanding the Mind of a Killer1108 Words   |  5 Pagesprominent members of this theory were Cesare Beccaria and Jeremy Bentham† (Crimetheory.com). Beccaria was known as law reformer; transforming the criminal justice system in Euro and indirectly brought it into the United States and rest of the world. On the other end Jeremy Bentham supported Beccaria and shared ideas and common theories about criminology and criminal behaviors, where both agreed that criminal conducts could be understood and well controlled. The classical school theory of criminology basicallyRead MoreThe Second Rape Essay1024 Words   |  5 Pagesrapists tend to blame the victim. There are several factors in which rape victims are being held responsible for the crime and not the rapist. Rape is a crime of sexual violence that can cause â€Å"long-term emotional devastation† in a victim although some victims may respond to it differently (Williams, 16). Victims of this act can also face physical injuries: â€Å"the National Womens Study, funded by the National Institute of Drug Abuse, found that more than 70% of rape victims did not report any physicalRead MoreBehavior, Lack Of Self Control And Behavior982 Words   |  4 Pagesimpulsiveness. According to Gottfredson and Hirschi’s general theory of crime these two traits contribute criminal and delinquent behaviors. It is through risky behaviors that expose a person to a criminal environment. A person more likely to commit a crime or engage in deviant activity will find themselves in areas that promote that type of behavior, therefore making it more likely a person will be in or be victim to a crime. In theory, even a person who possesses the traits predisposing a personRead MoreWhat Are Five Element s Necessary For Commit Fraud?1739 Words   |  7 Pagespossesses the knowledge that the statement is untrue, (3) the false statement’s intent is to deceive the intended victim, (4) the intended victim justifiably relies on the statement, and (5) the ending result is financial injuries to the intended victim. All false statements do not constitute for fraud; they need to contain a material fact. The materiality of the statement induces the intended victim to agree to something with the defendant. Statements of belief (puffing) are not considered fraudulent sinceRead MoreWhite Collar Crime And Criminal Behavior1534 Words   |  7 PagesThroughout history, many academics have proposed various theories to help comprehend and explain criminal behaviours. These theories investigate many different aspects of the causations of crime and those at risk of criminal behaviour. White collar crime is a term founded less than a century ago within 1939 by Edwin Sutherland. He identified wh ite collar crime as crime committed by a person of respectability and high social status in the course of his occupation (Hirschi, 1987, pg 953). SutherlandRead MoreCriminal Law And Its Effect On Society951 Words   |  4 Pagestraits carry on as adults. Also males typically have more freedom growing up compare to girls who are more supervised. The increase of female in crime rate is that officers are more willing to arrest females compare to older times. The Liberal feminist theory is the social and political role in women’s society is a factor in their crime rates. The masculinity role in to the crime rate in women the ones who commit crime are not typical they must have a characteristics that makes them male like by physicalRead MoreThe American Dream1504 Words   |  7 Pages 10/18/2012 Ruzich amp; Grant develop a theory around predatory lending and the American Dream that states that â€Å"the use of the metaphor predatory lending has allowed the complex story of the subprime mortgage crisis to be reduced to a simple and dramatic narrative† (Ruzich amp; Grant). They develop that theory in the conclusion of their article Predatory Lending and the Devouring of the American Dream by discussing how theRead MoreThe Public ´s Perceptions of Victims and criminals 895 Words   |  4 PagesAmerica’s Most Wanted have been instrumental for the victims’ rights movement here in America. â€Å"America’s Most Wanted has become one of the most important programs on television, having played a major role in the capture of more than 1,100 fugitives in the U.S. and 30 countries, including 17 on the FBI’s Ten Most Wanted List, rescue of 61 children and Missing persons since its launch in 1988† (Welch, 2013). The host of the show John W alsh was a victim in his own right when his son Adam was taken fromRead MoreHotel Rwanda vs. Erin Brockovich1660 Words   |  7 Pagesthe Hutu feel that they must gain power in order to better their lives. The only way they can do this is to commit a mass genocide against the Tutsi tribes. This event can be seen as a result of Robert Merton’s Anomie theory, or sometimes called strain theory. Merton’s theory â€Å"holds that crime increases – as do other forms of deviance – when the social structure prevents people from achieving culturally defined goals (e.g. Hutu bettering their lives) through legitimate means (e.g. an election)Read MoreThe Problem Of Human Trafficking1439 Words   |  6 Pagesconsequences for society as placing such a hard emphasis on currency allows for an environment that makes it much easier for one to disassociate and place a value on human life. Not to mention the serious trauma and various side effects suffered by the victim s of human trafficking which can range anywhere from headaches and memory problems to anxiety, depression, and even suicide (Mohsen, 2016). If this social problem is not addressed, it will only continue to grow and become even more unmanageable. 2