Wednesday, December 4, 2013

How to rotate a shape in PowerPoint (I had to Google it so I suppose it merits a blog posting.)

One: If you click on a shape or drag a box around it, you will see the typical selection box with nodes you may tug on to resize the shape.

 
 

Two: If you put the cursor over the green node that is sort of on a stick sprouting off of the rectangle, the cursor will turn into a rotation symbol. The green node is the key to everything. I would not have figured this out without Googling it.

 
 

Three: Drag and hold the mouse. You will get a preview of the rotation to be.

 
 

Four: Let go.

Tuesday, December 3, 2013

Get a style's value in Dojo.

If you make "dojo/dom-style" match up to domStyle at the AMD define signature, you could do the following with domStyle:

var tallness = domStyle.get(this.whatever, "height");

!include "sections\end.nsi"

...may be used in an .nsi file in NSIS to include the guts of another .nsi file.

I'm guessing $SMPROGRAMS is a global variable in NSIS.

One typically defines variables like so:

!define PLACEINSTARTMENU "$SMPROGRAMS\${MYOTHERVARIABLE}"

 
 

This suggests that $SMPROGRAMS will just be available however. I guess there is a difference between a dollar sign followed by letters and a dollar sign followed by letters in curly brackets. Oh, boy... Installer! :P

 
 

Addendum: "environmental variable" is probably a better way to describe $SMPROGRAMS in lieu of: "global variable"

Monday, December 2, 2013

Sunday, December 1, 2013

Cast a string to an array of characters in JavaScript by splitting on nothing.

function updateScore(increment) {
   game.score = game.score + increment;
   var numberArray = (game.score + "").split("");
   var htmlForScore = "";
   numberArray.forEach(function (number) {
      htmlForScore = htmlForScore + "<li style=\"background-image: url('score_" +
            number + ".png');\"></li>";
   });
   $('#whatever ul').html(htmlForScore);
}