Search This Blog

Most Viewed

Thursday, March 24, 2011

Create A Virtual Drive in Windows

virtual drive in computing is a device that to the operating system appears to be an ordinary physical disk drive, with disc images substituted for disc reading hardware through the use of software called a disk emulator.

In Windows there is subst command which make a virtual drive for you. Here is all information about subst command.


About subst

Allows you to substitute a folder on your computer for another drive letter. Use the SUBST command to substitute a drive letter for a path in order to treat a virtual drive (a reserved area rather than an actual disk drive) as a physical drive. 

In order to enter drive designations using any letter (other than just the letters for the physical drives installed in your computer), you may have to add this line to a CONFIG.SYS file that should be placed in the root directory of your startup drive:

Availability

The subst.exe command is an external command that is available in the below Microsoft operating systems.



Syntax

subst [drive1: [drive2:]Path]
subst drive1 : /d

Parameters


drive1 :   Specifies the virtual drive to which you want to assign a path.
drive2 Specifies the physical drive that contains the specified path (if different from the current drive).
Path   Specifies the path that you want to assign to a virtual drive.
/d   Deletes a virtual drive.
/?   Displays help at the command prompt.


Examples

To create a virtual drive Z for the path D:\music\movies\zaher, type:
"subst z: D:\music\movies\zaher"


"
Now, instead of typing the full path, you can reach this directory by typing the letter of the virtual drive, followed by a colon, as follows:
z:

Remarks

  • The following commands do not work, or should not be used, on drives used in the subst command:
    • chkdsk 
    • diskcomp 
    • diskcopy 
    • format 
    • label 
    • recover
The drive1 parameter must be within the range specified by the lastdrive command. If not, subst displays the following error message:
Invalid parameter - drive1:

Other Tools for Virtual Drive:





Thursday, March 17, 2011

New Hubble Observations Nix Theory That an Enormous Bubble Eight-Billion Light-years Across Surrounds our Galactic Neighborhood


Epic Discovery: New Hubble Observations Nix Theory That an Enormous Bubble Eight-Billion Light-years Across Surrounds our Galactic Neighborhood

 Spiralgalaxyngc5584andsn2007
Astronomers using NASA's Hubble Space Telescope have ruled out an alternate theory on the nature of dark energy after recalculating the expansion rate of the universe to unprecedented accuracy nixing the theory that an enormous bubble of relatively empty space eight billion light-years across surrounds our galactic neighborhood. If we lived near the center of this void, observations of galaxies being pushed away from each other at accelerating speeds would be an illusion.
Led by Adam Riess of the Space Telescope Science Institute (STScI) and Johns Hopkins University, the Hubble observations were conducted by the SHOES (Supernova Ho for the Equation of State) team that works to refine the accuracy of the Hubble constant to a precision that allows for a better characterization of dark energy's behavior.

The observations helped determine a figure for the universe's current expansion rate to an uncertainty of just 3.3 percent. The new measurement reduces the error margin by 30 percent over Hubble's previous best measurement of 2009.

The value for the expansion rate is 73.8 kilometers per second per megaparsec. It means that for every additional million parsecs (3.26 million light-years) a galaxy is from Earth, the galaxy appears to be traveling 73.8 kilometers per second faster away from us.

Every decrease in uncertainty of the universe's expansion rate helps solidify our understanding of its cosmic ingredients. Knowing the precise value of the universe's expansion rate further restricts the range of dark energy's strength and helps astronomers tighten up their estimates of other cosmic properties, including the universe's shape and its component of neutrinos, or ghostly particles, that filled the early universe.

"We are using the new camera on Hubble like a policeman's radar gun to catch the universe speeding," Riess said. "It looks more like it's dark energy that's pressing on the gas pedal."

Dark energy is one of the greatest cosmological mysteries in modern physics. Even Albert Einstein conceived of a repulsive force, called the cosmological constant, which would counter gravity and keep the universe stable. He abandoned the idea when astronomer Edwin Hubble discovered in 1929 that the universe is expanding. Observational evidence for dark energy didn't come along until 1998, when two teams of researchers (one led by Riess) discovered it.

