Host Records

by Aaron 08/04/10

DNS is the technology that is used to matchup host names (i.e. www.tapconsulting.com) with its IP address (i.e. 209.62.78.179).  Typically DNS servers on the internet are used when performing these lookups, but it possible to maintain a list of host names and their corresponding IP addresses.  Below are some basic instructions on how to edit your host file on your local workstation.

Windows

  1. Navigate to in c;/windows/system32/drivers/etc/
  2. Double click on hosts (note hosts is a file that does not have an extension)
  3. You'll now get the "Choose a program to open this file:" dialog, choose notepad

  4. Add the IP address hit tab twice and type the host name you want it map to.
  5. Press save and your done. Now your computer will have its own mapping to a specific host name without having to change external DNS records.

    If you have problems saving the file and you are running Windows Vista or Windows 7 you probably have UAC turned on, or you are not a local administrator.
    Instructions for turning off UAC: http://www.petri.co.il/disable_uac_in_windows_vista.htm

Mac OSX

http://support.apple.com/kb/TA27291?viewlocale=en_US

 

Tags:
Category:

WebEngine more than a CMS

by Aaron 11/06/09

CMS (content management system) based websites are awesome.  They enable website owners to manage their website without outside help and with very little training.  The cost of implementing a CMS based website is typically a bit higher than a traditional website, but a CMS based website quickly pays for itself. There are many different open source and commercial CMS systems available, so why did I create a new one from scratch?

About a year ago Bryan Mazzarello(a graphic designer with many years of web design experience) approached me about what CMS options are available that would allow him to provide his clients a CMS based website without making any design compromises.  CMS systems always make certain assumptions about design or layout or are too complicated to adjust in order to pass the “no compromises design” test.  Another problem with most CMS systems is they do not provide a mechanism for “listings”.  A “listing” could be anything from a product catalog for an ecommerce site to available rentals for a property management site.  WebEngine combines both a “no compromises design” CMS and Listing Engine into one easy to use tool.

Key features of WebEngine

  • Hosting and support are bundled together.  No need to perform complicated upgrades yourself.
  • In page WYSIWIG editing of content.
  • Robust listing engine with multiple levels of categorization.
  • Image upload tool with image cropping feature.
  • Ability to create unlimited pages with various designer generated templates.
  • Flexible search engine friendly URL’s.
  • Versioning system always save the previous version of the content and tracks who made what change.
  • Supports asp.net user controls within content areas.  Included controls include feedback form and a survey form.
  • Actively being developed and enhanced.
  • Easily customizable to fit almost any application.

WebEngine is built using the following technologies

Tags: | |
Category: WebEngine

New Website And Blog

by Aaron 09/30/09

You may have notice that the Tap Consulting Blog has a new location at blog.tapconsulting.com.  www.tapconsulting.com is now a proper website highlighting the services we offer. 

If you are unable to find a post or download please let me know so I can fix it.  I've been busy the last nine months or so on some fairly complex projects including:

Tags:
Category: Blog

Search Engine Optimization

by Aaron 07/03/09

The term Search Engine Optimization (SEO) has been around for years and as a web developer it has always been part of my thought process when creating a website. The main issue with creating an “optimized” website is having copy that is SEO friendly.  I can’t expect all of my clients to have the time and resources to write good copy for their websites which is why Tap Consulting now offers SEO copy writing services.

For clients who are interested in writing their own copy and for an overview on SEO and marketing in general I’d recommend the following books:

Tags:
Category:

Hyper-V Server First Impressions

by Aaron 06/11/09

Like most other IT professionals I have jumped on the virtualization bandwagon.  I started using VMware server about three years ago, and I continue to use it to a great extent to virtualize both Linux and Windows guests.  I’ve been very happy with the performance and ease of use.  Version 2 of the product does have some management interface issues, but overall support is good and things work as they should.

I’ve been planning on replacing five physical servers with two and wanted a more robust solution than host based virtualization offers. I don’t want to pay for the more advanced VMware product (I think they are calling it VSphere now?, used to be ESX Server).  Since my task is pretty minor in the realm of server consolidations I figured the two free products ESXi or Hyper-V Server would be the  best fit.

So much has been written about the benefits of virtualization, but to me the benefits of virtualizing servers are:

  • Simple disaster recovery
  • Improved failover and clustering options
  • Hardware independence
  • Server consolidation

