Sunday, March 20, 2011

The Principle of Thermostat

A thermostat is an appliance that regulates the temperature of a system so that the temperature of that system is kept at a particular desired temperature. This desired temperature is described as the 'set point' temperature. The thermostat operates by turning heating devices on or off, to maintain the temperature of a fluid at the set point temperature. The 'main' thermostat refers to the thermostat in a heating system that possesses only one thermostat.

Technological Sensor Methods

  • One of the key principles of a main thermostat, and indeed any thermostat, is the technological method by which the thermostat senses the ambient temperature. There are two main techniques by which thermostats can sense their surrounding temperature. These are bimetallic sensors and electronic thermistors. Bimetallic sensors use a strip of two metals joined together that have slightly different expansion rates in response to heat, this results in a bending of the bimetallic strip that can be used to break an electrical circuit at high enough temperatures. Electronic thermistors are an electronic component that increases its electrical resistance with increasing temperature, and as such can be used to break a circuit when a particular temperature is reached.

Feedback

  • Thermostats are based on the principle of feedback. The thermistor controls the output of a heating system. The heating system heats a fluid. When the fluid reaches a certain temperature it triggers the thermostat to reduce the heat output, usually by simply switching off the heating system. When the heating system is switched off the temperature of the fluid falls until the thermistor reactivates the heating system. This type of control system is called 'negative feedback' and is a key principle in the design of the main thermostat in many central heating systems.

Digital or Analogue

  • Another key principle of main thermostats is whether they are digital or analogue. This key principle of main thermostats is based around the idea that some thermostats work simply by turning a heating system on or off when a particular temperature is reached or constantly adjusting the heat output of the heating system across a range of possible outputs. The former are digital thermostats and the latter are analogue thermostats.

Location

  • A key principle of the main thermostat, when that thermostat is controlling a central heating system in your house, is its location in your house. If a main thermostat is poorly located it can lead to high levels of energy inefficiency and poor heating patterns. In a small house a sensible place for the location of a main thermostat is on the staircase or upstairs landing.

World's deadliest disasters ( You will get shocked if you will see )

Tsunami
a_small_boat_gets_stuck_in_a_tsunami_whirlpool
A small boat gets stuck in a tsunami whirlpool.tsunami_ploughed_into_tragic_miyako_city_japan
Tsunami ploughed into tragic Miyako city, Japan waves_of_tsunami_topple_trees
Waves of tsunami topple trees
houses_swallowed_by_tsunami
Houses swallowed by the tsunami burn in Sendai, Miyagi

houses_swept_by_a_tsunami
Houses swept by a tsunami

tsunami_hits_airport_in_sendai_japan
Tsunami hits airport in Sendai, Japan

Earthquake
fractured_road_in_japan
Fractured road, Japan

twisted_railroad_japan
Twisted railroad, Japan

collapsed_bridge_guatemala
Collapsed bridge, Guatemala

a_rupture_forms_in_road_after_an_earthquake
A rupture forms in road after an earthquake

a_massive_earthquake_struck_southwest_china
A massive earthquake struck southwest China

san_andreas_fault_california
San Andreas Fault, California

Wildfire
san_diego_wildfires
San Diego wildfires

boise_forest_fire
Boise forest fire

wildfires_force_evacuations_in_la
Wildfires force evacuations in L.A.

idaho_fire
Idaho fire

Volcano
three_volcanoes_mount_semeru_mount_bromo_and_mount_batok_in_indonesia
Three volcanoes – Mount Semeru, Mount Bromo and Mount Batok in Indonesia

mount_etna_in_italy
Mount Etna, Italy

volcanic_lightning
Volcanic lightning

two_eruptions
Two eruptions

ash_cloud
Ash cloud

Tornado
a_mother_ship_cloud_formation_hovers_over_childress_texas
A mother ship cloud formation hovers over Childress, Texas

violent_tornado_in_northeastern_iowa
Violent tornado in northeastern Iowa

water_spout
Waterspout

curved_tornado
Curved tornado

south_dakota_tornado
South Dakota tornado

big_tornado
Big tornado

Lightning
city_strike
City strike

bolts_on_the_water
Bolts on the water

cn_tower_canada
CN tower, Canada

lightning_over_miami
Lightning over Miami

lightning_at_night_walton_nebraska
Lightning at night, Walton, Nebraska

Other Natural Disasters
hurricane_ivan
Hurricane Ivan

hurricane_winds
Hurricane winds

