Thursday, July 27, 2017

Potentiometers Explained

A potentiometer or "pot" has three terminals.  There are two different configurations for two different users.
  1. Variable Resistor.  If only an end terminal and the middle terminal are used, then the pot acts as a resistor that can very from 0 resistance to the resistance rating of the pot.
  2. Voltage Divider.  If and end terminal is connected to a power source, and the other end terminal is connected to ground, then the middle terminal will vary the voltage from the full voltage from the power source down to 0.
A pot can be thought as containing two resistors (R1 and R2) with the middle terminal between the two.  As the knob is turned, R1 increases resistance while R2 decreases resistance.  All voltage divider circuits work this way whether they use a pot or not.  The equation to determine the output voltage is illustrated below.  




Monday, July 10, 2017

Sign in as a different user in SharePoint 2013

Microsoft took away the menu option to Sign in as a different user.  This was invaluable to test sites to make sure everything looked right for different users or to test access.  There are a couple of ways you can still do this.  You can append this to the site address:

/_layouts/closeConnection.aspx?loginasanotheruser=true

Or you can hold down shift while right clicking the Internet Explorer option.  Then choose Run as different user.  Then navigate to the site.

Thursday, May 4, 2017

Use Visual Basic functions in a LINQPad query

Occasionally, you want to include a Visual Basic (or C#) function such as IIF or Chr() in a LINQ query using LINQPad.  There is two steps to this:


  1. In the Query menu, choose Query Properties.
  2. In the Additional References tab, choose Add, and type Microsoft.VisualBasic.
  3. Then in the Additional Namespace Imports tab, choose the Pick from assemblies link.  Choose the Microsoft.VisualBasic.dll assembly, select the Microsoft.VisualBasic namespace, and then click Add Selected Namespace.

Tuesday, April 11, 2017

Force a site to NOT render in compatibility view

In IE, compatibility view is great.  It forces the newer versions of IE to render a site like it did back when IE 7 was around.  However, sometimes you have an older site that needs compatibility running on the same domain as a newer site that doesn't need compatibility.  You can force the newer site to NOT run in compatibility view by inserting this in the head tag of your page:

<meta http-equiv="X-UA-Compatible" content="IE=edge" />
UPDATE: Make sure this line is the first line under the head tag.

Thursday, January 5, 2017

View folders first in File Explorer

I often view my files in descending Modified Date order so that the most recent files are at the top.  However, by default the folders appear last when I do this.  The solution is to first sort by Modified Date, and then Shift and click the Name column.

Wednesday, September 28, 2016

Guide to creating a "fillable" PDF

This post describes a process that I have used to create a form as a "fillable" PDF.

You must have a professional version of the Adobe Acrobat software.  I'm currently using Adobe Acrobat X Pro.  You'll also need a more recent version of Microsoft Word.  I'm using 2010.

First create the form as a word document and design it exactly how you want it to look.  For example:


Then on the File tab, select Save As Adobe PDF.  After it saves, it should open up in Acrobat.  If it opens in Reader, you need to close it and reopen it in Acrobat.

In Acrobat, click Tools, then Forms, then Create:


Choose the current document as the source.  Acrobat will examine the document and look for anything that appears to be a placeholder for a form field.  It then adds a PDF form field to that spot.  If there are any places that it didn't find, you will have to add them manually.  There is a lesson here.  When creating the form initially in Word, become familiar with what Acrobat is looking for, so there is less you have to do manually.


After the form is created, click the Close Form Editing option, and save.  At this point, you have a fillable PDF.  To Add a form field manually, choose Edit in the Forms menu, and then choose Add New Field.  You'll be given a choice of what type of field.  After placing and sizing the field, right click on the field and choose Properties to change the appearance.

Tips

  • To create a group of radio buttons (i.e. Yes/No, etc.) , create the radio button fields individually and name them the same thing, but give them different choice property values.
  • If you create a checkbox in the Word document, Acrobat will automatically set up the radio buttons for you.  However, if you put them in separate table cells, Acrobat won't group them together correctly.
  • To lock down the document, click Protection, More Protection, and Security Properties.  Choose Password Security as the Security Method.  Check the box that says "Restrict editing and printing of the document...".  Then provide a password.  This password can be provided if you wish to edit the document.  Check the "Enable copying of text...." checkbox, and set Printing Allowed to "High Resolution" and Changes Allowed to "Filling in form fields..."


Tuesday, July 26, 2016