Since I knew I wanted a bare metal solution I needed a newer hardware to support it.  Originally I was looking at Dell’s new line of Xeon 5500 series servers (T610).  But I was looking at a minimum of $5k for a decent system with enough storage for my needs.  I ended up spending about $2,300 on a SuperMicro system (5036-T) that supported the new Xeon 5500 series and included a 4 bay drive cage.  I configured the server with:

  • Xeon E5520 2.26 GHZ quad core chip
  • HighPoint 4320 RAID card
  • 12 GB RAM
  • four 320 GB WD RE3 hard drives.

Originally plan was to use ESXi, but it did not support the HighPoint RAID controller (I eventually was able to get drivers from HighPoint, though I never did test them).  After hitting that hurdle with ESXi I took a stab at Hyper-V Server.

Installation of Hyper-V server was very simple, downloaded the iso, burned to DVD and popped it into the new server.  The setup routine is the same familar windows setup that’s been around since windows 2000 (though it has been updated).  I was able to installed the HighPoint RAID driver without a hitch from CD.  I’m so glad windows added CD support for loading drivers in Windows setup, so we don’t have to create a floppy anymore.  I partitioned my 1TB of RAID5 storage with 2 partitions an 80GB for the Hypervisor and the remainder for the virtual machines.

When Hyper-V Server finally booted up I logged in and was presented with two command windows.  One a standard command prompt and the other a command screen with thirteen different options (see screen shot).

Capture

Notice there are no options here to manage guests.  For that you need the Hyper-V Manager.  This tool is available for free from Microsoft for Windows Vista and Windows 7.  Getting this tool to work on the other hand requires a bunch of manual configuration on both the server and the client you wish to manage the server from.  The best resource on figuring this out is a blog post from Hyper-V program manager here: Hyper-V Remote Mgmt

Capture2

What I learned is that the free Hyper-V Server is just like Windows Server 2008, but with only the Hyper-V and Server Core roles enable.  It appears that Microsoft intended for the Hyper-V to be managed from the host OS which is not an option with Server Core.  I was never able to get remote mgmt to work correctly w/o disabling the firewall on the server even after following all the instruction and documentation that I could find.  The documentation for Hyper-V Server is very lacking when compared to VMware’s products (hence the reason for this post). 

I was eventually able to get Hyper-V Manager to work successfully after considerable trial and error (disabling the firewall helped).  Hyper-V Manager is very similar to VMware server 1 interface.  Your first step is to setup your Virtual networks.  Since one of my guests was a 2003 server I had to first set it up with a legacy network adapter and install SP2 before I was able to install the Hyper-V integration components.  I also installed CentOS 5.2 successfully using the images provided by Jules.FM.  Jules has compiled in the integration components into CentOS allowing use of the synthetic network driver.  This worked wonderfully, great instructions provided by Jules.

So once I was up and running with my two virtual machines I notices some remote desktop and SSH were both laggy.  Also I noticed that if I pinged from with the guest OS I was getting very odd results, very erratic ping results (though no dropped packets), slow response times.  When pinging to the guest OS the results were as expected.  I tried the following without any results:

  • disabled TCP, UDP offloading in registry on Hyper-V Server (host) using registry
  • disabled TCP, UDP offloading in registry on guest using registry
  • disabled jumbo frames
  • updated network driver on host

What fixed the problem was going into the server bios and disabling the following:

  • Intel I/OAT
  • Intel VT-d

Once these were disabled networking in the guest OS’s started functioning as expected.  Overall I’m very pleased with the server setup and performance.  I’m glad I went with this system it’s really a better fit than what Dell or HP had to offer for a this small consolidation project.  My only complaint is that Microsoft does not provide a guide, or instructions for this version of their product.  I guess you get what you pay for…  Hence the need for additional community documentation.

Tags:
Category:

LINQ - Querying an ArrayList of Objects

by Aaron 09/17/08

Background

I use ArrayList heavily to load datasets into memory to minimize database queries.  This creates huge performance increases, especially for retail oriented sites with lots of product browsing.  I had implemented sorting and searching prior to LINQ but doing this involved somewhat archaic means (IComparer, and foreach loops)

I knew there had to a better way to filter an ArrayList than using a foreach loop so I looked into the LINQ functionality.  I found this MSDN article that explained most of what I wanted.  I also wanted to put the data back into an ArrayList so I had to figure that out too.  This was very easy turns out that there is an ArrayList constructor that excepts a generic list and a LINQ query has a ToList() method. 