avalanche_in_mt_rainier_national_park_in_washington
Avalanche in Mt. Rainier National Park in Washington

rock_mountain_avalanche
Rock mountain avalanche

a_sandstorm_engulfs_the_saudi_capital
A sandstorm engulfs the Saudi capital



sandstorm_strikes_israel
Sandstorm strikes Israel

How to create a stored procedure(SQL Server Management Studio)

This topic describes how to create a Transact-SQL stored procedure by using Object Explorer in SQL Server Management Studio and provides an example that creates a simple stored procedure in the AdventureWorks2008R2 database.

To create a stored procedure

  1. In Object Explorer, connect to an instance of Database Engine and then expand that instance.
  2. Expand Databases, expand the database in which the stored procedure belongs, and then expand Programmability.
  3. Right-click Stored Procedures, and then click New Stored Procedure.
  4. On the Query menu, click Specify Values for Template Parameters.
  5. In the Specify Values for Template Parameters dialog box, the Value column contains suggested values for the parameters. Accept the values or replace them with new values, and then click OK.
  6. In the query editor, replace the SELECT statement with the statements for your procedure.
  7. To test the syntax, on the Query menu, click Parse.
  8. To create the stored procedure, on the Query menu, click Execute.
  9. To save the script, on the File menu, click Save. Accept the file name or replace it with a new name, and then click Save.

    To create a stored procedure example

  10. In Object Explorer, connect to an instance of Database Engine and then expand that instance.
  11. Expand Databases, expand the AdventureWorks2008R2 database, and then expand Programmability.
  12. Right-click Stored Procedures, and then click New Stored Procedure.
  13. On the Query menu, click Specify Values for Template Parameters.
  14. In the Specify Values for Template Parameters dialog box, enter the following values for the parameters shown.
    ParameterValue
    AuthorYour name
    Create DateToday's date
    DescriptionReturns employee data.
    Procedure_nameHumanResources.uspGetEmployees
    @Param1@LastName
    @Datatype_For_Param1nvarchar(50)
    Default_Value_For_Param1NULL
    @Param2@FirstName
    @Datatype_For_Param2nvarchar(50)
    Default_Value_For_Param2NULL
  15. Click OK.
  16. In the query editor, replace the SELECT statement with the following statement:
    SELECT FirstName, LastName, JobTitle, Department
        FROM HumanResources.vEmployeeDepartment
        WHERE FirstName = @FirstName AND LastName = @LastName;
    1. To test the syntax, on the Query menu, click Parse. If an error message is returned, compare the statements with the information above and correct as needed.
    2. To create the stored procedure, on the Query menu, click Execute.
    3. To save the script, on the File menu, click Save. Enter a new file name, and then click Save.
    4. To run the stored procedure, on the toolbar, click New Query.
    5. In the query window, enter the following statements:
      USE AdventureWorks2008R2;
      GO
      EXECUTE HumanResources.uspGetEmployees @FirstName = N'Diane', @LastName = N'Margheim';
      On the Query menu, click Execute.
      GO

Friday, March 18, 2011

IP Internet protocol

Internet Protocol: IP Addresses

Every machine on the Internet has a unique identifying number, called an IP Address. The IP stands for Internet Protocol, which is the language that computers use to communicate over the Internet. A protocol is the pre-defined way that someone who wants to use a service talks with that service. The "someone" could be a person, but more often it is a computer program like a Web browser.
A typical IP address looks like this:


216.27.61.137
To make it easier for us humans to remember, IP addresses are normally expressed in decimal format as a dotted decimal number like the one above. But computers communicate in binary form. Look at the same IP address in binary:


11011000.00011011.00111101.10001001
The four numbers in an IP address are called octets, because they each have eight positions when viewed in binary form. If you add all the positions together, you get 32, which is why IP addresses are considered 32-bit numbers. Since each of the eight positions can have two different states (1 or zero), the total number of possible combinations per octet is 28 or 256. So each octet can contain any value between zero and 255. Combine the four octets and you get 232 or a possible 4,294,967,296 unique values!
Out of the almost 4.3 billion possible combinations, certain values are restricted from use as typical IP addresses. For example, the IP address 0.0.0.0 is reserved for the default network and the address 255.255.255.255 is used for broadcasts.
The octets serve a purpose other than simply separating the numbers. They are used to create classes of IP addresses that can be assigned to a particular business, government or other entity based on size and need. The octets are split into two sections: Net and Host. The Net section always contains the first octet. It is used to identify the network that a computer belongs to. Host (sometimes referred to as Node) identifies the actual computer on the network. The Host section always contains the last octet. There are five IP classes plus certain special addresses.