This image at bottom of page shows the location of Cepheid variables found in the spiral galaxy NGC 5584. Ultraviolet, visible, and infrared data taken with Hubble's Wide Field Camera 3 in 2010 reveals Cepheids of varying periods. Those stars with periods of less than 30 days and between 30 and 60 days are marked with blue and green circles, respectively. A small number of Cepheids, with periods larger than 60 days, are marked in red.

The idea of dark energy was so far-fetched, many scientists began contemplating other strange interpretations, including the cosmic bubble theory.

In the bubble theory, the lower-density bubble would expand faster than the more massive universe around it. To an observer inside the bubble, it would appear that a dark-energy-like force was pushing the entire universe apart. The bubble hypothesis requires that the universe's expansion rate be much slower than astronomers have calculated, about 60 to 65 kilometers per second per megaparsec. By reducing the uncertainty of the Hubble constant's value to 3.3 percent, Riess reports that his team has eliminated beyond all reasonable doubt the possibility of that lower number.

"The hardest part of the bubble theory to accept was that it required us to live very near the center of such an empty region of space," explained Lucas Macri, of Texas A&M University in College Station, a key collaborator of Riess. "This has about a one in a million chance of occurring. But since we know that something weird is making the universe accelerate, it's better to let the data be our guide."

Using stars as "cosmic yardsticks" measuring the universe's expansion rate is a tricky business. Riess' team first had to determine accurate distances to galaxies near and far from Earth. The team compared those distances with the speed at which the galaxies are apparently receding because of the expansion of space. They used those two values to calculate the Hubble constant, the number that relates the speed at which a galaxy appears to recede to its distance from the Milky Way.

Because astronomers cannot physically measure the distances to galaxies, researchers had to find stars or other objects that serve as reliable cosmic yardsticks. These are objects with an intrinsic brightness, brightness that hasn't been dimmed by distance, an atmosphere, or stellar dust, that is known. Their distances, therefore, can be inferred by comparing their true brightness with their apparent brightness as seen from Earth.

Among the most reliable of these cosmic yardsticks for relatively shorter distances are Cepheid variables, pulsating stars that dim and fade at rates that correspond to their intrinsic luminosity. But Cepheids are too dim to be found in very distant galaxies. To calculate longer distances, Riess' team chose a special class of exploding stars called Type Ia supernovae.

These stellar explosions all flare with similar luminosity and are brilliant enough to be seen far across the universe. By comparing the apparent brightness of Type la supernovae and pulsating Cepheid stars, the astronomers could measure accurately their intrinsic brightness and therefore calculate distances to Type Ia supernovae in far-flung galaxies.

Using the sharpness of the new Wide Field Camera 3 (WFC3) to study more stars in visible and near-infrared light, scientists eliminated systematic errors introduced by comparing measurements from different telescopes.

"The camera on Hubble, WFC3, is the best ever flown on Hubble for making these measurements, improving the precision of prior measurements in a small fraction of the time it previously took," Riess said.

The astronomer hopes that Hubble will continue to be used in this way to reduce the uncertainty in the Hubble constant even more, and thus refine the measured properties of dark energy. He suggests the present uncertainty could be cut in two before Hubble gives way to improvements out of Hubble's reach but within the scope of the James Webb Space Telescope, an infrared observatory scheduled to launch later this decade.

Chasing a runaway universe, Riess has been pursuing dark energy for 13 years. He co-discovered the existence of dark energy by finding that distant Type Ia supernovae were dimmer than expected, which meant they were farther away than anticipated. The only way for that to happen, Riess realized, was if the expansion of the universe had sped up some time in the past.

Until that discovery, astronomers had generally believed that the cosmic expansion was gradually slowing down, due to the gravitational tugs that individual galaxies exert on one another. But the results implied that some mysterious force was acting against the pull of gravity, shoving galaxies away from each other at ever-increasing speeds.

Riess decided that one of the best ways to tighten the constraints on dark energy is to determine an accurate value for the Hubble constant, which he has been doing with the Hubble Space Telescope. That measurement, combined with others from NASA's Wilkinson Microwave Anisotropy Probe (WMAP), traces the universe's behavior from nearly the dawn of time to the present age. (WMAP showed the universe as it appeared shortly after the Big Bang, before stars and galaxies formed.)

