text:
Special Relativity/Aether

Introduction
Many students confuse Relativity Theory with a theory about the propagation of light. According to modern Relativity Theory the constancy of the speed of light is a consequence of the geometry of spacetime rather than something specifically due to the properties of photons; but the statement "the speed of light is constant" often distracts the student into a consideration of light propagation. This confusion is amplified by the importance assigned to interferometry experiments, such as the Michelson-Morley experiment, in most textbooks on Relativity Theory.

The history of theories of the propagation of light is an interesting topic in physics and was indeed important in the early days of Relativity Theory. In the seventeenth century two competing theories of light propagation were developed. Christiaan Huygens published a wave theory of light which was based on Huygen's principle whereby every point in a wavelike disturbance can give rise to further disturbances that spread out spherically. In contrast Newton considered that the propagation of light was due to the passage of small particles or "corpuscles" from the source to the illuminated object. His theory is known as the corpuscular theory of light. Newton's theory was widely accepted until the nineteenth century.

In the early nineteenth century Thomas Young performed his Young's slits experiment and the interference pattern that occurred was explained in terms of diffraction due to the wave nature of light. The wave theory was accepted generally until the twentieth century when quantum theory confirmed that light had a corpuscular nature and that Huygen's principle could not be applied.

The idea of light as a disturbance of some medium, or aether, that permeates the universe was problematical from its inception (US spelling: "ether"). The first problem that arose was that the speed of light did not change with the velocity of the observer. If light were indeed a disturbance of some stationary medium then as the earth moves through the medium towards a light source the speed of light should appear to increase. It was found however that the speed of light did not change as expected. Each experiment on the velocity of light required corrections to existing theory and led to a variety of subsidiary theories such as the "aether drag hypothesis". Ultimately it was experiments that were designed to investigate the properties of the aether that provided the first experimental evidence for Relativity Theory.

The aether drag hypothesis
The aether drag hypothesis was an early attempt to explain the way experiments such as Arago's experiment showed that the speed of light is constant. The aether drag hypothesis is now considered to be incorrect.

According to the aether drag hypothesis light propagates in a special medium, the aether, that remains attached to things as they move. If this is the case then, no matter how fast the earth moves around the sun or rotates on its axis, light on the surface of the earth would travel at a constant velocity.

The primary reason the aether drag hypothesis is considered invalid is because of the occurrence of stellar aberration. In stellar aberration the position of a star when viewed with a telescope swings each side of a central position by about 20.5 seconds of arc every six months. This amount of swing is the amount expected when considering the speed of earth's travel in its orbit. In 1871, George Biddell Airy demonstrated that stellar aberration occurs even when a telescope is filled with water. It seems that if the aether drag hypothesis were true then stellar aberration would not occur because the light would be travelling in the aether which would be moving along with the telescope.

If you visualize a bucket on a train about to enter a tunnel and a drop of water drips from the tunnel entrance into the bucket at the very centre, the drop will not hit the centre at the bottom of the bucket. The bucket is the tube of a telescope, the drop is a photon and the train is the earth. If aether is dragged then the droplet would be travelling with the train when it is dropped and would hit the centre of bucket at the bottom.

The amount of stellar aberration, α is given by:

 * $$tan(\alpha) = v \delta t / c \delta t$$

So:

 * $$tan(\alpha) = v / c$$

The speed at which the earth goes round the sun, v = 30 km/s, and the speed of light is c = 300,000,000 m/s which gives α = 20.5 seconds of arc every six months. This amount of aberration is observed and this contradicts the aether drag hypothesis.

In 1818, Augustin Jean Fresnel introduced a modification to the aether drag hypothesis that only applies to the interface between media. This was accepted during much of the nineteenth century but has now been replaced by special theory of relativity (see below).

The aether drag hypothesis is historically important because it was one of the reasons why Newton's corpuscular theory of light was replaced by the wave theory and it is used in early explanations of light propagation without relativity theory. It originated as a result of early attempts to measure the speed of light.

In 1810, François Arago realised that variations in the refractive index of a substance predicted by the corpuscular theory would provide a useful method for measuring the velocity of light. These predictions arose because the refractive index of a substance such as glass depends on the ratio of the velocities of light in air and in the glass. Arago attempted to measure the extent to which corpuscles of light would be refracted by a glass prism at the front of a telescope. He expected that there would be a range of different angles of refraction due to the variety of different velocities of the stars and the motion of the earth at different times of the day and year. Contrary to this expectation he found that there was no difference in refraction between stars, between times of day or between seasons. All Arago observed was ordinary stellar aberration.

In 1818 Fresnel examined Arago's results using a wave theory of light. He realised that even if light were transmitted as waves the refractive index of the glass-air interface should have varied as the glass moved through the aether to strike the incoming waves at different velocities when the earth rotated and the seasons changed.

Fresnel proposed that the glass prism would carry some of the aether along with it so that "...the aether is in excess inside the prism". He realised that the velocity of propagation of waves depends on the density of the medium so proposed that the velocity of light in the prism would need to be adjusted by an amount of 'drag'.

The velocity of light $$ v_n$$ in the glass without any adjustment is given by:

 * $$ v_n = c / n $$

The drag adjustment $$ v_d$$ is given by:

 * $$ v_d = v (1 - \frac {\rho_e}{\rho_g}) $$

Where $$ \rho_e$$ is the aether density in the environment, $$\rho_g$$ is the aether density in the glass and $$v$$ is the velocity of the prism with respect to the aether.

The factor $$(1 - \frac {\rho_e}{\rho_g})$$ can be written as $$ (1 - \frac{1}{n^2})$$ because the refractive index, n, would be dependent on the density of the aether. This is known as the Fresnel drag coefficient.

The velocity of light in the glass is then given by:

 * $$ V = \frac {c}{n} + v (1 - \frac{1}{n^2}) $$

This correction was successful in explaining the null result of Arago's experiment. It introduces the concept of a largely stationary aether that is dragged by substances such as glass but not by air. Its success favoured the wave theory of light over the previous corpuscular theory.

The Fresnel drag coefficient was confirmed by an interferometer experiment performed by Fizeau. Water was passed at high speed along two glass tubes that formed the optical paths of the interferometer and it was found that the fringe shifts were as predicted by the drag coefficient.

The special theory of relativity predicts the result of the Fizeau experiment from the velocity addition theorem without any need for an aether.

If $$V$$ is the velocity of light relative to the Fizeau apparatus and $$U$$ is the velocity of light relative to the water and $$v$$ is the velocity of the water:

 * $$ U = \frac {c}{n} $$

 * $$ V = \frac {c/n + v}{1 + v/nc}$$

which, if v/c is small can be expanded using the binomial expansion to become:

 * $$ V = \frac {c}{n} + v (1 - \frac{1}{n^2}) $$

This is identical to Fresnel's equation.

It may appear as if Fresnel's analysis can be substituted for the relativistic approach, however, more recent work has shown that Fresnel's assumptions should lead to different amounts of aether drag for different frequencies of light and violate Snell's law (see Ferraro and Sforza (2005)).

The aether drag hypothesis was one of the arguments used in an attempt to explain the Michelson-Morley experiment before the widespread acceptance of the special theory of relativity.

The Fizeau experiment is consistent with relativity and approximately consistent with each individual body, such as prisms, lenses etc. dragging its own aether with it. This contradicts some modified versions of the aether drag hypothesis that argue that aether drag may happen on a global (or larger) scale and stellar aberration is merely transferred into the entrained "bubble" around the earth which then faithfully carries the modified angle of incidence directly to the observer.

References

 * Rafael Ferraro and Daniel M Sforza 2005. Arago (1810): the first experimental result against the ether Eur. J. Phys. 26 195-204

The Michelson-Morley experiment
The Michelson-Morley experiment, one of the most important and famous experiments in the history of physics, was performed in 1887 by Albert Michelson and Edward Morley at what is now Case Western Reserve University, and is considered to be the first strong evidence against the theory of a luminiferous aether.

Physics theories of the late 19th century postulated that, just as water waves must have a medium to move across (water), and audible sound waves require a medium to move through (air), so also light waves require a medium, the "luminiferous aether". The speed of light being so great, designing an experiment to detect the presence and properties of this aether took considerable thought.

Measuring aether
A depiction of the concept of the “aether wind”. Each year, the Earth travels a tremendous distance in its orbit around the sun, at a speed of around 30 km/second, over 100,000 km per hour. It was reasoned that the Earth would at all times be moving through the aether and producing a detectable "aether wind". At any given point on the Earth's surface, the magnitude and direction of the wind would vary with time of day and season. By analysing the effective wind at various different times, it should be possible to separate out components due to motion of the Earth relative to the Solar System from any due to the overall motion of that system.

The effect of the aether wind on light waves would be like the effect of wind on sound waves. Sound waves travel at a constant speed relative to the medium that they are travelling through (this varies depending on the pressure, temperature etc (see sound), but is typically around 340 m/s). So, if the speed of sound in our conditions is 340 m/s, when there is a 10 m/s wind relative to the ground, into the wind it will appear that sound is travelling at 330 m/s (340 - 10). Downwind, it will appear that sound is travelling at 350 m/s (340 + 10). Measuring the speed of sound compared to the ground in different directions will therefore enable us to calculate the speed of the air relative to the ground.

If the speed of the sound cannot be directly measured, an alternative method is to measure the time that the sound takes to bounce off of a reflector and return to the origin. This is done parallel to the wind and perpendicular (since the direction of the wind is unknown before hand, just determine the time for several different directions). The cumulative round trip effects of the wind in the two orientations slightly favors the sound travelling at right angles to it. Similarly, the effect of an aether wind on a beam of light would be for the beam to take slightly longer to travel round-trip in the direction parallel to the “wind” than to travel the same round-trip distance at right angles to it.

“Slightly” is key, in that, over a distance such as a few meters, the difference in time for the two round trips would be only about a millionth of a millionth of a second. At this point the only truly accurate measurements of the speed of light were those carried out by Albert Abraham Michelson, which had resulted in measurements accurate to a few meters per second. While a stunning achievement in its own right, this was certainly not nearly enough accuracy to be able to detect the aether.

