Saturday, March 21, 2020

Essay on Anthro EXAM REVIEW

Essay on Anthro EXAM REVIEW Essay on Anthro EXAM REVIEW Exam Review UNIT ONE: Anthropology  ­ studies the origins, beliefs, development, and customs of humans. It interests in earliest forms of human race. Anthropology is divided into three groups: ââ€"  Physical  ­ how humans have adapted ââ€"  Cultural  ­ different societies are compared ââ€"  Social  ­ studies social organization of people Questions anthropologists may ask include: ââ€"  how does the distant evolutionary past affect us today? ââ€"  how are humans different from apes? Fields of study include: ââ€"  culture  ­ is it transmitted from one person to the other? ââ€"  ethnographic studies  ­ cultures change over time ââ€"  myth  ­ cultural values are transmitted from one generation to the next ââ€"  kinship  ­ members of a social group define themselves ââ€"  participant observation  ­ living with people to understand their culture Psychology  ­ studies the behaviour, mental processes, and personality of humans. What motivates individuals to behave in a certain way. There are 4 main fields of psychology: ââ€"  Experimental (conducts experiments on how humans behave) ââ€"  Developmental (how people grow) ââ€"  Social (how behaviour is influenced by groups ââ€"  Applied/Clinical (utilizes training to help people such as social workers, etc) Questions psychologists may ask include: ââ€"  What causes mental illness? ââ€"  Is personality inherited or learned? Fields of study include: ââ€"  Psychoanalysis  ­ inner experiences of the mind. Used on patients who suffer from severe anxieties and tension. ââ€"  Behavioural  ­ analysis principles of behaviour because it is observable, yet it can be studied more objectively than the visible mind. ââ€"  Cognitive  ­ perception, learning, memory, reasoning. studies how people deal with their environment, learn and remember things, make decisions, and examines how values and beliefs play a role in our lives. Sociology  ­ studies the social behaviour and how people interact, how it shapes our world. Areas include: ââ€"  gender roles ââ€"  stereotyping ââ€"  crime rates ââ€"  poverty ââ€"  peer pressure. Questions sociologists may ask include: ââ€"  Is our education system successful? ââ€"  Why are there so many gangs? Fields of study include: ââ€"  Functionalism  ­ society is studied like the human bodyÍ ¾ as each organ in the body performs a function, so does each institution in society. All are protected when all parts work together and do their jobs. ââ€"  Conflict theory  ­ studies social patterns. Produce goods to meet the needs and wants. Groups compete and struggle for resources and power. Social class form  ­ some have power over others ââ€"  Symbolic interactionism  ­ small scale patterns in everyday interactions. Humans have the ability to reason, we make the rules and learn what roles to play based on our audience or society. Hall of Fame (Anthropology) Leakey Family ââ€"  Primates  ­ a member of the mammal group with the most developed brains such as a human, ape, gorilla, etc. ââ€"  Experimented with stone aged tools to discover how our ancestors hunted for food. Jane Goodall ââ€"  worked with the leakey family ââ€"  was forced to work with chimpanzees ââ€"  her research showed what the human kingdom might have been like thousands of years ago. Hall of fame (Psychology) Ivan Pavlov ââ€"  Studied conditioned behaviour ââ€"  unconditioned stimulus (hot food on a cold day) ââ€"  unconditioned response (shivering when cold) ââ€"  conditioned stimulus (sound of a can opener) ââ€"  conditioned response (getting excited before meeting an old friend) Sigmund Freud ââ€"  developed psychoanalysis ââ€"  conscious mind (memories we can recall) ââ€"  unconscious mind (memories that we cannot recall) ââ€"  unconscious mind is more influence on human behaviour ââ€"  free association (when a therapist enters a patient's unconscious mind) ââ€"  ID/Contacts (contains all the primitive parts of our personality) ââ€"  Superego (urges us to do good things) ââ€"  Ego (doing right from wrong) ââ€"  Defense mechanism (mind uses to deal with anxiety) ââ€"  psychiatry (treatment of mental disorders) Hall of fame

Wednesday, March 4, 2020

The Useful Generic List in VB.NET

The Useful Generic List in VB.NET Generics extend the power and flexibility of VB.NET in a lot of areas, but you get a bigger performance benefit and more programming options in the generic List object [List(Of T)] than with any other. To use List(Of T), you have to understand how to implement the many methods that the .NET Framework provides. Below are three examples using ForEach, FindAll, and Sort, that demonstrates how the generic List class works. The very first step is to create a generic List. You can get the data in a lot of ways, but the simplest is to just Add it. The code below shows how to classify my beer and wine collection! Starting Code There first needs to be an object that will represent a bottle from the collection. In a Windows Forms application, the Form class has to first be in a file or the Visual Studio designer wont work correctly, so put this at the end: Public Class Bottle Public Brand As String Public Name As String Public Category As String Public Size As Decimal Public Sub New( _ ByVal m_Brand As String, _ ByVal m_Name As String, _ ByVal m_Category As String, _ ByVal m_Size As Decimal) Brand m_Brand Name m_Name Category m_Category Size m_Size End Sub End Class To build the collection, Add the items. This is whats in the Form Load event: Dim Cabinet As List(Of Bottle) _ New List(Of Bottle) Cabinet.Add(New Bottle( _ Castle Creek, _ Uintah Blanc, _ Wine, 750)) Cabinet.Add(New Bottle( _ Zion Canyon Brewing Company, _ Springdale Amber Ale, _ Beer, 355)) Cabinet.Add(New Bottle( _ Spanish Valley Vineyards, _ Syrah, _ Wine, 750)) Cabinet.Add(New Bottle( _ Wasatch Beers, _ Polygamy Porter, _ Beer, 355)) Cabinet.Add(New Bottle( _ Squatters Beer, _ Provo Girl Pilsner, _ Beer, 355)) All of the above code is standard code in VB.NET 1.0. However, note that by defining your own Bottle object, you get the benefits of multiple types in the same collection (in this case, both String and Decimal) and efficient, type safe late binding. ForEach Example The fun starts when we use the methods. To begin, lets implement the familiar ForEach method. The Microsoft documentation includes this usage syntax definition: Dim instance As List Dim action As Action(Of T) instance.ForEach(action) Microsoft further defines action as delegate to a method that performs an action on the object passed to it. The elements of the current List(T) are individually passed to the Action(T) delegate. Tip: For more on delegates, read Using Delegates in Visual Basic .NET for Runtime Flexibility. The first thing you need to code is the method that will be delegated. Misunderstanding this one key point is the source of most of the confusion of VB.NET students. This function, or subroutine, is where all of the customized coding for the Of type objects is done. When performed correctly, youre essentially done. Its really simple in this first example. An entire instance of the Bottle is passed and the subroutine selects anything needed out of it. Coding the ForEach itself is simple too. Just fill in the address of the delegate using the AddressOf method. Sub displayBottle(ByVal b As Bottle) ResultList.Items.Add( _ b.Brand ) ResultList.Items.Add(-) Cabinet.ForEach(AddressOf displayBottle) End Sub FindAll Example FindAll is a little more complicated. The Microsoft documentation for FindAll looks like this: Dim instance As List Dim match As Predicate(Of T) Dim returnValue As List(Of T) returnValue instance.FindAll(match) This syntax includes a new element, Predicate(Of T). According to Microsoft, this will represent the method that defines a set of criteria and determines whether the specified object meets those criteria. In other words, you can create any code that will find something in the list. I coded my Predicate(Of T) to find anything in the Beer Category. Instead of calling the delegate code for each item in the list, FindAll returns an entire List(T) containing only the matches that result from your Predicate(Of T). Its up to your code to both define this second List(T) and do something with it. My code just adds the items to a ListBox. Private Sub FindAllButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FindAllButton.Click ResultList.Items.Clear() ResultList.Items.Add(FindAll Example) ResultList.Items.Add(-) Dim sublist As List(Of Bottle) sublist Cabinet.FindAll(AddressOf findBeer) For Each r As Bottle In sublist ResultList.Items.Add( _ r.Brand - _ r.Name - _ r.Category - _ r.Size) Next End Sub Function findBeer(ByVal b As Bottle) _ As Boolean If (b.Category Beer) Then Return True Else Return False End If End Function Sort Example The final method this article examines is Sort. Again, Microsoft uses some terminology you might not be familiar with. There are actually four different overloads of the Sort method: Sort()Sort(IComparer(T))Sort(Comparison(T))Sort(Int32, Int32, IComparer(T)) This lets you use sort methods defined in the .NET Framework for the list, code your own, use a system defined comparison for the type, or sort part of the collection using a starting position and count parameter. In this example, since I use the following syntax to actually perform the sort, Im using the third overload. x.Name.x.Name.CompareTo(y.Name)(y.Name) Ive coded another delegate to my own comparer. Since I want to sort by my Name, I pull just that value out of each instance of the Bottle object that is passed and use the Sort(Comparison(Of (T))). The Sort method actually rearranges the original List(T). Thats what is processed after the method is executed. Private Sub SortButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SortButton.Click ResultList.Items.Clear() ResultList.Items.Add(Sort Example) ResultList.Items.Add(-) Cabinet.Sort(AddressOf sortCabinet) For Each r As Bottle In Cabinet ResultList.Items.Add( _ r.Name - _ r.Brand - _ r.Category - _ r.Size) Next End Sub Private Shared Function sortCabinet( _ ByVal x As Bottle, ByVal y As Bottle) As Integer Return x.Name.CompareTo(y.Name) End Function These methods were selected to demonstrate the major ways that the Framework methods in List(T) are actually coded. Theres a whole raft of other methods, however. Thats what makes List(T) so useful!