Elvenware Logo



Prog 272 Week 04, 2019

Core Subjects

Our main goals this week is to:


There are several assignments, including:

Look in the modules section of Canvas to find links to these assignments.

Get the right ViewPort statement

You might want to replace the ViewPort statement created by default by Cordova with this statement:

See this Elvenware entry:

Always Include Last Name in Project Names

I often fail to make this clear, but can you always call any project your turn in XXX-LastName. For instance: MilesObject-Calvert. Thank you.

In fact, it usually helps if you include the Week in the project name as well:


This name ends up in the Eclipse/Aptana file called .project. Cordova projects use some Java code, so in them, you must use an underbar rather than a dash.

Using Putty and Git

If you are using SSH with Git, you want to make sure that Git can find the Putty program called plink. To do that, be sure that the environment variables GIT_SSH is set to

C:\Program Files (x86)\PuTTY\plink.exe

More details are here

From the windows command line, that would look like:

SetX GIT_SSH C:\Program Files (x86)\PuTTY\plink.exe

There is an updated SanityCheck.bat file that includes a check for GIT_SSH.

VirtualBox Kernal Driver Error

If you get an error trying to start your VM, try this solution:

Navigate to:

C:\Program Files\Oracle\VirtualBox\drivers\USB\filter

Find the VBoxUSBMon.inf and right click on it. Select Install.

Navigate to:

C:\Program Files\Oracle\VirtualBox\drivers\vboxdrv

Find VBoxDrv.inf and right click on it. Select install.

This fixed the problem for me.

Format Code

Don't forget to format your code in Eclipse/Aptana. Right click on
a JavaScript file and choose Source | Format. The shortcut is Ctrl-Shift-F.


HTML Suggestions

If JsHint complains that you are mixing up places where you put tabs and places where you put spaces. Open up your HTML in notepad++. Turn on View | Show Symbol | Show Write Space. Look at your <LI> elements, you will see that you use different characters for your indentation. It probably looks fine on your system, but on mine, where tabs have a different value than on your system, it is not pretty.



Start Karma:

karma start

If you have karma running in one command window, you can run a test in another command window that will return immediately by typing:

karma run

Working Examples:

In HTML Files

Be sure to specify the charset:

Instead of writing the above in the head element, Write this:

We have not focused on this, but you should specify the content type and char set in the header:


Even better is the following:



"Go into Hyper V. Go into the Virtual Switch Manager. Create a virtual switch called 'Windows Phone Emulator Internal Switch'. Make it's connection type Internal. Now launch the emulator. It should work."

sc query intelhaxm