Example

In the example below I wanted to create a method that took an ArrayList of Product Objects and returned only the active products as an ArrayList (Product has a bool Active property):

public static ArrayList getActiveProducts(ArrayList ProductList)
{
      var query = from Product p in ProductList
      where p.Active == true
      select p;
      return new ArrayList(query.ToList());
}

This code is much cleaner and efficient than using a foreach loop to copy the matching items into a new ArrayList.  There is a bit of a learning curve with LINQ but it is a great tool because it is so flexible and works with any imaginable data-source.  By the way there are also order by statement in LINQ, so I could have re-ordered my list very easily too w/o having to extend IComparer.

Tags:
Category:

Project: Tap Time

by Aaron 07/08/08

Background
One of my first IT/IS jobs was implementing a Time and Attendance system and the interfacing it with the payroll system.  This sounds easy but it involved integrating home grown system developed in Access by the warehouse manager and implementing 3 new timeclocks at two different facilities and over 400 employees during the busy season.  Through this project I learned much about Time Keeping systems and told myself I could create better system that was accessible via the web.

Fast forward a couple of years and I was looking for side work and I found a posting on the Cal Poly Help Wanted Forum requesting a timekeeping system for a small Bay area Landscape Company.  I eventually bid and got the contract for the job and implemented the first version of what I now call Tap Time.

Tap Time is now in its third version and is actively being used by a Local San Luis Obispo Based government agency and other local businesses.  The program has grown to include many project management/budgeting features that are key for Government work.  It is entirely web based and includes payroll export features and numerous management reports.

Purpose
Provide acurrate and easy to use web based time keeping with advanced budgeting project management features.

Technical

  • Developed in ASP.net 2.0
  • SQL Server 2000 backend
  • Advanced Budgeting Features
  • Ability to Bill hours to a project
  • Customizable for individual clients
  • Available as either on on site install or hosted solution
  • Export to Payroll feature

Project: POSimple - Point Of Sale using Microsoft Access

by Aaron 07/08/08

Background
This is a project that I started over a year ago and have continued to make numerous small improvements to.  The database is currently in use at one Chinese restaurant based in the Bay Area.  They have two terminals each with receipt printers and one printer for the kitchen.  Prior to using this software the restaurant took all of their orders manually with pen and paper and added up totals using a calculator.  Implementation of the software also included installing 2 computers and touch screens (done by Cortex Computer). 

I'm thinking about releasing a version of this database as a sort of Open Source project as I think many other small restaurants could easily alter the program to fit their own needs.

Purpose
An easy to use Point Of Sale Program (Unicode compatible - meaning it will display and print Mandarin Characters) for a small resturant.  The program is capably of printing reciepts applying discounts, free drinks (and still apply the tax) and many other features.  Since it is implemented in Microsoft Access is relatively easy to alter it or build off of.

Technical

  • Microsoft Access Database (2000 Format)
  • VBA Code for all events
  • Unicode Compatible
  • Ability to Manage Items
  • Screen design done by editing Access forms
  • Touch screen Compatible

Update! POSimple released as open source:

Download Here

Tags: | |
Category: Portfolio

GMAIL IMAP and Trashing Messages Using VBA and Outlook

by Aaron 06/21/08

One of the email options I offer to my clients is the ability to use what Google calls Google Apps which is a business version of their Gmail, Calendaring, and other various services.  The GMAIL service offers the IMAP protocol to synchronize email with various mail clients (Outlook, IPhone, Web...).  The benefit of IMAP is that you will have same version of your mail wherever you access it from.

One of the biggest hang-ups people have with using this is the whole paradigm of archiving messages vs. deleting messages.  Using the IMAP interface the delete command is interpreted as Archive to delete a message you have to move that message into your [GMAIL]/trash (where it will be automatically deleted after 30 days).

One of my bosses at my day job kept pestering me about the ability to delete various marketing email that she had no desire to archive and felt that moving the messages to trash was too much of a hassle.  After trying to convince her that it wasn't too much of a hassle I realized that it was in fact a pain in the butt and there had to be a better way.  So with my expert Google skills I set out to find a solution and I did.