Internet Protocol: Domain Name System

When the Internet was in its infancy, it consisted of a small number of computers hooked together with modems and telephone lines. You could only make connections by providing the IP address of the computer you wanted to establish a link with. For example, a typical IP address might be 216.27.22.162. This was fine when there were only a few hosts out there, but it became unwieldy as more and more systems came online.
The first solution to the problem was a simple text file maintained by the Network Information Center that mapped names to IP addresses. Soon this text file became so large it was too cumbersome to manage. In 1983, the University of Wisconsin created the Domain Name System (DNS), which maps text names to IP addresses automatically

More information will be given in few days so please stay tune

Chemical Equilibrium

Definition of Chemical Equilibrium

Chemical equilibrium applies to reactions that can occur in both directions. In a reaction such as:
CH4(g) + H2O(g) <--> CO(g) + 3H2(g)
The reaction can happen both ways. So after some of the products are created the products begin to react to form the reactants. At the beginning of the reaction, the rate that the reactants are changing into the products is higher than the rate that the products are changing into the reactants. Therefore, the net change is a higher number of products.
Even though the reactants are constantly forming products and vice-versa the amount of reactants and products does become steady. When the net change of the products and reactants is zero the reaction has reached equilibrium. The equilibrium is a dynamic equilibrium. The definition for a dynamic equilibrium is when the amount of products and reactants are constant. (They are not equal but constant. Also, both reactions are still occurring.)

Equilibrium Constant

To determine the amount of each compound that will be present at equilibrium you must know the equilibrium constant. To determine the equilibrium constant you must consider the generic equation:
aA + bB <--> cC + dD
The upper case letters are the molar concentrations of the reactants and products. The lower case letters are the coefficients that balance the equation. Use the following equation to determine the equilibrium constant (Kc). Kc equation
For example, determining the equilibrium constant of the following equation can be accomplished by using the Kc equation.
Using the following equation, calculate the equilibrium constant.
N2(g) + 3H2(g) <--> 2NH3(g)
A one-liter vessel contains 1.60 moles NH3, .800 moles N2, and 1.20 moles of H2. What is the equilibrium constant?
example equilibrium constant
Answer: 1.85

Le Chatelier's Principle

Le Chatelier's principle states that when a system in chemical equilibrium is disturbed by a change of temperature, pressure, or a concentration, the system shifts in equilibrium composition in a way that tends to counteract this change of variable. The three ways that Le Chatelier's principle says you can affect the outcome of the equilibrium are as follows:
  • Changing concentrations by adding or removing products or reactants to the reaction vessel.
  • Changing partial pressure of gaseous reactants and products.
  • Changing the temperature.
These actions change each equilibrium differently, therefore you must determine what needs to happen for the reaction to get back in equilibrium.

Example involving change of concentration:

In the equation
2NO(g) + O2(g) <--> 2NO2(g)
If you add more NO(g) the equilibrium shifts to the right producing more NO2(g)
If you add more O2(g) the equilibrium shifts to the right producing more NO2(g)
If you add more NO2(g) the equilibrium shifts to the left producing more NO(g) and O2(g)

Example involving pressure change:

In the equation
2SO2(g) + O2(g) <--> 2SO3(g),
an increase in pressure will cause the reaction to shift in the direction that reduces pressure, that is the side with the fewer number of gas molecules. Therefore an increase in pressure will cause a shift to the right, producing more product. (A decrease in volume is one way of increasing pressure.)

Example involving temperature change:

In the equation
N2(g) + 3H2(g) <--> 2NH3 + 91.8 kJ,
an increase in temperature will cause a shift to the left because the reverse reaction uses the excess heat. An increase in forward reaction would produce even more heat since the forward reaction is exothermic. Therefore the shift caused by a change in temperature depends upon whether the reaction is exothermic or endothermic.

IUPAC Nomenclature for organic chemistry

Nomenclature

Naming Organic Compounds

The increasingly large number of organic compounds identified with each passing day, together with the fact that many of these compounds are isomers of other compounds, requires that a systematic nomenclature system be developed. Just as each distinct compound has a unique molecular structure which can be designated by a structural formula, each compound must be given a characteristic and unique name.
As organic chemistry grew and developed, many compounds were given trivial names, which are now commonly used and recognized. Some examples are:

Name MethaneButaneAcetoneToluene AcetyleneEthyl Alcohol
Formula CH4C4H10CH3COCH3CH3C6H5C2H2C2H5OH
Such common names often have their origin in the history of the science and the natural sources of specific compounds, but the relationship of these names to each other is arbitrary, and no rational or systematic principles underly their assignments.

The IUPAC Systematic Approach to Nomenclature

A rational nomenclature system should do at least two things. First, it should indicate how the carbon atoms of a given compound are bonded together in a characteristic lattice of chains and rings. Second, it should identify and locate any functional groups present in the compound. Since hydrogen is such a common component of organic compounds, its amount and locations can be assumed from the tetravalency of carbon, and need not be specified in most cases.
The IUPAC nomenclature system is a set of logical rules devised and used by organic chemists to circumvent problems caused by arbitrary nomenclature. Knowing these rules and given a structural formula, one should be able to write a unique name for every distinct compound. Likewise, given a IUPAC name, one should be able to write a structural formula. In general, an IUPAC name will have three essential features:
 A root or base indicating a major chain or ring of carbon atoms found in the molecular structure.
 A suffix or other element(s) designating functional groups that may be present in the compound.
 Names of substituent groups, other than hydrogen, that complete the molecular structure.
As an introduction to the IUPAC nomenclature system, we shall first consider compounds that have no specific functional groups. Such compounds are composed only of carbon and hydrogen atoms bonded together by sigma bonds (all carbons are sp3 hybridized).
An excellent presentation of organic nomenclature is provided on a Nomenclature Page. created by Dave Woodcock.


Alkanes

Alkanes

Hydrocarbons having no double or triple bond functional groups are classified as alkanes or cycloalkanes, depending on whether the carbon atoms of the molecule are arranged only in chains or also in rings. Although these hydrocarbons have no functional groups, they constitute the framework on which functional groups are located in other classes of compounds, and provide an ideal starting point for studying and naming organic compounds. The alkanes and cycloalkanes are also members of a larger class of compounds referred to as aliphatic. Simply put, aliphatic compounds are compounds that do not incorporate any aromatic rings in their molecular structure.
The following table lists the IUPAC names assigned to simple continuous-chain alkanes from C-1 to C-10. A common "ane" suffix identifies these compounds as alkanes. Longer chain alkanes are well known, and their names may be found in many reference and text books. The names methane through decane should be memorized, since they constitute the root of many IUPAC names. Fortunately, common numerical prefixes are used in naming chains of five or more carbon atoms.

Examples of Simple Unbranched Alkanes

NameMolecular
Formula
Structural
Formula
Isomers
NameMolecular
Formula
Structural
Formula
Isomers
methaneCH4CH41
hexaneC6H14CH3(CH2)4CH35
ethaneC2H6CH3CH31
heptaneC7H16CH3(CH2)5CH39
propaneC3H8CH3CH2CH31
octaneC8H18CH3(CH2)6CH318
butaneC4H10CH3CH2CH2CH32
nonaneC9H20CH3(CH2)7CH335
pentaneC5H12CH3(CH2)3CH33
decaneC10H22CH3(CH2)8CH375
Some important behavior trends and terminologies:
  (i)   The formulas and structures of these alkanes increase uniformly by a CH2 increment.
 (ii)   A uniform variation of this kind in a series of compounds is called homologous.
(iii)   These formulas all fit the CnH2n+2 rule. This is also the highest possible H/C ratio for a stable hydrocarbon.
(iv)   Since the H/C ratio in these compounds is at a maximum, we call them saturated (with hydrogen).
Beginning with butane (C4H10), and becoming more numerous with larger alkanes, we note the existence of alkane isomers. For example, there are five C6H14 isomers, shown below as abbreviated line formulas (A through E):
Although these distinct compounds all have the same molecular formula, only one (A) can be called hexane. How then are we to name the others?
The IUPAC system requires first that we have names for simple unbranched chains, as noted above, and second that we have names for simple alkyl groups that may be attached to the chains. Examples of some common alkyl groups are given in the following table. Note that the "ane" suffix is replaced by "yl" in naming groups. The symbol R is used to designate a generic (unspecified) alkyl group.
Group  CH3–   C2H5–   CH3CH2CH2–   (CH3)2CH–   CH3CH2CH2CH2–   (CH3)2CHCH2–   CH3CH2CH(CH3)–   (CH3)3C–   R– 
Name  Methyl  Ethyl  Propyl  Isopropyl  Butyl  Isobutyl  sec-Butyl  tert-Butyl    Alkyl  