The experiments
Michelson, though, had already seen a solution to this problem. His design, later known as an interferometer, sent a single source of white light through a half-silvered mirror that was used to split it into two beams travelling at right angles to one another. After leaving the splitter, the beams travelled out to the ends of long arms where they were reflected back into the middle on small mirrors. They then recombined on the far side of the splitter in an eyepiece, producing a pattern of constructive and destructive interference based on the length of the arms. Any slight change in the amount of time the beams spent in transit would then be observed as a shift in the positions of the interference fringes. If the aether were stationary relative to the sun, then the Earth's motion would produce a shift of about 0.04 fringes.

Michelson had made several measurements with an experimental device in 1881, in which he noticed that the expected shift of 0.04 was not seen, and a smaller shift of about 0.02 was. However his apparatus was a prototype, and had experimental errors far too large to say anything about the aether wind. For a measurement of the aether wind, a much more accurate and tightly controlled experiment would have to be carried out. The prototype was, however, successful in demonstrating that the basic method was feasible.

He then combined forces with Edward Morley and spent a considerable amount of time and money creating an improved version with more than enough accuracy to detect the drift. In their experiment the light was repeatedly reflected back and forth along the arms, increasing the path length to 11m. At this length the drift would be about .4 fringes. To make that easily detectable the apparatus was located in a closed room in the basement of a stone building, eliminating most thermal and vibrational effects. Vibrations were further reduced by building the apparatus on top of a huge block of marble, which was then floated in a pool of mercury. They calculated that effects of about 1/100th of a fringe would be detectable.

The mercury pool allowed the device to be turned, so that it could be rotated through the entire range of possible angles to the "aether wind". Even over a short period of time some sort of effect would be noticed simply by rotating the device, such that one arm rotated into the direction of the wind and the other away. Over longer periods day/night cycles or yearly cycles would also be easily measurable.

During each full rotation of the device, each arm would be parallel to the wind twice (facing into and away from the wind) and perpendicular to the wind twice. This effect would show readings in a sine wave formation with two peaks and two troughs. Additionally if the wind was only from the earth's orbit around the sun, the wind would fully change directions east/west during a 12 hour period. In this ideal conceptualization, the sine wave of day/night readings would be in opposite phase.

Because it was assumed that the motion of the solar system would cause an additional component to the wind, the yearly cycles would be detectable as an alteration of the magnitude of the wind. An example of this effect is a helicopter flying forward. While on the ground, a helicopter's blades would be measured as travelling around at 50 km/h at the tips. However, if the helicopter is travelling forward at 50 km/h, there are points at which the tips of the blades are travelling 0 km/h and 100 km/h with respect to the air they are travelling through. This increases the magnitude of the lift on one side and decreases it on the other just as it would increase and decrease the magnitude of an ether wind on a yearly basis.

The most famous failed experiment
Ironically, after all this thought and preparation, the experiment became what might be called the most famous failed experiment to date. Instead of providing insight into the properties of the aether, Michelson and Morley's 1887 article in the American Journal of Science reported the measurement to be as small as one-fortieth of the expected displacement but "since the displacement is proportional to the square of the velocity" they concluded that the measured velocity was approximately one-sixth of the expected velocity of the Earth's motion in orbit and "certainly less than one-fourth". Although this small "velocity" was measured, it was considered far too small to be used as evidence of aether, it was later said to be within the range of an experimental error that would allow the speed to actually be zero.

Although Michelson and Morley went on to different experiments after their first publication in 1887, both remained active in the field. Other versions of the experiment were carried out with increasing sophistication. Kennedy and Illingsworth both modified the mirrors to include a half-wave "step", eliminating the possibility of some sort of standing wave pattern within the apparatus. Illingsworth could detect changes on the order of 1/300th of a fringe, Kennedy up to 1/1500th. Miller later built a non-magnetic device to eliminate magnetostriction, while Michelson built one of non-expanding invar to eliminate any remaining thermal effects. Others from around the world increased accuracy, eliminated possible side effects, or both. All of these with the exception of Dayton Miller also returned what is considered a null result.

Morley was not convinced of his own results, and went on to conduct additional experiments with Dayton Miller. Miller worked on increasingly large experiments, culminating in one with a 32m (effective) arm length at an installation at the Mount Wilson observatory. To avoid the possibility of the aether wind being blocked by solid walls, he used a special shed with thin walls, mainly of canvas. He consistently measured a small positive effect that varied, as expected, with each rotation of the device, the sidereal day and on a yearly basis. The low magnitude of the results he attributed to aether entrainment (see below). His measurements amounted to only ~10 kps instead of the expected ~30 kps expected from the earth's orbital motion alone. He remained convinced this was due to partial entrainment, though he did not attempt a detailed explanation.

Though Kennedy later also carried out an experiment at Mount Wilson, finding 1/10 the drift measured by Miller, and no seasonal effects, Miller's findings were considered important at the time, and were discussed by Michelson, Hendrik Lorentz and others at a meeting reported in 1928 (ref below). There was general agreement that more experimentation was needed to check Miller's results. Lorentz recognised that the results, whatever their cause, did not quite tally with either his or Einstein's versions of special relativity. Einstein was not present at the meeting and felt the results could be dismissed as experimental error (see Shankland ref below).

In recent times versions of the MM experiment have become commonplace. Lasers and masers amplify light by repeatedly bouncing it back and forth inside a carefully tuned cavity, thereby inducing high-energy atoms in the cavity to give off more light. The result is an effective path length of kilometers. Better yet, the light emitted in one cavity can be used to start the same cascade in another set at right angles, thereby creating an interferometer of extreme accuracy.

The first such experiment was led by Charles H. Townes, one of the co-creators of the first maser. Their 1958 experiment put an upper limit on drift, including any possible experimental errors, of only 30 m/s. In 1974 a repeat with accurate lasers in the triangular Trimmer experiment reduced this to 0.025 m/s, and included tests of entrainment by placing one leg in glass. In 1979 the Brillet-Hall experiment put an upper limit of 30 m/s for any one direction, but reduced this to only 0.000001 m/s for a two-direction case (ie, still or partially entrained aether). A year long repeat known as Hils and Hall, published in 1990, reduced this to 2x10 -13.

Fallout
This result was rather astounding and not explainable by the then-current theory of wave propagation in a static aether. Several explanations were attempted, among them, that the experiment had a hidden flaw (apparently Michelson's initial belief), or that the Earth's gravitational field somehow "dragged" the aether around with it in such a way as locally to eliminate its effect. Miller would have argued that, in most if not all experiments other than his own, there was little possibility of detecting an aether wind since it was almost completely blocked out by the laboratory walls or by the apparatus itself. Be this as it may, the idea of a simple aether, what became known as the First Postulate, had been dealt a serious blow.

A number of experiments were carried out to investigate the concept of aether dragging, or entrainment. The most convincing was carried out by Hamar, who placed one arm of the interferometer between two huge lead blocks. If aether were dragged by mass, the blocks would, it was theorised, have been enough to cause a visible effect. Once again, no effect was seen.

Walter Ritz's Emission theory (or ballistic theory), was also consistent with the results of the experiment, not requiring aether, more intuitive and paradox-free. This became known as the Second Postulate. However it also led to several "obvious" optical effects that were not seen in astronomical photographs, notably in observations of binary stars in which the light from the two stars could be measured in an interferometer.

The Sagnac experiment placed the MM apparatus on a constantly rotating turntable. In doing so any ballistic theories such as Ritz's could be tested directly, as the light going one way around the device would have different length to travel than light going the other way (the eyepiece and mirrors would be moving toward/away from the light). In Ritz's theory there would be no shift, because the net velocity between the light source and detector was zero (they were both mounted on the turntable). However in this case an effect was seen, thereby eliminating any simple ballistic theory. This fringe-shift effect is used today in laser gyroscopes.

Another possible solution was found in the Lorentz-FitzGerald contraction hypothesis. In this theory all objects physically contract along the line of motion relative to the aether, so while the light may indeed transit slower on that arm, it also ends up travelling a shorter distance that exactly cancels out the drift.

In 1932 the Kennedy-Thorndike experiment modified the Michelson-Morley experiment by making the path lengths of the split beam unequal, with one arm being very long. In this version the two ends of the experiment were at different velocities due to the rotation of the earth, so the contraction would not "work out" to exactly cancel the result. Once again, no effect was seen.

Ernst Mach was among the first physicists to suggest that the experiment actually amounted to a disproof of the aether theory. The development of what became Einstein's special theory of relativity had the Fitzgerald-Lorentz contraction derived from the invariance postulate, and was also consistent with the apparently null results of most experiments (though not, as was recognised at the 1928 meeting, with Miller's observed seasonal effects). Today relativity is generally considered the "solution" to the MM null result.

The Trouton-Noble experiment is regarded as the electrostatic equivalent of the Michelson-Morley optical experiment, though whether or not it can ever be done with the necessary sensitivity is debatable. On the other hand, the 1908 Trouton-Rankine experiment that spelled the end of the Lorentz-FitzGerald contraction hypothesis achieved an incredible sensitivity.

References

 * W. Ritz, Recherches Critiques sur l'Electrodynamique Generale, Ann. Chim., Phys., 13, 145, (1908) - English Translation

 * W. de Sitter, Ein astronomischer Bewis für die Konstanz der Lichgeshwindigkeit, Physik. Zeitschr, 14, 429 (1913) - English Translation

 * The Michelson Morley and the Kennedy Thorndike tests of STR

 * The Trouton-Rankine Experiment and the Refutation of the FitzGerald Contraction

 * High Speed Ives-Stilwell Experiment Used to Disprove the Emission Theory

Mathematical analysis of the Michelson Morley Experiment
The Michelson interferometer splits light into rays that travel along two paths then recombines them. The recombined rays interfere with each other. If the path length changes in one of the arms the interference pattern will shift slightly, moving relative to the cross hairs in the telescope. The Michelson interferometer is arranged as an optical bench on a concrete block that floats on a large pool of mercury. This allows the whole apparatus to be rotated smoothly.

If the earth were moving through an aether at the same velocity as it orbits the sun (30 km/sec) then Michelson and Morley calculated that a rotation of the apparatus should cause a shift in the fringe pattern. The basis of this calculation is given below.

