Tuesday, January 22, 2013
Building it with .ASPX Code Nuggets
If we were to build the above “hello world” sample using ASP.NET’s existing .ASPX markup syntax, we might write it using <%= %> blocks to indicate “code nuggets” within our HTML markup like so:
One observation to make about this “hello world” sample is that each code nugget block requires 5 characters (<%= %>) to denote the start and stop of the code sequence. Some of these characters (in particular the % key – which is center top on most keyboards) aren’t the easiest to touch-type.
Building it with Razor Syntax
You denote the start of a code block with Razor using a @ character. Unlike <% %> code nuggets, Razor does not require you to explicitly close the code-block:
The Razor parser has semantic knowledge of C#/VB code used within code-blocks – which is why we didn’t need to explicitly close the code blocks above. Razor was able to identify the above statements as self-contained code blocks, and implicitly closed them for us.
Even in this trivial “hello world” example we’ve managed to save ourselves 12 keystrokes over what we had to type before. The @ character is also easier to reach on the keyboard than the % character which makes it faster and more fluid to type.
Sunday, January 20, 2013
Mac Remote Desktop Connection (RDC)
Mac Remote Desktop Connection (RDC)
How to use Remote Desktop Connections in a Mac
Windows Remote Desktop Connection Client Software for Mac: The RDC software can be downloaded here:
How to use
When installed you will find the Remote Desktop Connection software in your Applications directory.
Run RDC by double-clicking the Remote Desktop Connection icon.
Enter the name of the server in the "Computer" field.
Go to the RDC menu and select Preferences.
Enter your POP account login information in the fields provided. If your POP account has been converted to accept your PSU Access Account credentials, then enter your Access Account ID in the 'User name' field and dce.psu.edu in the 'Domain' field. Set other options as desired using the icons across the top. See the Setting Options section below for more details.
To save your preferences go to the File menu and select Save As.
Give your preferences file a name and specify a location to save it, and click Save.
Close the Preferences window and quit Remote Desktop Connection.
Now double-click on the preferences file you saved and you will be connected to your remote computer.
To modify a preferences file, run the Remote Desktop Connection application.
Click File on the toolbar and choose Edit a connection…
Locate your preferences file and click Open.Modify your preferences as desired.Go to the File menu and select Save.
You can now close the preferences window and Connect to your server.
Setting Options
In order to access files on your Mac from the Windows computer, the settings for Drives must be specified…
In this case the Home folder is specified, which is your user account home folder.
All disk drives is everything your Mac has access to, including other drives across your network. BE VERY CAREFUL when selecting this option! Depending on your network speed and the number of drives you can access, you may cause a significant amount of traffic across your network. It is recommended that you access only one folder on your hard drive by specifying either Home folder, Document folder, or Other folders from the menu.
If you have more than one printer you can use the Printers button to specify which one you want to use when you print from the remote Windows system. If you have one printer it will be enabled by default. Note that the printer driver may behave differently than expected.
You can also specify Mac keyboard shortcuts to use in the remote desktop session.
Once logged into the Windows server you can also access your unix directories.
Subscribe to:
Posts (Atom)