IUPAC Rules for Alkane Nomenclature

 1.   Find and name the longest continuous carbon chain.
 2.   Identify and name groups attached to this chain.
 3.   Number the chain consecutively, starting at the end nearest a substituent group.
 4.   Designate the location of each substituent group by an appropriate number and name.
 5.   Assemble the name, listing groups in alphabetical order.
    The prefixes di, tri, tetra etc., used to designate several groups of the same kind, are not considered when alphabetizing.
For the above isomers of hexane the IUPAC names are:   B  2-methylpentane    C  3-methylpentane    D  2,2-dimethylbutane    E  2,3-dimethylbutane
Halogen substituents are easily accommodated, using the names: fluoro (F-), chloro (Cl-), bromo (Br-) and iodo (I-). For example, (CH3)2CHCH2CH2Br would be named 1-bromo-3-methylbutane. If the halogen is bonded to a simple alkyl group an alternative "alkyl halide" name may be used. Thus, C2H5Cl may be named chloroethane (no locator number is needed for a two carbon chain) or ethyl chloride.


 


Cycloalkanes

Cycloalkanes

      Cycloalkanes have one or more rings of carbon atoms. The simplest examples of this class consist of a single, unsubstituted carbon ring, and these form a homologous series similar to the unbranched alkanes. The IUPAC names of the first five members of this series are given in the following table. The last (yellow shaded) column gives the general formula for a cycloalkane of any size. If a simple unbranched alkane is converted to a cycloalkane two hydrogen atoms, one from each end of the chain, must be lost. Hence the general formula for a cycloalkane composed of n carbons is CnH2n. Although a cycloalkane has two fewer hydrogens than the equivalent alkane, each carbon is bonded to four other atoms so such compounds are still considered to be saturated with hydrogen.

Examples of Simple Cycloalkanes

Name Cyclopropane Cyclobutane Cyclopentane Cyclohexane Cycloheptane Cycloalkane
Molecular
Formula
C3H6 C4H8 C5H10 C6H12 C7H14 CnH2n
Structural
Formula
(CH2)n
Line
Formula
Substituted cycloalkanes are named in a fashion very similar to that used for naming branched alkanes. The chief difference in the rules and procedures occurs in the numbering system. Since all the carbons of a ring are equivalent (a ring has no ends like a chain does), the numbering starts at a substituted ring atom.

IUPAC Rules for Cycloalkane Nomenclature

 1.   For a monosubstituted cycloalkane the ring supplies the root name (table above) and the substituent group is named as usual. A location number is unnecessary.
 2.   If the alkyl substituent is large and/or complex, the ring may be named as a substituent group on an alkane.
 3.   If two different substituents are present on the ring, they are listed in alphabetical order, and the first cited substituent is assigned to carbon #1. The numbering of ring carbons then continues in a direction (clockwise or counter-clockwise) that affords the second substituent the lower possible location number.
 4.   If several substituents are present on the ring, they are listed in alphabetical order. Location numbers are assigned to the substituents so that one of them is at carbon #1 and the other locations have the lowest possible numbers, counting in either a clockwise or counter-clockwise direction.
 5.   The name is assembled, listing groups in alphabetical order and giving each group (if there are two or more) a location number. The prefixes di, tri, tetra etc., used to designate several groups of the same kind, are not considered when alphabetizing.
For examples of how these rules are used in naming substituted cycloalkanes   .
Small rings, such as three and four membered rings, have significant angle strain resulting from the distortion of the sp3 carbon bond angles from the ideal 109.5º to 60º and 90º respectively. This angle strain often enhances the chemical reactivity of such compounds, leading to ring cleavage products. It is also important to recognize that, with the exception of cyclopropane, cycloalkyl rings are not planar (flat). The three dimensional shapes assumed by the common rings (especially cyclohexane and larger rings) are described and discussed in the Conformational Analysis Section.
Hydrocarbons having more than one ring are common, and are referred to as bicyclic (two rings), tricyclic (three rings) and in general, polycyclic compounds. The molecular formulas of such compounds have H/C ratios that decrease with the number of rings. In general, for a hydrocarbon composed of n carbon atoms associated with m rings the formula is: CnH(2n + 2 - 2m). The structural relationship of rings in a polycyclic compound can vary. They may be separate and independent, or they may share one or two common atoms. Some examples of these possible arrangements are shown in the following table.

Examples of Isomeric C8H14 Bicycloalkanes

Isolated Rings Spiro Rings Fused Rings Bridged Rings
No common atoms One common atom One common bond Two common atoms