Riess is just one of many astronomers who, over the past 80 years, have been measuring and re-measuring the Hubble constant. The Hubble telescope has played a major role in helping astronomers precisely measure the universe, expansion. Before Hubble was launched in 1990, the estimates for the Hubble constant varied by a factor of two. In 1999, the Hubble Space Telescope Key Project on the Extragalactic Distance Scale refined the value of the Hubble constant to an error of about 10 percent.

The Daily Galaxy via NASA's Goddard Space Flight Center.
  Hubbleruleso
Image top of page: Image top of page: Is an ESO color-composite of the barred spiral galaxy NGC 5584. It is based on data collected by the Paranal Science Team with the FORS1 instrument on Kueyen, the second 8.2-m Unit Telescope of ESO's Very Large Telescope. The supernova SN 2007af is the bright object seen slightly below and to the right of the galaxy's center. The brilliant, blue glow of young stars trace the graceful spiral arms of galaxy  Thin, dark dust lanes appear to be flowing from the yellowish core, where older stars reside. The reddish dots sprinkled throughout the image are largely background galaxies.

Cephid Image Credit: NASA, ESA, A. Riess (STScI/JHU), and L. Macri (Texas A&M University)

Scientists successfully store "e=mc2 1905" on DNA of living matter


Scientists: Data-storing bacteria could last thousands of years

A Japanese university announced scientists there have developed a new technology that uses bacteria DNA as a medium for storing data long-term, even for thousands of years.

Keio University Institute for Advanced Biosciences and Keio University Shonan Fujisawa Campus announced the development of the new technology, which creates an artificial DNA that carries up to more than 100 bits of data within the genome sequence, according to the JCN Newswire.

The universities said they successfully encoded "e= mc2 1905!" -- Einstein's theory of relativity and the year he enunciated it -- on the common soil bacteria, Bacillius subtilis.

While the technology would most likely first be used to track medication, it could also be used to store text and images for many millennia, thwarting the longevity issues associated with today's disk and tape storage systems -- which only store data for up to 100 years in most cases.

The artificial DNA that carries the data to be preserved makes multiple copies of the DNA and inserts the original as well as identical copies into the bacterial genome sequence. The multiple copies work as backup files to counteract natural degradation of the preserved data, according to the newswire. 

Bacteria have particularly compact DNA, which is passed down from generation to generation. The information stored in that DNA can also be passed on for long-term preservation of large data files, the scientists said.


Derivation of E=mc²





Albert Eisenstein is father of modern physics, his theories and postulates are still very difficult to understand after half century of his pass away. One formula which brings most horrible disaster in the world in the face of Hiroshima and Nagasaki, and  now the formula is giving power to quarter th of the world, The formula which changes the world of physics with two different things i.e. mass and energy to be one and same thing. This was starting of unification theory, latter on scientist thought that if electrostatics and magnetism are one and the same thing and mass and energy are one and the same, then why not all the other physical particle and forces are same. In this manner they started search for the Unification theory which now termed as The M-Theory.

That elegant formula is E=mc². Lets derive this formula using the modern physics approach.

We all know that De-Broglie was the first man who say that matter have dual nature. Some time it behaves like particle and sometime as wave, and light also has dual nature. Now one thing come into mind that if matter and light both have dual nature then they must be one and the same thing. This was the thought of Eisenstein.
Come to the topic, De-Broglie explained that if any thing that have momentum must have wave nature and wavelength is given by:-

here Î» = Wave length of wave packet
h = plank's constant
p = momentum of wave packet

A wave packet is a terminology for representing a thing which is wave as well as particle. From the above equation it is clear that anything which has momentum must have associated wavelength.

So the reverse must be true, if anything has wavelength must have momentum too. And momentum means both velocity and mass. When it is concern about normal matter all the matter have momentum due to it's mass and velocity and associated wavelength too.

But one particle in nature have only wavelength but no mass, this is photon. A photon has zero rest mass but it have momentum, as it exert impulsive force to the objects it is falling on. So from the above equation photon must have momentum, which is true. But what about mass of photon ?

Since photon have wavelength, and it is move with the velocity of light thus it have frequency. And according to Plank's Quantum Theory Energy of wave packet has it's energy related to it's frequency as blow:-


 here E = Energy of wave packet
h = Plank's Constant
v= Frequency of wave packet

The above equation can be written in terms of wavelength, as 


From both the Quantum theory and De-Broglie equation we can easily say that energy of photon is directly proportional to the momentum of photon as:-

