Resize Merged Excel Cells – VBA

Dim NewRwHt As Single
Dim cWdth As Single, MrgeWdth As Single
Dim c As Range, cc As Range
Dim ma As Range
With Target
If .MergeCells And .WrapText Then
Set c = Target.Cells(1, 1)
cWdth = c.ColumnWidth
Set ma = c.MergeArea
For Each cc In ma.Cells
         MrgeWdth = MrgeWdth + cc.ColumnWidth
Application.ScreenUpdating = False
     ma.MergeCells = False
      c.ColumnWidth = MrgeWdth
        NewRwHt = c.RowHeight
       c.ColumnWidth = cWdth
     ma.MergeCells = True
    ma.RowHeight = NewRwHt
   cWdth = 0: MrgeWdth = 0
Application.ScreenUpdating = True
End If
End With

Remote desktop connection shortcut

The Windows Remote Desktop is a built-in tool that lets you take control of a computer over a network connection. It is useful for accessing computers that are not sitting in front of you, and it’s something that I use quite frequently.

I’m typically connecting to several computers every day using Remote Desktop, and it finally dawned on me that there had to be a better way to do it than pulling up the application every time.

The first thing you’ll want to do is create a new shortcut, which can be done by right-clicking on the desktop and selecting New -> Shortcut. Then you’ll be entering in something like this:

mstsc.exe /v: /w:800 /h:600

mstsc.exe /v:hostname/w:1280/h:1024

Here’s what the various portions of that mean:

  • mstsc.exe ‚Äì this is the name of the Remote Desktop application, and is required for the shortcut to work properly.
  • ‚Äì this is the name or IP address of the computer you want to connect to.
  • 800 ‚Äì this is the resolution width for the computer that you‚Äôre connecting to.
  • 600 ‚Äì this is the resolution height for the computer that you‚Äôre connecting to.

With this information you’re able to create shortcuts for all of the computers you connect to, and when you execute the shortcut it will immediately begin connecting to the computer specified. This can definitely shave precious seconds off of the time it takes to launch Remote Desktop!

Calculating PUE

Power Usage Effectiveness (PUE)

Power Usage Effectiveness (PUE) is a standard developed by The Green Grid‚Ñ¢ consortium to provide a clear answer to the primary issue surrounding energy efficiency within the data center which is how much power is devoted to driving the actual computing/IT components (servers, for example) versus the ancillary support elements such as cooling and lighting. With the rise of computing demands and high density computational environments, the power distribution expressed by either metric is extremely important. The components of the PUE calculation look at the relationship between “Total Facility Power” (TFP) and “IT Equipment Power” (IEP). TFP is measured at the utility meter for the data center space and includes all of the components required to support the IT load including:

  • Power components including UPS systems and PDUs
  • Cooling elements such as CRACs and chillers
  • Other infrastructure components such as lighting

As might be expected, IEP, or more simply, IT Load, is the sum total of the power used by the facility’s computing components including servers, storage devices and networking equipment. The main difference between these two standards is the placement of each of these elements in their equations and their resulting output.

Calculating PUE

To calculate a facility’s PUE simply divide the Total Facility Power by its IT Equipment Power. Your answer will be a whole number. For example, a PUE score of 3 indicates that the data center demand is three times greater than the energy necessary to power the IT equipment.

Interpreting PUE

The PUE can range from 1 to infinity. In the case of the PUE, data center energy efficiency increases the closer the number comes to one which indicates that a greater portion of the power required by the facility is used to drive the IT equipment.

Get Parent PID

my $parent_id = getppid();

print "$parent_id\n";


getppid – get parent process ID




Returns the process id of the parent process.


We are painfully aware that these documents may contain incorrect links and misformatted HTML. Such bugs lie in the automatic translation process that automatically created the hundreds and hundreds of separate documents that you find here. Please do not report link or formatting bugs, because we cannot fix per-document problems. The only bug reports that will help us are those that supply working patches to the installhtml or pod2html programs, or to the Pod::HTML module itself, for which I and the entire Perl community will shower you with thanks and praises.

If rather than formatting bugs, you encounter substantive content errors in these documents, such as mistakes in the explanations or code, please use the perlbug utility included with the Perl distribution.