Consider the time taken $$t_1$$ for light to travel along Path 1 in the illustration:

 * $$t_1 = \frac{L_f}{c-v} + \frac{L_f}{c+v}$$

Rearranging terms:

 * $$\frac{L_f}{c-v} + \frac{L_f}{c+v} = \frac{2L_fc}{c^2-v^2}$$

further rearranging:

$$\frac{2L_fc}{c^2-v^2} = \frac{2L_f}{c}\frac{1}{1-v^2/c^2}$$

hence:

$$t_1 = \frac{2L_f}{c}\frac{1}{1-v^2/c^2}$$

Considering Path 2, the light traces out two right angled triangles so:

 * $$ct_2 = 2 \sqrt{L_m^2 + (vt_2/2)^2}$$

Rearranging:

 * $$t_2 = \frac{2L_m}{\sqrt{c^2-v^2}}$$

So:

 * $$t_2 =\frac{2L_m}{c} \frac{1}{\sqrt{1-(v/c)^2}}$$

It is now easy to calculate the difference ($$\Delta t$$ between the times spent by the light in Path 1 and Path 2:

 * $$\Delta t = \frac{2}{c} \left(\frac{L_m}{\sqrt{1-v^2/c^2}}-\frac{L_f}{1-v^2/c^2}\right)$$

If the apparatus is rotated by 90 degrees the new time difference is:

 * $$\Delta t^' = \frac{2}{c} \left(\frac{L_m}{1-v^2/c^2}-\frac{L_f}{\sqrt{1-v^2/c^2}}\right)$$

because $$L_m$$ and $$L_f$$ exchange roles.

The interference fringes due to the time difference between the paths will be different after rotation if $$\Delta t$$ and $$\Delta t^'$$ are different.

 * $$\Delta t^' - \Delta t = \frac{2}{c} \left(\frac{L_m+L_f}{1-v^2/c^2}-\frac{L_f+L_m}{\sqrt{1-v^2/c^2}}\right)$$

This difference between the two times can be calculated if the binomial expansions of $$\frac{1}{1-v^2/c^2}$$ and $$\frac{1}{\sqrt{1-v^2/c^2}}$$ are used:

 * $$\frac{1}{1-v^2/c^2}= 1 + \frac{v^2}{c^2} + \left(\frac{v^2}{c^2}\right)^2 + ....$$

 * $$\frac{1}{\sqrt{1-v^2/c^2}}= 1 + \frac{1}{2}\frac{v^2}{c^2} + \frac{3}{8}\left(\frac{v^2}{c^2}\right)^2 + ....$$

So:

 * $$\Delta t^' - \Delta t \approx \frac{L_f + L_m}{c}\frac{v^2}{c^2}$$

If the period of one vibration of the light is $$T$$ then the number of fringes ($$n$$), that will move past the cross hairs of the telescope when the apparatus is rotated will be:

 * $$n = \frac{\Delta t^' - \Delta t}{T}$$

Inserting the formula for $$\Delta t^' - \Delta t$$:

 * $$n \approx \frac{L_f + L_m}{cT}\frac{v^2}{c^2}$$

But $$cT$$ for a light wave is the wavelength of the light ie: $$cT = \lambda$$ so:

 * $$n \approx \frac{L_f + L_m}{\lambda}\frac{v^2}{c^2}$$

If the wavelength of the light is $$ 5 \times 10^{-7}$$ and the total path length is 20 metres then:

 * $$n = \left(\frac{20}{5 \times 10^{-7}}\right)10^{-8}$$

So the fringes will shift by 0.4 fringes (ie: 40%) when the apparatus is rotated.

However, no fringe shift is observed. The null result of the Michelson-Morley experiment is nowdays explained in terms of the constancy of the speed of light. The assumption that the light would have a velocity of $$c-v$$ and $$c+v$$ depending on the direction relative to the hypothetical "aether wind" is false, the light always travels at $$c$$ between two points in a vacuum and the speed of light is not affected by any "aether wind". This is because, in {special relativity} the Lorentz transforms induce a {length contraction}. Doing over the above calculations we obtain:

 * $$L_f=L_m{\sqrt{1-v^2/c^2}}$$

(taking into consideration the length contraction)

It is now easy to recalculate the difference $$\Delta t$$ between the times spent by the light in Path 1 and Path 2:

 * $$\Delta t = \frac{2}{c} \left(\frac{L_m}{\sqrt{1-v^2/c^2}}-\frac{L_f}{1-v^2/c^2}\right)=0$$ because $$L_f=L_m{\sqrt{1-v^2/c^2}}$$

If the apparatus is rotated by 90 degrees the new time difference is:

 * $$\Delta t^' = \frac{2}{c} \left(\frac{L_m}{1-v^2/c^2}-\frac{L_f}{\sqrt{1-v^2/c^2}}\right)=0$$

The interference fringes due to the time difference between the paths will be different after rotation if $$\Delta t$$ and $$\Delta t^'$$ are different.

 * $$\Delta t^' - \Delta t =0$$

Note: if the rest length $$L0_f \ne L_m$$ then $$L_f \ne L_m{\sqrt{1-v^2/c^2}}$$ and then $$\Delta t^' \ne 0$$ and $$ \Delta t \ne 0$$ and, more importantly, $$\Delta t^' - \Delta t \ne 0$$. This is why Michelson took great pains in equalizing the arms of the interferometer.

Wave propagation in moving medium
To date, it is pointed out that the medium of light in Michelson-Morley experiment is the air. And the velocity of medium is zero. Therefore,

 * $$t_1 = \frac{L}{c-v} + \frac{L_f}{c+v}=\frac{2L}{c}$$
 * $$t_2=\frac{2L}{c}$$
 * $$\Delta t=0$$

After apparatus rotated 90°, there is no interference movement.

Coherence length
The coherence length of light rays from a source that has wavelengths that differ by $$\Delta \lambda $$ is:

 * $$x = \frac{\lambda^2}{2 \pi \Delta \lambda}$$

If path lengths differ by more than this amount then interference fringes will not be observed. White light has a wide range of wavelengths and interferometers using white light must have paths that are equal to within a small fraction of a millimetre for interference to occur. This means that the ideal light source for a Michelson Interferometer should be monochromatic and the arms should be as near as possible equal in length.

The calculation of the coherence length is based on the fact that interference fringes become unclear when light rays are about 60 degrees (about 1 radian or one sixth of a wavelength ($$\approx 1/2\pi$$)) out of phase. This means that when two beams are:

 * $$\frac{\lambda}{2 \pi}$$

metres out of step they will no longer give a well defined interference pattern. Suppose a light beam contains two wavelengths of light, $$\lambda$$ and $$\lambda + \Delta \lambda$$, then in:

 * $$\frac{\lambda}{2 \pi \Delta \lambda}$$

cycles they will be $$\frac{\lambda}{2 \pi}$$ out of phase.

The distance required for the two different wavelengths of light to be this much out of phase is the coherence length. Coherence length = number of cycles x length of each cycle so:

coherence length = $$\frac{\lambda^2}{2 \pi \Delta \lambda}$$.

Lorentz-Fitzgerald Contraction Hypothesis
After the first Michelson-Morley experiments in 1881 there were several attempts to explain the null result. The most obvious point of attack is to propose that the path that is parallel to the direction of motion is contracted by $$\sqrt{1-v^2/c^2}$$ in which case $$\Delta t$$ and $$\Delta t^'$$ would be identical and no fringe shift would occur. This possibility was proposed in 1892 by Fitzgerald. Lorentz produced an "electron theory of matter" that would account for such a contraction.

Students sometimes make the mistake of assuming that the Lorentz-Fitzgerald contraction is equivalent to the Lorentz transformations. However, in the absence of any treatment of the time dilation effect the Lorentz-Fitzgerald explanation would result in a fringe shift if the apparatus is moved between two different velocities. The rotation of the earth allows this effect to be tested as the earth orbits the sun. Kennedy and Thorndike (1932) performed the Michelson-Morley experiment with a highly sensitive apparatus that could detect any effect due to the rotation of the earth; they found no effect. They concluded that both time dilation and Lorentz-Fitzgerald Contraction take place, thus confirming relativity theory.

If only the Lorentz-Fitzgerald contraction applied then the fringe shifts due to changes in velocity would be: $$n = (v_1^2 - v_2^2)/c^2 \times (L_f-L_m)/\lambda$$. Notice how the sensitivity of the experiment is dependent on the difference in path length $$L_f-L_m$$ and hence a long coherence length is required.

Recent Michelson-Morley experiments
Optical tests of the isotropy of the speed of light have become commonplace. New technologies, including the use of lasers and masers, have significantly improved measurement precision.

More recent experiments still, using other types of experiment such as optical resonators (Eisele et al. ), have shown that the speed of light is constant to within $$10^{-8}$$ m/s.

title: Special Relativity/Aether


text:
XML - Managing Data Exchange/CSS

Learning objectives
Upon completion of this chapter, for CSS you will be able to
 * know the benefits of using CSS
 * know the limitations of CSS, so you are able to find the best solution for your document
 * know how to implement and use CSS on an XML document

Introduction
CSS (Cascading Style Sheets) is a language that describes the presentation form of a structured document.

An XML or an HTML based document does not have a set style, but it consists of structured text without style information. How the document will look when printed on paper and viewed in a browser or maybe a cellphone is determined by a style sheet. A good way of making a document look consistent and easy to update is by using CSS, which Wikipedia is a good example of.

History of CSS
Style sheets have been around in one form or another since the beginnings of HTML in the early 1990s. Various browsers included their own style language which could be used to customize the appearance of web documents. Originally, style sheets were targeted towards the end-user; early revisions of HTML did not provide many facilities for presentational attributes, so it was often up to the user to decide how web documents would appear.

As the HTML language grew, however, it came to encompass a wider variety of stylistic capabilities to meet the demands of web developers. With these capabilities, style sheets became less important, and an external language for the purposes of defining style attributes was not widely accepted until the development of CSS.

The concept of Cascading Style Sheets was originally proposed in 1994 by Håkon Wium Lie. Bert Bos was at the time working on a browser called Argo which used its own style sheets; the two decided to work together to develop CSS.

A number of other style sheet languages had already been proposed, but CSS was the first to incorporate the idea of "cascading" -- the capability for a document's style to be inherited from more than one "style sheet." This permitted a user's preferred style to override the site author's specified style in some areas, while inheriting, or "cascading" the author's style in other areas. The capability to cascade in this way permits both users and site authors added flexibility and control; it permitted a mixture of stylistic preferences.

Håkon's proposal was presented at the "Mosaic and the Web" conference in Chicago in 1994, and again with Bert Bos in 1995. Around this time, the World Wide Web Consortium was being established; the W3C took an interest in the development of CSS, and organized a workshop toward that end. Håkon and Bert were the primary technical staff on the project, with additional members, including Thomas Reardon of Microsoft, participating as well. By the end of 1996, CSS was nearly ready to become official. The CSS level 1 Recommendation was published in December 1996.

Early in 1997, CSS was assigned its own working group within the W3C. The group began tackling issues that had not been addressed with CSS level 1, resulting in the creation of CSS level 2, which was published as an official Recommendation in May 1998. CSS level 3 is still under development as of 2005.

Cleaner Looking Code
A mass of HTML tags which manage design elements generally obscure the content of a page, making the code harder to read and maintain. Using CSS, the content of the page is separated from the design, making content production in formats such as HTML, XHTML, and XML as easy as possible.

Pages Will Load Faster
Non-CSS design typically consists of more code than a CSS-designed website.

In a non-CSS design, the information about the design is reloaded every time a visitor accesses a new page. Additionally, the finer points of design are executed awkwardly. For example, a common method of defining the spacing of a web page is to use blank GIF images inside tables.

Using CSS keeps content and design separated, so much less code will be needed. The CSS file loads only once per session, and is saved locally in the user's cache. All information about dimensions is defined in this stylesheet, rendering awkward constructions like blank GIF images unnecessary.

Although an increasing amount of Internet users have broadband, the size of a web page can be important to users who are limited to dial-up connections. Suppose a dial-up user accesses a company's website, and this visitor experiences lengthy loading times. It is quite possible that the visitor would stop their visit or form an opinion of this company as "slow." In this way, a seemingly small difference could mean added revenue.

Furthermore, bandwidth is not free and most webhosting firms limit the amount used. In fact, many hosts charge based on bandwidth usage, so less code could also reduce costs.

Redesign Becomes Trivial
When used properly, CSS is a very powerful tool that gives a web architect complete control over a site's presentation. It is a notation in which the rules of a design are governed. This becomes very useful for a large website which requires a consistent appearance for every type of element (such as a title, a subtitle, a piece of code, or a paragraph).

For example, suppose a company has a 1,200 page website which took many months to complete. The company then undergoes a rebranding and thus the font, the background, the style of hyperlinks, and so forth needs to be updated with the new corporate design. If the site was engineered properly using CSS, this change would be as simple as editing the appropriate lines of a single CSS file (assuming it is an external stylesheet). If CSS is not used, the code that manages the appearance is stored in each of the pages. In order to update the design in this case, each file would have to be updated individually.

Accessibility
People with lowered vision or users with special web browsers, e.g. people that are blind, will probably like a CSS designed website better than one not designed using CSS. Because CSS allows you to define the reading order separately from the visual layout it makes it easier for the special web browsers to read the page. Bear in mind that anyone who wears glasses or contact lenses can be considered to have lower vision.

Many designers lock the font size in pixels which prevents the user changing the font size. Good CSS design allows the user to increase or decrease the font size at will making pages more usable. A significant number of web surfers like to use a magnification of 300% or more.

Giving the user the opportunity to change the font size will not make any difference for the normal user, but it can make a difference for people that have lowered vision. Ask yourself the question: who is the website made for? The visitors or the designer?

Websites designed with CSS tend to display better than table-based designs in the web browsers used in PDAs and cellphones. The use of cellphones for browsing will probably continue to increase. A table-based design will make web pages inaccessible to these users.

Be careful with your CSS designs. Misuse of absolute positioning and absolute rather than relative sizes can make your webpages less accessible rather than more accessible. A good table design is better than a bad CSS design.

Better results in search engines
Extensive use of tables confuses the search engines, they can actually get problems separating content from code. The search engine robots start reading on the top of the page, and they want to find out how relevant the webpage is as fast as possible. Again, less code will make it easier for the search engines to find code that's relevant, and it will probably give your webpage a better ranking.

Disadvantages of CSS
The use of CSS for styling has few disadvantages. However some browsers, especially older ones, will sometimes present the page incorrectly. When I was gathering information for this chapter it became clear to me that many experts think that formatting XML with CSS is not the future of the web. The main view is that XSL will be the new standard. So make sure you read through the previous chapter of this book one more time. The formatting parts of XSL and CSS will be quite similar. For example, you will be able to use all CSS1 and CSS2 properties and values in XSL with the same meaning as in CSS.

CSS levels
The first CSS specification to become an official W3C Recommendation is CSS level 1, published in December 1996. Among its capabilities is support for:

 * Typeface|Font properties such as typeface and emphasis
 * Color of text, backgrounds, and other elements
 * Text attributes such as spacing between words, letters, and lines of text
 * alignment (typesetting)|Alignment of text, images, tables and other elements
 * Margin, border, padding, and positioning for most elements
 * Unique identification and generic classification of groups of attributes

The W3C maintains the CSS1 Recommendation.

CSS level 2 was developed by the W3C and published as a Recommendation in May 1998. A superset of CSS1, CSS2 includes a number of new capabilities, among them the absolute, relative, and fixed positioning of elements, the concept of media types, support for aural style sheets and bidirectional text, and new font properties such as shadows. The W3C maintains the CSS2 Recommendation.

CSS level 2 revision 1 or CSS 2.1 fixes errors in CSS2, removes poorly-supported features and adds already-implemented browser extensions to the specification. It's currently a Candidate Recommendation.

CSS level 3 is currently under development. The W3C maintains a CSS3 progress report.

CSS Syntax and Properties

 * The section on selectors has moved to CSS Programming/Selectors.
 * The section on color has moved to CSS Programming/Color.
 * The section on text has moved to CSS Programming/Fonts and Text.
 * The section on borders has moved to CSS Programming/Box Model.
 * The section on positioning has moved to CSS Programming/Positioning.

The following section contains a list of some of the most common CSS properties. A complete list can be found here. The syntax for the use of CSS in an XML document is the same as that for HTML. The difference is in how you link your CSS file to the XML document. To do this you have to write before the root element of your XML document, where X.css of course is the name of the CSS file.

As mentioned earlier in this chapter, CSS is a set of rules that determines how elements in a document will be shown. The rule has two parts: a selector and a group of one or more declarations surrounded by braces (curly brackets):

 * selector { declaration; ...}

The selector is normally the tag you wish to style. Here is an example of a simple rule containing a single declaration:
 * h1 { color: red; }

Result: All h1-elements in the document are shown with the text color red.

The general syntax
Rules are usually defined like this:
 * selector { declaration; ...}

The declaration is formed like this:
 * property: value;

Remember that there can be several declarations in one rule. A common mistake is to mix up colons, which separate the property and value of a declaration, and semicolons, which separate declarations. A selector chooses the elements for which the rule applies and the declaration sets the value for the different properties of the elements that are chosen.

Back to our example:
 * h1 { color: red; }

In our example:

 * selector is the element h1
 * declaration color: red

The property color gets the value red

Multiple declarations can be written either on a single line or over several lines, because whitespace collapses:

 * h1 { color:red; background-color:white; }

or

 * h1 {
 * color:red;
 * background-color:white;
 * }

Details of the properties defined by CSS can be found at CSS Programming.

Summary
Cascading Style Sheets (CSS), are used with webpages to define the view of information saved in HTML or XML. While XML and HTML create and preserve a documents structure, CSS is used to define the appearance and placement of objects within the document as well as its content. All of this information is saved in a separate file, the .css file. In the CSS file are textsize, background color, text types, e.g defined. The placement of pictures and other animations are also defined in the css file. If CSS is used correctly it would make a webpage a lot easier to create and even more important, to maintain. Because you will only have to make changes in the css file to make the whole website change.

References and useful links

 * CSS Property Reference

References: Useful links:
 * http://no.wikipedia.org/ - The Norwegian version of Wiki
 * http://en.wikipedia.org/wiki/Cascading_Style_Sheets
 * W3C has a CSS validator, located at http://jigsaw.w3.org/css-validator/
 * w3cs pages about css
 * HTMLDog CSS Beginners Guide
 * CSS Zen Garden -- See whats possible with CSS
 * Cascading Style Sheet References -- L. Carlson, University of Minnesota Duluth.
 * Web Design Update - A a plain text email digest newsletter. It typically goes out once a week and has a section on CSS.  All web designers and developers are invited to join.
 * - Cascading Style Sheets Books

Exercise 1
Using the CSS file provided below, create a price list for books as an XML document.  Exercise1.css: Lord of the rings book{ display: block; background-color: transparent; margin: 20px 10px 10px 200px; } 1.000.56439 isbn{ display: block; font: 12pt/15pt georgia, serif; } The Two Towers title { display: block; font: 14pt/18pt verdana, sans-serif; } J.R.R. Tolkien author { display: block; font: italic 12pt/15pt georgia, serif; } Penguin author { display: block; font: 12pt/15pt georgia, serif; } 48 EUR price{ display: block; font: bold 12pt/15pt georgia, serif; color: #ff0000; background-color: transparent; }

Exercise 2
Create a personal homepage, where you introduce yourself.

The page should contain one header, one footer, and navigation as a list of links.

Solutions
Solutions

CSS Challenges
Copy and paste the HTML, then take up the challenge to create a stylesheet to match the picture!

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

title: XML - Managing Data Exchange/CSS


text:
DataPerfect/User Formulas

DataPerfect Formulas

Add months to a date value
Description

if day[P3F1] > day[last.day[(P3F1 + (P3F2 * (365 / 12)))]] then date[day[last.day[(P3F1 + (P3F2 * (365 / 12)))]]; month[(P3F1 + (P3F2 * (365 / 12)))]; year[(P3F1 + (P3F2 * (365 / 12)))]] else date[day[P3F1];((((month[P3F1] + P3F2) -1) // 12) + 1); (year[P3F1] + (P3F2 / 12))] endif

Notes about the formula

P3F1 = Original Date P3F2 = Month to Add

This formula equals day of month specified by # of months to add; however, if day of month is > destination month, then it is equal to the last day of the destination month.

You could also add an the actual number of months in replace of P3F2.

Calculate age to the month
Description

if month[today] > month[P#F#] then (year[today] - year[P#F#]) else ((year[today] - year[P#F#]) - 1) endif

Notes about the formula

P#F# = date field

Used to determine age to the month. With this formula, a person is not another year older until after the birthday month.

Calculate age to the year. (Estimated Calculation)
Description

((today - P#F#) / 365.25)

Notes about the formula

P#F# = Birthdate Field

Used to determine age to the year. Note: This formula may incorrectly state a person's age if the date is within a week of birthdate.

Calculate Exact Age to the day. (Most Accurate)
Description

if P#F# = 0 then 0 else month[today] cases case cv < month[P#F#] of year[today] - year[P#F#] - 1     endof case cv > month[P#F#] of year[today] - year[P#F#]         endof case cv = month[P#F#] of if  day[today] < day[P#F#] then year[today] - year[P#F#] - 1 else year[today] - year[P#F#] endif                              endof endcases endif

Notes about the formula

P#F# = Birthdate Field

Used to determine age to the year.

Convert date to numeric field (without dashes)
Description

convert["N999999"; cat.c[substring[apply.format["N9999";year[P#F#]];3;2]; apply.format["N99";month[P#F#]]; apply.format["N99";day[P#F#]]]]

Notes about the formula

P#F# = D99/99/9999 field.

This formula concatenates the year (only the last two digits), month, and day into a numeric (N999999) field with no dashes or hyphens. For example, 11/19/92 would appear as 921119.

Convert date to words and numbers
Description

cat.c[ day.of.week[P#F#] cases case cv = 1 of "Monday"   endof case cv = 2 of "Tuesday"  endof case cv = 3 of "Wednesday" endof case cv = 4 of "Thursday" endof case cv = 5 of "Friday"   endof case cv = 6 of "Saturday" endof case cv = 7 of "Sunday"   endof endcases; ", "; month[P#F#] cases case cv = 1 of "January"   endof case cv = 2 of "February"  endof case cv = 3 of "March"     endof case cv = 4 of "April"     endof case cv = 5 of "May"       endof case cv = 6 of "June"      endof case cv = 7 of "July"      endof case cv = 8 of "August"    endof case cv = 9 of "September" endof case cv = 10 of "October"  endof case cv = 11 of "November" endof case cv = 12 of "December" endof endcases;" " apply.format["GZ9";day[P#F#]]", "; apply.format["N9999";year[P#F#]]]

Notes about the formula

P#F# = date field.

This formula prints the date as month, day and year. For example, 11/19/92 would be printed as "November 19, 1992."

Convert day of week to wor
Description

day.of.week[P#F#] cases case cv = 1 of "Monday"   endof case cv = 2 of "Tuesday"  endof case cv = 3 of "Wednesday" endof case cv = 4 of "Thursday" endof case cv = 5 of "Friday"   endof case cv = 6 of "Saturday" endof case cv = 7 of "Sunday"   endof endcases

Notes about the formula

P#F# = date field.

This formula prints the day of the week as a word. For example, "November 19, 1992 - 1993.11.10 - would appear as "Thursday".

Convert month to string
Description

month[P#F#] cases case cv = 1 of "January"   endof case cv = 2 of "February"  endof case cv = 3 of "March"     endof case cv = 4 of "April"     endof case cv = 5 of "May"       endof case cv = 6 of "June"      endof case cv = 7 of "July"      endof case cv = 8 of "August"    endof case cv = 9 of "September" endof case cv = 10 of "October"  endof case cv = 11 of "November" endof case cv = 12 of "December" endof endcases

Notes about the formula

P#F# = date field.

This formula prints the date as month, day and year. For example, 11/19/92 would be printed as "November 19, 1992."

Convert string to date
Description

date[ if (convert["G9999";subfield[P#F#;' ';2]] > 31) then 1 else convert["G99";subfield[P#F#;' ';2]] endif; subfield[P#F#;' ';1] cases case cv = "January"  of  1 endof case cv = "February" of  2 endof case cv = "March"    of  3 endof case cv = "April"    of  4 endof case cv = "May"      of  5 endof case cv = "June"     of  6 endof case cv = "July"     of  7 endof case cv = "August"   of  8 endof case cv = "September" of 9 endof case cv = "October"  of 10 endof case cv = "November" of 11 endof case cv = "December" of 12 endof endcases; if convert["G9999";subfield[P#F#;' ';2]] > 31 then convert["G9999";subfield[P#F#;' ';2]] else convert["G9999";subfield[P#F#;' ';3]] endif]

Notes about the formula

Formula to convert date text to date. The formula will convert the date in an alpha field to a Julian date. A date entered in the alpha field such as : November 19, 1992 would appear in the date field as 11/19/1992. A subset of the month would also work, such as Nov 19, 1992. Optionally, the user may enter Nov 1992 and the formula will assume the first day of the month.

Extract last two digits from date field
Description

convert["N99";substring[apply.format["DYMD99/99/99";today];1;2]]

Notes about the formula

Use this formula on an N99 field to obtain the last two digits of the current year. To extract this from a date field, substitute the selected field for TODAY in the apply.format function.

Find leap year
Description

if (year[P1F1] // 4) = 0 then "Leap" else "not Leap" endif

Notes about the formula

P1F1 = Date field.

If the year is divisible by 400 (without a remainder) then the formula will return the word "Leap" meaning that it is a leap year; otherwise, the formula will return "not Leap" meaning that it is not a leap year.

Reverse date sort
Description

-today

Notes about the formula

The reverse date is used to sort records backwards so that the oldest date sorts to the bottom of a list and the most recent date sorts to the top. The formula is simply a minus sign (-) in front of a date field that has been selected in a formula. (Ie. -P1F1 if P1F1 is a date field.)

The reverse date can be useful for reports and for sorting records for display in a window. The field (format G-ZZZZ9) containing the formula is generally hidden so as to avoid end-user confusion. Do not forget the negative sign on the field format, or you will lose the inverse sort if you have to export and import records.

Example of nesting IF statements
Description

if P1F5 < 12 then "Good Morning" else if P1F5 >= 12 and P1F5 <= 17 then "Good Afternoon" else "Good Evening" endif endif

Notes about the formula

The IF statement assigns specific answers for specific conditions.

The Syntax: IF condition THEN expression [ELSE expression] ENDIF

Using the above syntax as an IF statement, any part of the formula within brackets [] is optional, A condition is a limited expression (in other words, it can only be an expression that produces either a true statement (1) or a false statement (0)).

The following rules apply to the IF statement: The condition must be true or false If the condition listed is 1 (true), then the expression following THEN is calculated by DataPerfect. If the condition is 0 (false), then the expression following ELSE is calculated. If there is not an ELSE, a new value is not returned.

P1F1 in the example above is a time field defined as TZ9:99. A data in a time field is stored in military time.

The statement above says, if the value in P1F1 is less than 12:00pm then insert the expression Good Morning. Otherwise if the value in P1F1 is greater than 12:00pm and less than 5:00pm (or in the range of these two times) then insert the expression of Good Afternoon. Otherwise if the value in the time field is less then 12:00pm then insert the expression "Good Morning"

Every IF statement must use ENDIF at the end of the formula. For every occurrence of an IF there must be a matching ENDIF and the end of the formula.

Extracting decimals.
Description

<##> // 1

Notes about the formula

<##> = a numeric value with a decimal.

This formula returns the decimal portion of the number. Example: If <##> contains the number 7.5476 the formula returns .5476.

Reverse digit orders.
Description

convert["N999"; cat.t[substring[apply.format["N999";P#F#];3;1]; substring[apply.format["N999";P#F#];2;1]; substring[apply.format["N999";P#F#];1;1]]]

Notes about the formula

P1F1 = N999 formatted field.

This formula reverses the order of data within a numeric field. Example: 201 becomes 102

Round up to the nearest nickel.
Description

round[P#F#+.02;.05]

Notes about the formula

P#F# = G or H formatted value.

Rounds field value up to the nearest nickel.

Example: 80.21 becomes 80.25, 80.26 becomes 80.30, 80.20 becomes 80.20.

Sum field value for records in a report.
Description

rv# + P#F#

Notes about the formula

P#F# = Field to be totaled. rv# = Report Variable wherein the formula is contained.

Report Variable # should be defined in the Report Body of the report. This variable will add the current value in rv# to the value in the field and store the results back into rv#. This is useful when a total of a field is needed for performing math functions in the Final Footer of the report.

Note: A couple of variations of this formula include the following:

rv# + 1  -- Counts the number of records in the report.

rv# = "Ü" -- Appends bars together. Using this in a sub-report or with a two-level footer can cause a bar-graph effect; just be careful to store a blank (" ") in the First Page Header (or Two-Level Header) to start the bar over again for the next sub-group.

Disjointed.
Description

if P#F# = "M" or P#F# = "F" then P#F# else " " endif

Or if you have more than two items on the list...

P#F# cases case cv = "Y" of "Y" endof case cv = "N" of "N" endof case cv = "U" of "U" endof default " " endcases

Notes about the formula

P#F# = the field with the formula.

Allows users to enter a limited range of data even when the range is not sequential. For example, in a gender field you only want an M or an F; but since M and F are not next to each other in the alphabet you cannot set a regular range check allowing only those two letters. This formula will allow only an M or F to be entered into the field. In the case statement you are allowing a "Y" for yes, an "N" for no, or a "U" for "Unknown." ::M can be added to the formula field's format to make entry of one of the choices mandatory.

Styles.
Description

P#F# cases case contains[cv;"group"]     of "group"     endof case contains[cv;"group/pip"] of "group/pip" endof case contains[cv;"group/wc"]  of "group/wc"  endof case contains[cv;"pip"]       of "pip"       endof case contains[cv;"wc"]        of "wc"        endof case contains[cv;"1"]         of "group"     endof case contains[cv;"2"]         of "group/pip" endof case contains[cv;"3"]         of "group/wc"  endof case contains[cv;"4"]         of "pip"       endof case contains[cv;"5"]         of "pip/wc"    endof case contains[cv;"6"]         of "wc"        endof case contains[cv;"g"]         of "group"     endof case contains[cv;"gp"]        of "group/pip" endof case contains[cv;"gw"]        of "group/wc"  endof case contains[cv;"p"]         of "pip"       endof case contains[cv;"pw"]        of "pip/wc"    endof case contains[cv;"w"]         of "wc"        endof endcases

Notes about the formula

This formula allows the user to enter the same data into a field using different symbols or abbreviations

Date and account number extractions.
Description

(P1F1 >= date[16;11;1992] and P1F1 <> date[20;11;1992]) and (convert["GZZZZZ9";P1F2] < 170000 or convert["GZZZZZ9";P1F2] > 180000) and convert["GZZZZZ9";P1F2] < 900000

Notes about the formula

P1F1 = Date Field P1F2 = Alpha Numeric Account Number

This formula extracts only those records which are dated 11/16/92 or later, except for those which are dated 11/20/92, and also have account numbers less than 170000 or greater than 180000, but less than 900000.

Find all records or specific records only.
Description

contains[P#F#;rv#]

Notes about the formula

P#F# = field to search. rv# = report variable prompted for.

Create a prompt for report variable that requests a value to search for or an asterisk (*) for all records. If a literal value is entered then DataPerfect will return all matching records, but if an asterisk is entered then all records will be printed.

Do not use a formula that reads P#F#=RV# instead of the contains function as DataPerfect will then look for an asterisk in the field contents. Using the contains[P#F#;rv#] tells the report to consider the asterisk a wildcard; and, therefore, to find all records.

Search for a wildcard character (* or ?).
Description

contains[P#F#;"|%$%*%"]

Notes about the formula

P#F# = Alphanumeric Field.

Searches for an "*" in the field.

Note: You can temporarily change the wildcard characters for contains functions. The pipe (|) indicates to DataPerfect that there will be a change. The next character represents the asterisk replacement and the third character represents the question mark replacement. In this example % = * and $ = ?.

Canadian postal codes.
Description

if P#F# = " " then " " else if (substring[P#F#;1;1] >= "A" and substring[P#F#;1;1] <= "Z") then if  (substring[P#F#;2;1] >= "0" and  substring[P#F#;2;1] <= "9") then if  (substring[P#F#;3;1] >= "A" and substring[P#F#;3;1] <= "Z") then if  (substring[P#F#;4;1] = " ") then if  (substring[P#F#;5;1] >= "0" and substring[P#F#;5;1] <= "9") then if  (substring[P#F#;6;1] >= "A"  and substring[P#F#;6;1] <= "Z") then if  (substring[P#F#;7;1] >= "0" and substring[P#F#;7;1] <= "9") then P#F# else " " endif else " " endif else " " endif else " " endif else " " endif else " " endif else " " endif endif

Notes about the formula

P#F# = Postal code field.

This formula is designed to check the data entered in a Canadian postal code field. It confirms that the correct sequence of characters is entered in the field. (For example, A#A #A# where A = an alpha character and # equals a numeric value. Notice that there is a space between the two sets of three characters.)

Capitalize first character of every word.
Description

Note: This result can now be simply accomplished by using the function icaps[P#F#]. It is included here for reference purposes.

cat.t[apply.format["U1";P#F#]; substring[P#F#;2;length[subfield[P#F#;" ";1]]];" "

apply.format["U1";subfield[P#F#;" ";2]]; substring[subfield[P#F#;" ";2];2;length[subfield[P#F#;" ";2]]];" "

apply.format["U1";subfield[P#F#;" ";3]]; substring[subfield[P#F#;" ";3];2;length[subfield[P#F#;" ";3]]];" "

apply.format["U1";subfield[P#F#;" ";4]]; substring[subfield[P#F#;" ";4];2;length[subfield[P#F#;" ";4]]];" "

apply.format["U1";subfield[P#F#;" ";5]]; substring[subfield[P#F#;" ";5];2;length[subfield[P#F#;" ";5]]]" ";

substring[P#F#;((length[subfield[P#F#;" ";1]] + length[subfield[P#F#;" ";2]] + length[subfield[P#F#;" ";3]] + length[subfield[P#F#;" ";4]] + length[subfield[P#F#;" ";5]]) + 5);40]]

Notes about the formula

P#F# = the field that the text string is in.

This formula will uppercase the first character of every word for the first five words in a text string. After the fifth word it will append the remaining text back onto the end of the string. If you wish to increase the number of words that at capitalized then you will need to add another repetition of the "apply.format..." string. This needs to come before the final substring function set. The third argument of the subfield function needs to increase by one for each repetition. Also a change would need to be made to the last line of the above formula to read "+ #" where # equals the number of words that you are changing and "40" equals the field length.

Capitalize the first letter of a field.
Description

apply.format["U1";P#F#]substring[P#F#;2;29]

Notes about the formula

P#F# = A30 field

This formula changes the first letter to uppercase and then appends the rest of the field contents. The first letter, if it is not already uppercase, will not become uppercase until [Tab] is pressed to move off the current field (numbers will be unchanged). Arg3 in the substring code should be equal to one less than the field length.

Determine Country.
Description

if substring[P#F#;1;1] >= "A" and  substring[P#F#;1;1] <= "Z" then "Canada" else "USA" endif

Notes about the formula

P#F# = Alphanumeric field wherein a ZIP/postal code is stored. (A U10 works nicely.)

Determines if the first character of the code is an alpha character. If it is, then the country is Canada; otherwise it is USA.

Dot Leaders.
Description

cat.t[P#F#;if (length[P#F#] // 2) = 1 then " " else "." endif " . . . . . . . . . . . . . . . . . . . . . . . ."]

Notes about the formula

P#F# = As long as you want as long as there are more than enough dots concatenated onto the end that you don't run out when you print/display the contents of the field.

This formula concatenates the string in P#F# with a dot leader. If the contents of P#F# has an odd number of characters in it then there will be two spaces between the string and the dots, otherwise there will only be one space. (Note: This is accomplished by not putting a semicolon after the "endif" end before the dots.)

Extract from phone number field.
Description

substring[apply.format["N(999)999-9999";P#F#];2;3]

Notes about the formula

P#F# = Phone Number Field.

This formula converts a numeric field to text using apply.format and then extracts the area code only using the substring function.

Remove leading blanks from an alphanumeric field
Description

apply.format["A40;;B";P#F#]

Notes about the formula

P#F# = A40 field.

This formula is used in a report variable in the report body of a report. It is used to correct data that has been incorrectly entered by adding blanks to the beginning of a string. The formula simply takes the string in P1F1 and truncates and leading blanks. This report variable should then be stored back into the field from whence it came.

Calculate hour.
Description

now / 3600

Notes about the formula

Time fields are stored in seconds. To convert the value of a time to hours, divide the value by 3600 (the number of seconds in an hour).

Convert military to regular time (string format).
Description

P#F# cases case cv < 3600 of cat.t[apply.format["TZ9:99";(P#F#+43200)];"am"] endof case cv < 43200 of cat.t[apply.format["TZ9:99";P#F#];"am"] endof case cv < 46800 of cat.t[apply.format["TZ9:99";P#F#];"pm"] endof default cat.t[apply.format["TZ9:99";(P#F#-43200)];"pm"] endcases

Notes about the formula

This formula needs to be entered on an alphanumeric i.e. A7 field.

P#F# = Time Field (TZ9:99)

If the time field is zero it is 12:00am. (Time fields store their values as the total number of seconds since 12 midnight.) If the time entered is over 12:00 hours, it will subtract 12 hours from the time and add "pm" to the displayed time. (Eg. 13:00 is converted to 1:00pm, 14:00 is converted to 2:00pm, etc.)

Source notes
This wiki page ws generated from the DataPerfect FORMULA database. The formatting for the formula descriptions have been revised.

title: DataPerfect/User Formulas


text:
Graphic Design/Web Design

Today, Web site Design is a very important part of current Graphic Design. The Eight C's of web design are basic things to keep in mind while designing web sites. These eight tips could also apply to other parts of Graphic design.

Eight C's of website design

 * Context - Aesthetic and functional look and feel - contemporary, traditional, hip, edgy, utilitarian, emotional -- the "how" of site design. Color, humor, focus, graphics.
 * Content - Any digital subject matter on the site: text, video, audio, and graphics -- the "what" of site design.
 * Community - A feeling of membership in a group and a strong sense of involvement; shared common interests -- the "why" of site design.
 * Customization - The site's ability to tailor itself to a user or to be personalized by each user -- the "touch" of site design.
 * Communication - Dialog between the site and the user -- the "muscle" of site design.
 * Connection - Extent of formal linkages between the site and other sites -- the networking of site design. This is becoming very important as people are becoming more comfortable with using web sites to gather information and make purchases.
 * Commerce - The actual sale of goods and services on the site -- the commerce of site design. If the primary focus of the web site is to sell, this becomes paramount to the design.
 * Color - Colors should be chosen to properly inspire feelings in a viewer. For example, a law firm that wants to set a trusting tone may use dark blues. Text must also contrast with background for easy reading.

For further reading

 * Web Design

title: Graphic Design/Web Design


text:
DataPerfect/Functions

{| width="750"" align="center" border="0" DataPerfect Functions
 * - valign="top"
 * align="center" colspan="2" |
 * - valign="top"
 * colspan="2" |

Absolute Value
Syntax abs[arg] Related Functions Example Call Description Abs is used to obtain the absolute (positive) value of a number (where arg = any G or H formatted number). Example abs[-1] -- Returns 1
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * abs[-5.73]
 * - valign="top"
 * - valign="top"

abs[1]  -- Returns 1

abs[45] -- Returns 45

abs[-45] -- Returns 45
 * - valign="top"
 * colspan="2" |

Apply Text Format to Numeric Values
Syntax apply.format[arg1;arg2] Related Functions convert Example Call apply.format["N9999";year[today]] Description Apply.format is used to convert any numeric data type (formats N, G, H, D, and T) into alphanumeric (formats U and A) text where arg1 = the field format that the data is coming from and arg2 = the numeric to be converted. Example If P1F1 is a numeric field with the format "N(999)999-9999" and has a value of 8003213249 then apply.format["N(999)999-9999";P1F1] will return the string "(801)321-3249".
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * colspan="2" |

Bell
Syntax Bell[arg] Related Functions Example Call Bell[1] Description The Bell formula function will beep if the specified value is not empty or null. Example If you have a field that is used to mark outdated records (blank if current, filled if outdated) and you want to verify that all records that are outdated have been deleted, you can run a report that checks that field and beeps if it encounters anything in that field. If all records are current, you won't hear any beeps during the report, but if something was left behind, the computer will beep.
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * colspan="2" |

Concatenate, No Truncate
Syntax cat.c[arg1;arg2;...;argn] Related Functions cat.t Example Call cat.t[P1F1;1;apply.format["N99999";P1F5]] Description Cat.c is used to concatenate two or more character strings without truncating blank spaces. The arguments can be any string contained within quotes (either single (') or double (") quotes), a field/rv/formula containing alphanumeric data, or an integer indicating the number of carriage returns to insert into the text. Example If P1F1 = "Hello" and P1F2 = "There" then cat.c[P1F1;" ";P1F2;" This is a test!"] will return the string "Hello There This is a test!".
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * colspan="2" |

Concatenate, Truncate
Syntax cat.t[arg1;arg2;...;argn] Related Functions cat.c Example Call cat.t["This is a test";1;P1F1;rv0] Description Cat.t is used to concatenate two or more character strings, truncating blank spaces. The arguments can be any string contained within quotes (either single (') or double (") quotes), a field/rv/formula containing alphanumeric data, or an integer indicating the number of carriage returns to insert into the text. Example If P1F1 = "Hello " and P1F2 = "There  " then cat.t[P1F1;" ";P1F2;"This is a test! "] will return the string "HelloThereThis is a test!".
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * colspan="2" |

Contains
Syntax contains[arg1;arg2] Related Functions   Example Call contains[P1F2;"*DataPerfect*"] Description Contains searches alphanumeric and text fields for a specified string. Arg1 is the field/rv/string to be searched and arg2 is the string to be searched for. Returns the integer 1 if the search is successful or a 0 if it is not. Strings to be searched for should be enclosed in quotes if a hard-coded string; otherwise search strings may come from report variables or fields. Wild cards (asterisks or question marks) may be used to find strings within text in a field, otherwise the string searched for will have to be the only thing in the field. Example If P1F1 = an alphanumeric or text field and "*sold*" is the search string, then contains[P1F1;"*sold*"] will return a 1 (true) if the string "sold" exists anywhere in P1F1 or 0 (false) if it does not. If the string "sold*" is used, it will be found only if the string exists at the beginning of the field.
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * colspan="2" |

Convert Text to Number
Syntax convert[arg1;arg2] Related Functions apply.format Example Call convert["N9999";P1F1] Description Convert is used to change character strings into numbers (G, H, T, D, or N format). Arg1 = the field format that the string is to go to while arg2 = a string value that is to be converted. Example If P1F1 is an alphanumeric field and contains the string "123456" then convert["G$ZZZ,ZZ9.99";P1F1] will return the numeric value 123456.00 (or $123,456.00 when displayed in the field).
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * colspan="2" |

Date
Syntax date[arg1;arg2;arg3] Related Functions date related functions Example Call date[day[P1F1];month[today];yearrv1 Description The date function is used to combine three numbers representing a day (arg1), month (arg2) and year (arg3) into a single Julian date value (the total number of days since March 1, 1900). Example If the function day[P1F1] returns a value of 19 and P1F2 contains the value 11 then date[day[P1F1];P1F2;1992] will return a value of 33,866, or a date of 1992.11.19.
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * colspan="2" |

Day
Syntax day[arg] Related Functions day.of.week,month,year Example Call day[today] Description The day function produces the day of the month (a number from 1 to 31) of the date stored in arg1 where arg1 is a field, report variable or the today function. Example If P1F1 is a date field with the value 1992.11.19 then day[P1F1] will return the value 19.
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * colspan="2" |

Day of Week
Syntax day.of.week[arg] Related Functions day, month, year Example Call day.of.week[today] Description The day.of.week function produces the day of the week (a number from 1 to 7 where 1 = Monday and 7 = Sunday) of the date stored in arg1 where arg1 is a field, report variable or the today function. Example If P1F1 is a date field with a value of 1992.11.19 then day.of.week[P1F1] will return the value 4 (Thursday).
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * colspan="2" |

Exponent
Syntax exp[arg] Related Functions The Exponentiation formula function (exp[x]) returns the logarithmic exponent of x (e^x). Example exp[2] returns 7.39 (approximately).
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * Example Call
 * exp[2]
 * - valign="top"
 * Description
 * Description
 * - valign="top"
 * - valign="top"
 * colspan="2" |

First Day of Month
Syntax first.day[arg] Related Functions date, last.day, first.nday Example Call first.day[P1F1] Description The first.day function returns the date of the first day of any given month (represented as "arg" above where arg = a value with a date format). Example P1F1 is a date field and has the value of 1992.11.19 then first.day[P1F1] will return a value of 1992.11.01 (November 1, 1992), the first day of November 1992.
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * colspan="2" |

First Weekday of Month
Syntax first.nday[arg1;arg2] Related Functions date, first.day, last.day Example Call first.nday[7;P1F1] Description The first.nday function returns the date of the first given weekday (represented by "arg1" above) of any given date (represented as "arg2"). Arg1 = a number from 1 (Monday) to 7 (Sunday) representing the days of the week. Arg2 = a value with a date format. Example If P1F1 is a date field with the value 1992.11.19 then first.nday[4;P1F1] will return 1992.11.05 (November 5, 1992), the first Thursday of the month.
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * colspan="2" |

Future Value
Syntax fv[i;pv;pmt;n;type] Related Functions pv, pmt, rate Example Call fv[(.08/12);-100;40;2;1] Description This function returns the future value based upon data provided [interest rate, present value, payment amount, number of periods, and type (0=investment/growth or 1=depreciation/loan)]. Example If you have a loan at 8%, your balance due is $100.00, you pay 40.00 per month, and you want to know your balance after 2 more payments, you would enter fv[.08/12);-100;40;2;1]; your balance after 2 payments will be $20.54
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * colspan="2" |

Initial Caps
Syntax icaps[text] Related Functions Lower Case Example Call icaps[P2F3] Description Capitalizes the first character of each word in fixed length alphanumeric and open-ended text fields. Example icaps["hello jane"] gives "Hello Jane"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"

icaps["JOHN JONES"] gives "JOHN JONES"

icaps[lower.case["JOHN JONES"] gives "John Jones"
 * - valign="top"
 * colspan="2" |

Last Day of Month
Syntax last.day[arg] Related Functions date, first.day, first.nday Example Call last.day[P1F1] Description The last.day function returns the date of the last day of any given month (represented as "arg" above where arg = a field, report variable or formula that returns a date value). Example If P1F1 is a date field and has the value 1992.11.19 then last.day[P1F1] will return a value of 1992.11.30 (November 30, 1992), the last day of November 1992.
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * colspan="2" |

Last Weekday of Month
Syntax last.nday[arg1;arg2] Related Functions date, first.day, first.nday Example Call last.nday[7;P1F1] Description The last.nday function returns the date of the last given weekday (represented by "arg1" above) of any given date (represented as "arg2"). Arg1 = a number from 1 (Monday) to 7 (Sunday) representing the days of the week. Arg2 = a value with a date format. Example If P1F1 is a date field with the value 11/19/92 then last.nday[7;P1F1] will return 11/29/92 (November 29, 1992), the last Sunday of the month.
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * colspan="2" |

Length of String
Syntax length[arg] Related Functions   Example Call length["This is a test!"] Description Length returns a number that is equal to the number of characters in any given string after truncating the trailing blanks. "Arg" can be a field, report variable or formula returning a string of characters. The maximum value of length[arg] is 78; there appear to be some problems in using length[] with text fields. Example length["Arizona   "] returns a 7. length["Ryan Davis"] returns a 10.
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * colspan="2" |

Logarithm, Natural
Syntax ln[arg] Related Functions   Example Call ln[11] Description The Logarithm formula function (ln[x]) returns the natural logarithm of the specified number (log of x to base e). Example ln[11] returns 2.4 (approximately)
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * colspan="2" |

Lower case
Syntax lower.case[arg] Related Functions Initial caps Example Call lower.case["LOWER CASE"] Description Converts fixed length alphanumeric and open-ended text fields to all lower case characters. Example lower.case["LOWER CASE"] returns "lower case"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * colspan="2" |

Maximum Value
Syntax max[arg1;arg2;...argn] Related Functions min Example Call max[P1F1;14;(3*7);rv0] Description Max is used to extract the largest value from a range of values ("arg1," "arg2" and "argn" above). The arguments can be numeric OR string values, but both types should not be used in the same function. Max will extract the value of the argument with the highest value. Max is not case sensitive. Example max[sqrt[100];17;(4*3)] will return a 17.
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"

max["Ray";"Kevin";"Craig";"Christi";"Rick";"Jill"] returns "Rick"
 * - valign="top"
 * colspan="2" |

Minimum Value
Syntax min[arg1;arg2;...argn] Related Functions max Example Call min[P1F1;14;(3*7);rv0] Description Min is used to extract the smallest value from a range of values ("arg1," "arg2" and "argn" above). The arguments can be numeric OR string values, but both types should not be used in the same function. Min will extract the value of the argument with the lowest value. Min is not case sensitive. Example min[sqrt[100];17;(4*3)] will return a 10.
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"

min["Ray";"Kevin";"Craig";"Christi";"Rick";"Jill"] returns "Christi"
 * - valign="top"
 * colspan="2" |

Modulo
Syntax // Related Functions round Example Call 10 // 3 Description Returns the remainder of a division equation. Example 10 // 4 - Returns 2
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"

10 // 3 - Returns 1

10 // 2 - Returns 0
 * - valign="top"
 * colspan="2" |

Month
Syntax month[arg] Related Functions day, day.of.week, year Example Call month[today] Description The month function produces the number of the month (a number from 1 (January) to 12 (December)) of the date stored in arg1 where arg1 is a field, report variable or the today function. Example If P1F1 is a date field with a value of 1992.11.19 then month[P1F1] will return an 11 (November).
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * colspan="2" |

Now
Syntax now Related Functions today Example Call now Description Now is used to retrieve the system time (returned as the number of seconds since 12a) from the computer's internal clock. Example If the system time is 16:53:34 (4:53p) then now will return 60,814, or 16:53:34 in a time (T99:99:99) formatted field.
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * colspan="2" |

Payment
Syntax pmt[i;pv;n;fv;type] Related Functions pv, fv, rate Example Call pmt[(.075/12);-4000;24;0;1] Description This function returns your payment based upon the data provided [interest, present value, number of periods, future value, type (0=investment/growth or 1=depreciation/loan)]. Example To learn how much you need to pay each month to retire a $4000 loan at 7.5 interest in 2 years, you would enter pmt[(.075/12);-4000;24;0;1] (you will need to make monthly payments of $178.88).
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * colspan="2" |

Power
Syntax ^ Related Functions sqrt Example Call 10^2 Description Raises a value to the given exponential power. Example 10^2 - Returns 100
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"

10^3 - Returns 1000

10^4 - Returns 10000
 * - valign="top"
 * colspan="2" |

Present Value
Syntax pv[i;pmt;n;fv;type] Related Functions pmt, fv, rate Example Call pv[(.06/12);0;240;500000;0] Description This function returns the present value based upon the data provided [interest rate, payment amount, number of payments, future value sought, and type (0=investment/growth or 1=depreciation/loan)]. Example To learn how much money you will need to deposit into a savings account so that, without depositing any more money, you will have $500,000 in the bank in 20 years (assuming you're guaranteed 6% interest), you can enter pv[(.06/12);0;240;500000;0]. You will find that $151,048.07 will grow to $500,000 in 20 years at 6% interest.
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * colspan="2" |

Rate
Syntax Rate[pv;pmt;n;fv;type] Related Functions pv, pmt, fv Example Call rate[-500;50;12;600;1] Description The function returns the effective interest rate based upon the data provided [present value, payment amount; number of payments, future value, and type (0=investment/growth or 1=depreciation/loan)]. Example To learn the interest rate you were charged after you made 12 $50 payments on a 12-month, $500 loan, you will enter rate[-500;50;12;600;1] (you paid a little over 12% interest).
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * colspan="2" |

Round
Syntax round[arg1;arg2] Related Functions // Example Call round[P1F1;.25] Description Rounds a number to the nearest indicated value where arg1 = the numeric (G or H format) value to be rounded and arg2 = the value to round up/down to. Example round[4.5;1]          -  Returns 5.
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"

round[54.123432;.001] -  Returns 54.123

round[55.345;.25]     -  Returns 55.25

round[12347;50]       -  Returns 12350
 * - valign="top"
 * colspan="2" |

Square Root
Syntax sqrt[arg] Related Functions ^ (power) Example Call sqrt[(rv1*5)] Description Computes the square root of the absolute value of a number (i.e. if the number is negative, it is first made positive) where arg = a number (G or H format) field, report variable, formula or value to find the square root of. Example sqrt[4]    -  Returns 2.
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"

sqrt[65.3] -  Returns 8.08.

sqrt[-65.3] - Returns 8.08.
 * - valign="top"
 * colspan="2" |

Subfield
Syntax subfield[arg1;arg2;arg3] Related Functions   Example Call subfield[P1F1;" ";1] Description Produces the nth word (determined by the value in arg3) in the string (arg1) if the mask (arg2) is empty or " ". Produces the nth (arg3) word bracketed by any of the characters in the mask (arg2). Example subfield["Christine C. Babbitt";" ";2] returns a value of "C.".
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"

subfield["(602) 123-4567";'- )(';1] returns a value of "602".

(Note that the number shown is considered text, not an N, G, or H value.)
 * - valign="top"
 * colspan="2" |

Substring
Syntax substring[arg1;arg2;arg3] Related Functions apply.format Example Call substring[P1F1;2;14] Description Returns a specified number of characters from a text string starting at a specified location in the string. (Where arg1 = the field, report variable, formula, or text string to pull the new string from; arg2 = the starting location to parse from; and arg3 = the number of characters to cut out of the string.)
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"

If you enter a value of 1 or more for arg2, DataPerfect starts counting at the left of the string and counts from left to right. If you enter a value of 0 for arg2, DataPerfect counts characters from right to left. Example substring["Example";3;5] will return "ample"
 * - valign="top"

If P1F2 = a numeric field formatted N(999)999-9999 with a value of 8003213249 then substring[apply.format["N(999)999-9999";P1F2];2;3] will return 800 (the area code).

substring[" 215 Oak Lane, Hartford, CT";0;2]

This formula will return the string "CT"
 * - valign="top"
 * colspan="2" |

Term
Syntax term[i;pv;pmt;fv;type] Related Functions pmt, pv, fv, rate Example Call term[(.05/12);0;165;-1000;0] Description This function returns the number of periods (remaining or projected), based upon the data provided [interest rate, present value, payment amount, future value, and type (0=investment/growth or 1=depreciation/loan)]. Example To learn how long it will take you to save $1000 of you deposit $165 per month and earn 5% interest (and start with a zero balance), you would enter term[(.05/12);0;165;-1000;0)] (you will have a little over $1000 in 6 months).
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * colspan="2" |

Today
Syntax today Related Functions now Example Call today Description Today returns the system date (from the computer's internal clock) in a Julian numeric format (i.e. the number of days since March 1, 1900. When stored in a date field format this number is automatically translated to the appropriate month/day/year.  The today function is generally used as arguments in other functions and formulas. Example If the system date is 11 Nov 92 then today will return 33,866, or 1992.11.19 in a date (DYMD9999.99.99) formatted field.
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * colspan="2" |

Truncate
Syntax truncate[arg] Related Functions cat.t Example Call truncate[P1F1] Description Truncate removes all trailing spaces from a character string. Example truncate["Shauna        "] will return "Shauna."
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"

A text string can be created by using consecutive truncate functions (i.e. truncate[P1F2] truncate[P1F3]) but it is generally best to use the cat.t function instead.
 * - valign="top"
 * colspan="2" |

Unary Minus
Syntax - Related Functions   Example Call -P1F1 Description Returns the negative value of any number. Example If P1F1 = 10 then -P1F1 returns -10.
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"

If today = 1992.11.19 then -today returns -33,866.

(This is good for sorting records with the most recent date to the top of the list. See "Reverse Date" in the formulas section of this database.)
 * - valign="top"
 * colspan="2" |

Year
Syntax year[arg] Related Functions day, day.of.week, month Example Call year[P1F1] Description Year returns the 4 digit year (i.e. 1992) in a numeric format from a date value. Example If P1F1 is a date field with the value 1992.11.19 then year[P1F1] will return the numeric value 1992 which could then be stored in an N9999 field.
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"
 * - valign="top"

Some other acceptable formats include the following: year[rv1], year[date[19;11;1992]] and year[today].
 * - valign="top"
 * colspan="2" |

Source notes
This wiki page was generated from the DataPerfect FORMULA database.
 * }

title: DataPerfect/Functions


text:
Talk:The Design and Organization of Data Centers/Location

I like this book idea, this is something that I might be able to help with, unlike most of the other subjects. My background is in network engineering, but I must admit that I have only designed a few data centers, and they were not big and serious like what you are listing here.

I have observed this done wrong; once a client had their racks installed so close to the wall that we couldnt easily get behind the racks to deal with the (never ending) cable hassles.

I found a $50 portable label machine to be my best friend. I like to tape a copy of the network map right onto the wall, and have a pencil (with eraser) velcro'ed to it. I encourage others to "write on the map any time", and we occasionally update it. The map has the file path listed (not a URL of course) on it. "revised [date]" is below the title of every map.

I'm more of the networking guy than a contractor that does this type of work, but let me know if there is anything somebody like me can add to this book. note, I have not read thru it fully.

Definately remind the reader that documentation is "billable hours", so they are financially modivated to do what we are notorious for putting off. I like to tell clients "if I do my job correctly, I can get hit by a bus and my office can burn down, and you will have most of the information you need already documented by me, you will not discover after the fact that it's all stored in my head and what you have is obsolete. Therefore you will see me take time to document things. Computer folks are notorious for procrastinating when it comes to documenting a constantly changing network"

--

Please, have at it! One of the largest parts of the book is the organization and documentation sections.

Jeff Albro


text:
Cookbook:Jam (recipe)

Ingredients

 * 2 cups soft, fleshy fruit like strawberries, peaches, cherries, plums, blueberries, blackberries, raspberries, etc.
 * ¼ cup or less lemon juice
 * ½ teaspoon of butter
 * 1 cup white granulated sugar (or 3 cups for bitter or sour fruits)
 * Pectin (optional)

Procedure

 * 1) Clean the fruit, remove any stones, leaves, or other inedible parts, and wash it. If the fruit is not a small berry, then cut it up into small pieces.
 * 2) Crush the fruit, then sprinkle with lemon juice and butter and stir well.
 * 3) Pour the mixture into a sufficiently large cooking pot. Traditionally a copper pot is used, but any other cooking pot will do fine.
 * 4) Bring the mixture slowly to the boil on a full rolling boil, stirring regularly. Pour in sugar, and add pectin if needed.
 * 5) Depending on the fruit, you will need to boil the mixture for about an hour. The jam is ready when it is thick enough. Check this by pouring a drop of the jam onto a cold plate. It should turn sticky and not be too runny.
 * 6) To preserve the jam well, you should pour it into glass flasks or containers that have been sterilized by boiling them in water. You can also pasteurize the containers by washing them with boiling water. The inside of lids as well as the flasks should be washed if the latter method is used. The jam should be poured rapidly into the still-hot containers. The containers should be sealed with lids. In this case it's best to let the air bubble that is in the flask traverse the still-hot jam by turning it upside-down after the lid has been placed on. This is to disinfect the air bubble. Or, instead of a lid, the jam can be protected by pouring molten paraffin on top of it, and closing of the jar with a paper that is held with a rubber band.
 * 7) Serve with bread, toast, English muffins, or pancakes.

ספר מתכונים/ריבות וג'לי Kookboek/Confituur

title: Cookbook:Jam (recipe)