Saturday, March 21, 2020

Djibouti essays

Djibouti essays Djibouti is a small country in the northeastern part of Africa. The country got its name for its one and only big city, Djibouti. According to Encarta Djibouti was and area where, many years ago (100,000), people begin to migrate over to the Middle East. Anyway, Encarta goes on about some kingdoms and how Islam was introduced to the country and eventually it gets to something relevant to this class... It says that in the second half of the 16th century Europeans begin trading coffee and perfumes with the sultanates of Djibouti. France wanted to challenge Britain with trading so they made a bunch of treaties with some rulers of Djibouti and basically got control of the country. This seems pretty simple, but this is the way Encarta says it happened. Anyway France chose Djibouti, as in the city, because it would be a good place to have a railroad, it would link with Addis Ababa. By 1917 France had made the railroad. Large amounts of people began to migrate to In 1946 France made Djibouti its own and called it French Somaliland. Djiboutians voted to remain under French administration, ten years later, however, Djiboutians voted for independence. The Republic of Djibouti achieved full independence on June 27, 1977. Djibouti has an area of 23,200 sq km (8,960 sq mi). It extends 190 km (120 mi) from north to south and 225 km (140 mi) from east to west. The country's highest point, Moussa Ali (2,063 m/6,768 ft), is on the northern border, just where Ethiopian and Eritrean boundaries meet. Lake 'Asal is the lowest point in Africa at 153 m (502 ft) below sea level. According to Encarta Djibouti has potential for generating geothermal energy and producing various minerals like gypsum. Most of the country is ...

Thursday, March 5, 2020

Using the ToString Method in Visual Basic .NET

Using the ToString Method in Visual Basic .NET The ToString method is one of the fundamental methods in the root of the entire .NET Framework. That makes it available in every other object. But, since its overridden in most objects, the implementation is often very different in different objects. And that makes a number of tricks with ToString possible. Displaying the Bits in a Number If you have a series of bits in, for example, a Char variable, this tip shows you how to display them as 1s and 0s (the binary equivalent). Suppose you have ... Dim MyChar As Char a character selected at random just to get a series of eight bits MyChar $ The easiest way I know of is to use the ToString method of the Convert class. For example: Console.WriteLine(Convert.ToString(Convert.ToInt16(MyChar), 2)) This gives you ... 100100 ... in the Output window. There are 36 overridden methods of the ToString method in the Convert class alone. Click Here to display the illustrationClick the Back button on your browser to return In this case, the ToString method does a radix conversion based on the value of the second parameter which can be 2 (binary), 8 (octal), 10 (decimal) or 16 (hexadecimal). Formatting Strings With the ToString Method Heres how to use ToString to format a date: Dim theDate As Date #12/25/2005# TextBox1.Text theDate.ToString(MMMM d, yyyy) And adding culture information is easy! Suppose you want to display the date from a structure in, say, Spain. Just add a CultureInfo object. Dim MyCulture As _   Ã‚  Ã‚  New System.Globalization.CultureInfo(es-ES) CultureDateEcho.Text _   Ã‚  Ã‚  theDate.ToString(MMMM d, yyyy, MyCulture) The result is: diciembre 25, 2005 The culture code is a property of the MyCulture object. The CultureInfo object is an example of a provider. The constant es-ES isnt being passed as a parameter; an instance of the CultureInfo object is. Search the VB.NET Help system for CultureInfo to see the list of supported cultures.