From the classical physics we know that momentum is product of mass and velocity. So if photon has momentum and energy which are related as follows then it must have equivalent mass which can produce such momentum for producing the energy given by above equation.

So let the equivalent mass of photon is m, which produce momentum of p, and because photon always run with the speed of light so p = mc. By placing value of p into above equation we get:-


From the formula it is clear that if any photon has energy E then it must have equivalent mass of m. The converse if also true that if any thing has mass of m it must have equivalent energy equal to E.
This is MASS ENERGY RELATION of EISENSTEIN. 

Wednesday, March 16, 2011

Plot A Fourier Transform of Any Curve Using Vb.Net








Below is the code for generation of Fourier Series
of any Function.
The program uses N point DFT, of sampled version of analog signal function entered in the text box.


This is code for Fourier.vb


Imports System.Math
Imports MSScriptControl

Public Class Fourier

    Private Sub Fourier_Load(ByVal sender As System.Object,_
 ByVal e As System.EventArgs) Handles MyBase.Load
        CurvePic.BackColor = Color.White

    End Sub

    Private Sub DrawBtn_Click(ByVal sender As System.Object,_
 ByVal e As System.EventArgs) Handles DrawBtn.Click

        Dim CurveScript As New MSScriptControl.ScriptControl
        CurveScript.Language = "VBscript"

        Dim CurveGraph As Graphics

        Dim x, y As Double
        Dim ox, oy As Integer
        Dim posx, posy As Long
        Dim curve(,) As Double

        Dim xacc As Double
        Dim scl As Double
        Dim count As Long = 0

        ox = CurvePic.Width / 2
        oy = CurvePic.Height / 2


        xacc = 0.01
        scl = 10


        CurveGraph = Graphics.FromHwnd(CurvePic().Handle)
        CurveGraph.Clear(Color.White)

        ReDim curve(CurvePic.Width / (xacc * scl), 2)



        For x = -CurvePic.Width / (2 * scl) To _
CurvePic.Width / (2 * scl) Step xacc

            CurveScript.ExecuteStatement("x=" & x)
            CurveScript.ExecuteStatement("pi=" & PI)
            CurveScript.ExecuteStatement("u=" & u(x))


            Try

                y = CurveScript.Eval(FunctionTxt.Text)

                'Me.Text = CStr(y)

            Catch e1 As OverflowException
                y = 0
            Catch e2 As Exception
                MsgBox(e2.ToString)
                Exit For

            End Try

            curve(count, 0) = x
            curve(count, 1) = y

            posx = ox + curve(count, 0) * scl
            posy = oy - curve(count, 1) * scl

            Try
                CurveGraph.DrawRectangle(pen:=Pens.Blue, _
height:=1, width:=1, x:=posx, y:=posy)
            Catch e1 As OverflowException
                posx = CurvePic.Width
                posy = CurvePic.Height
            End Try

            count += 1

        Next


        Dim N As Long
        Dim k As Double
        Dim nf As Double
        Dim Reyf As Double
        Dim imyf As Double

        Dim ampyf As Double
        Dim angyf As Double
        Dim fsclx, fscly As Double
        Dim famp As Long
        Dim fang As Long

        N = count
        count = 0

        fsclx = CurvePic.Width / N
        fscly = CurvePic.Height / (2 * N)


        Dim dReyf As Double = 0
        Dim dImyf As Double = 0
        Dim kr As Double
        Dim posref, posimf As Long


        For k = -(N - 1) / 2 To (N - 1) / 2 Step 1
            dReyf = 0
            dImyf = 0

            For nf = 0 To N - 1 Step 1
                Reyf = dReyf + curve(nf, 1) * Cos(2 * PI * nf * k / N)
                imyf = dImyf - curve(nf, 1) * Sin(2 * PI * nf * k / N)

                dReyf = Reyf
                dImyf = imyf
            Next

            ampyf = (Reyf ^ 2 + imyf ^ 2) ^ 0.5
            angyf = Atan(imyf / Reyf)

            Try
                famp = oy - ampyf * fscly
                fang = oy - angyf * (CurvePic.Height / 6)
            Catch e1 As Exception
                MsgBox(e1.ToString)
                Exit For
            End Try

            kr = N / 2 + k
            posref = ox + Reyf * CurvePic.Width / N
            posimf = oy - imyf * CurvePic.Height / N

            Try
                CurveGraph.DrawRectangle(pen:=Pens.Red,_
 height:=1, width:=1, x:=CInt(kr * fsclx), y:=famp)
                CurveGraph.DrawRectangle(pen:=Pens.DarkKhaki,_
 height:=1, width:=1, x:=CInt(kr * fsclx), y:=fang)
                CurveGraph.DrawRectangle(pen:=Pens.Black, _
width:=1, height:=1, x:=posref, y:=posimf)
                'Me.Text = CStr(N) + "," + CStr(famp) + "," +_
 CStr(fang) + "," + CStr(k)
            Catch e1 As OverflowException
                famp = 0
            Catch e2 As Exception
                MsgBox(e2.ToString)
                Exit For
            End Try
        Next

    End Sub

    Public Function u(ByVal t As Double) As Double
        If t < 0 Then
            Return 0
        Else
            Return 1
        End If
    End Function