http://www.kilpo.net/FixOutlook.html outlines 2 specific Outlook idioms, one being the IMAP move to trash issue discussed above.  The code presented there is not specific to GMAIL, so I took his code and made some minor changes to get it to work with a standard Outlook Gmail Setup.  I have tested with multiple account in Outlook 2007 and appears to work as expected. 

To implement the what I'm calling the "Trash" feature follow these instructions (USE AT YOUR OWN RISK)

  1. Open up Outlook
  2. In the menu bar go to tools->Macros->Visual Basic Editor (or hit alt+F11)
  3. Locate ThisOutlookSession Macro and open it
  4. Copy the code below into the Code Area
  5. Save and Close the VBA Window
  6. Create a Toolbar item by going to the menu bar View->Toolbars->Customize
  7. Locate Macros in the Category (left pane)
  8. And Drag the Project1.ThisOutlookSession.TrashMessages up to your toolbar (I put mine next to the X - delete command).
  9. You can give the Trash toolbar item a more friendly name an icon and even assign a hotkey by going back to the Customize Command window  and then Rearrange Commands. Use this article on Windows IT Pro Adding Hotkeys and Toolbar Buttons if you need more help with this.
  10. That's it I hope you find this useful!

Below is the VBA s code:

Sub TrashMessages()

    Set myOlApp = CreateObject("Outlook.Application")
    Dim myNameSpace As NameSpace
    Set myNameSpace = myOlApp.GetNamespace("MAPI")
    Dim myExplorer As Explorer
    Set myExplorer = myOlApp.ActiveExplorer
   
    'Get the folder type, expected type is 0 i.e. mail folder. If other type of folder
    'being used then abort macro as it should only be used with mail folders.
    folderType = myExplorer.CurrentFolder.DefaultItemType
   
    'Check that folder is mail folder
    If TypeName(myExplorer) = "Nothing" Or folderType <> 0 Then
    GoTo invalidMailbox
    End If
   
    'Locate root folder for this account
    Set thisFolder = myExplorer.CurrentFolder
    Do Until thisFolder.Parent = myNameSpace
    Set thisFolder = thisFolder.Parent
    Loop
    Set accountFolder = thisFolder
   
    'Identify selected messages
    Dim selectedItems As Selection
    Set selectedItems = myExplorer.Selection
    Dim currentMailItem As MailItem
    Dim iterator As Long
   
    'Move messages to Deleted Items folder
    Set trashFolder = accountFolder.Folders("[GMAIL]")
    Set trashFolder = trashFolder.Folders("Trash")
   
    Count = selectedItems.Count
    For iterator = Count To 1 Step -1
        On Error Resume Next
        Set currentMailItem = selectedItems.Item(iterator)
        currentMailItem.Move (trashFolder)
    Next    
   
    Exit Sub
   
invalidMailbox:
    MsgBox ("Macro configured only to work with mail folders! ")
    Exit Sub

End Sub

 

Tags:
Category:

Javascript Check if File Exists On Server

by Aaron 05/15/08

I have been working diligently on implementing some new features into Velowear.com.  One of these features is an in-page image popup.  Originally I had coded it a an asp.net control within an AJAX panel, but found that this approach was not as flexible as just using pure Javascript.  The only problem was that I wanted to perform some server side checking if the image existed before triggering the in-page popup.  Most of what I had read said this was impossible to do via Javascript, but I knew there had to be a way...

Luckily I stumbled across some Javascript code that uses the XMLHttpRequest Object (this is the core of how AJAX works BTW) that performs this tasks with relative ease.  It uses the XMLHttpRequest object to try and download the file (str) passed into the isFile function.  Supposedly this only works when calling the server that originated the request. 

I hope this helps you out as much as it helped me.


Here is the code:
 

function isFile(str){
    var O= AJ();
    if(!O) return false;
    try
    {
        O.open("HEAD", str, false);
        O.send(null);
        return (O.status==200) ? true : false;
    }
    catch(er)
    {
        return false;
    }
}
function AJ()
{
    var obj;
    if (window.XMLHttpRequest)
    {
        obj= new XMLHttpRequest();
    }
    else if (window.ActiveXObject)
    {
        try
        {
            obj= new ActiveXObject('MSXML2.XMLHTTP.3.0');
        }
        catch(er)
        {
            obj=false;
        }
    }
    return obj;
}

This code was buried in the middle of the following thread found here:
http://www.codingforums.com/archive/index.php?t-98182.html

Tags:
Category:


More Posts
showing: 10 posts, sorting by: most recent