Friday, March 20, 2020

The Environmental Change and the Collapse of Easter Island Essay Example

The Environmental Change and the Collapse of Easter Island Essay Example The Environmental Change and the Collapse of Easter Island Paper The Environmental Change and the Collapse of Easter Island Paper these factors cannot have played an important role in the collapse of the island. Although in the book is mentioned that the Easter Islanders sometimes had visitors, these visits were not regularly enough to be considered as a big influence. The last, and probably most important, factor is how society deals with the environment. As discussed above in the damage section, the inhabitants cut down many trees for several reasons and they destroyed different animal populations. But the political, social and religious factors behind the impacts are also of importance. The Easter Island Was divided into a dozen of territories were chiefs and there commoners lived. Every territory had their task, based on their valuable resource. Between the territories was a constant competition of building the most impressive platforms and statues. Building hose statues took them not only much effort, but it also required trees for wood, rope and timber. This contributed to the deforestation of the Easter Island. Unusual was, that although the territories competed with each other, they were integrated religiously and also economically and politically. The chiefs and priests on the island had promised to deliver beautiful harvest. Once the environmental situation on the island got worse and all the food was gone, the inhabitants of the island turned to the only food left: humans. But, not only the political system was destroyed, along with the chiefs power he religion got discarded. Based on the text above we formulated the following research question: How did the environmental changes cause the collapsing of Easter Island? To begin with, we will discuss the actions of the actors on micro level and the outcomes on the macro level. The people on Easter Island needed wood for heating, cremating bodies, gardening and for building and transporting the famous Easter statues. Therefore they used the resources on the island. But, because the island had to deal with lots of bad biological conditions, there was no reproducing of trees and animals. The deforestation led to biological changes, which caused the crop yields being decreased. When the forest on the island slowly disappeared, so did the sources of wild food. The most animal species on the island, in the air, and in the water surrounding it, became completely extinct due to a combination of overheating, deforestation, and predation by rats. After this environmental change, the inhabitants did not have enough resources left and because of the bad conditions they looked for alternatives like cannibalism. The cannibalism in combination with the lack of wood and food caused the decreasing of the population and the collapse of Easter Island. Coming back to our research question, we can state that the environmental change at Easter Island was mainly due to the behavior of the actors and not immediately caused by the initial conditions. The initial condition was the prosper of the island. There were enough resources for everyone, which allowed the statues to be made. People of the island were used to a high standard of life which meant they used a lot of resources and reproduced themselves, which allowed the population to grow. However, the people did tot consider the fact that the island was not able to reproduce enough resources.

Wednesday, March 4, 2020

Set CheckBox.Checked Without the OnClick Event

Set CheckBox.Checked Without the OnClick Event The TCheckBox Delphi control displays a checkbox that can be on (checked) or off (unchecked). The Checked property specifies whether the checkbox is checked or not. When the user clicks the checkbox to change its Checked state, the OnClick event for the checkbox is fired. Changing the Checkbox's Checked Property Since there is no OnCheckedChanged event, you will probably handle the program logic dependent on the checked state of the checkbox in its OnClick event. However, if you programmatically change the Checked property, the OnClick event will be fired even though no user interaction took place. There are (at least) two ways to programmatically change the checked property of the checkbox while disabling the OnClick event. Remove OnClick Handler, Change Checked, Put Back the Original OnClick handler In Delphi for Win32, an event can have only one event handler (procedure) attached to it (even though there is a way to mimic multicast events in Delphi for Win32). The OnClick events signature of a TCheckBox control is type TNotifyEvent procedure(Sender: TObject) of object; If you assign NIL to the OnClick event before you change the state of the checkbox, then revert to the original OnClick event handling procedure - the OnClick event will not be fired. procedure SetCheckedState(const checkBox : TCheckBox; const check : boolean) ;var   Ã‚  onClickHandler : TNotifyEvent; begin   Ã‚  with checkBox do   Ã‚  begin   Ã‚  Ã‚  Ã‚  onClickHandler : OnClick;   Ã‚  Ã‚  Ã‚  OnClick : nil;  Ã‚  Ã‚  Ã‚  Checked : check;  Ã‚  Ã‚  Ã‚  OnClick : onClickHandler;  Ã‚  end;end; Usage of this procedure is simple:   //toggle Checked statebegin   Ã‚  SetCheckedState(CheckBox1, NOT CheckBox1.Checked) ; end; The SetCheckedState above toggles the Checked property of the CheckBox1 check box. Protected Hack: ClicksDisabled:= true Another way to stop the OnClick from executing, when you programmatically change the Checked property of a checkbox, is to take advantage of the hidden (protected) ClicksDisabled property. By looking at the TCheckBoxs SetState procedure which gets executed whenever the Checked property changes, the OnClick is fired if ClicksDisabled is not true. Since ClicksDisabled is protected you cannot access it from your code. Luckily, the protected hack technique enables you to access those hidden/protected properties of a Delphi control. The accessing protected members of a component provides more info on the subject. What you need to do is to declare a simple dummy class extending the TCheckBox in the same unit where you will use the ClicksDisabled property. Once you get your hands on the ClicksDisabled, simply set it to true, change the Checked property, then set ClicksDisabled back to false (default value): type TCheckBoxEx class(TCheckBox) ; ... with TCheckBoxEx(CheckBox1) dobegin   Ã‚  ClicksDisabled : true;   Ã‚  Checked : NOT Checked;   Ã‚  ClicksDisabled : false; end; Note: the above code toggles the Checked property of the checkbox named CheckBox1 using the protected ClicksDisabled property. Building Applications with Delphi Beginners Guide to Delphi Database Programming​​​​Integrating Basic Charts into Delphi ApplicationsHow to Move and Resize Controls at Run Time​Multithreaded Delphi Database Queries