End Class



now the code for Fourier.Designer.vb




<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class Fourier
    Inherits System.Windows.Forms.Form

    'Form overrides dispose to clean up the component list.
    <System.Diagnostics.DebuggerNonUserCode()> _
    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
        Try
            If disposing AndAlso components IsNot Nothing Then
                components.Dispose()
            End If
        Finally
            MyBase.Dispose(disposing)
        End Try
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> _
    Private Sub InitializeComponent()
        Me.CurvePic = New System.Windows.Forms.PictureBox()
        Me.DrawBtn = New System.Windows.Forms.Button()
        Me.FunctionTxt = New System.Windows.Forms.TextBox()
        Me.StatusTxt = New System.Windows.Forms.TextBox()
        CType(Me.CurvePic, System.ComponentModel.ISupportInitialize)_
.BeginInit()
        Me.SuspendLayout()
        '
        'CurvePic
        '
        Me.CurvePic.Location = New System.Drawing.Point(12, 12)
        Me.CurvePic.Name = "CurvePic"
        Me.CurvePic.Size = New System.Drawing.Size(768, 413)
        Me.CurvePic.TabIndex = 0
        Me.CurvePic.TabStop = False
        '
        'DrawBtn
        '
        Me.DrawBtn.Location = New System.Drawing.Point(12, 431)
        Me.DrawBtn.Name = "DrawBtn"
        Me.DrawBtn.Size = New System.Drawing.Size(75, 23)
        Me.DrawBtn.TabIndex = 1
        Me.DrawBtn.Text = "Transform"
        Me.DrawBtn.UseVisualStyleBackColor = True
        '
        'FunctionTxt
        '
        Me.FunctionTxt.Location = New System.Drawing.Point(93, 434)
        Me.FunctionTxt.Name = "FunctionTxt"
        Me.FunctionTxt.Size = New System.Drawing.Size(215, 20)
        Me.FunctionTxt.TabIndex = 2
        Me.FunctionTxt.Text = "10*sin(x)"
        '
        'StatusTxt
        '
        Me.StatusTxt.Location = New System.Drawing.Point(314, 433)
        Me.StatusTxt.Name = "StatusTxt"
        Me.StatusTxt.Size = New System.Drawing.Size(221, 20)
        Me.StatusTxt.TabIndex = 3
        '
        'Fourier
        '
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
        Me.ClientSize = New System.Drawing.Size(792, 466)
        Me.Controls.Add(Me.StatusTxt)
        Me.Controls.Add(Me.FunctionTxt)
        Me.Controls.Add(Me.DrawBtn)
        Me.Controls.Add(Me.CurvePic)
        Me.Name = "Fourier"
        Me.Text = "Forier Transform"
        CType(Me.CurvePic, System.ComponentModel.ISupportInitialize)_
.EndInit()
        Me.ResumeLayout(False)
        Me.PerformLayout()

    End Sub
    Friend WithEvents CurvePic As System.Windows.Forms.PictureBox
    Friend WithEvents DrawBtn As System.Windows.Forms.Button
    Friend WithEvents FunctionTxt As System.Windows.Forms.TextBox
    Friend WithEvents StatusTxt As System.Windows.Forms.TextBox

End Class

Note: if code doesn't work try to remove underscores at the end of various line and then try.

Download Demo executable here.

Popular Posts