Home >> Blog

iHwy Development Blog

The iHwy team shares their musings about their development experiences.

We've released a new version of our jQuery Validation plugin credit card extension. Changes include:

  1. updated card prefixes (including latest Discover Card changes)
  2. support for LaserCard

More info here:

http://www.ihwy.com/labs/jquery-validate-credit-card-extension.aspx

We have other lab stuff here, too:

http://www.ihwy.com/labs/


We've released a new version of our jQuery Validation plugin credit card extension. Changes include:

  1. updated card prefixes (including latest Discover Card changes)
  2. support for LaserCard

More info here:

http://www.ihwy.com/labs/jquery-validate-credit-card-extension.aspx

We have other lab stuff here, too:

http://www.ihwy.com/labs/


We've released a new version of our jQuery Validation plugin credit card extension. Changes include:

  1. updated card prefixes (including latest Discover Card changes)
  2. support for LaserCard

More info here:

http://www.ihwy.com/labs/jquery-validate-credit-card-extension.aspx

We have other lab stuff here, too:

http://www.ihwy.com/labs/


Using GIT to install OSCommerce Contributions

Posted on September 23, 2009 17:24 by Mike

Adding an oscommerce contribution to an existing site has always been a huge pain.  You have to weed through messy code and figure out where you're suppose to put in the contribution's code without breaking anything.  A lot of time the install instructions for a contribution only give you the line number to work with, and who knows if that line number is going to be accurate in your code or not.  But, today I figured out a much less painful way to do it... using git.  Now, I don't necessarily recommend doing this without first understanding git at least a little... but if you've used git before, here's what you do: 

1. figure out which version of oscommerce the site is based on (usually found part way down in includes/application_top.php; something like "define('PROJECT_VERSION', 'osCommerce 2.2-MS2');")

2. pull that code in to a git repository

3. create a branch in git for the existing site and for the oscommerce code you just pulled in (all branches are pointing at the same place at the moment)

4. checkout the new branch

5. pull down the existing site's code and copy it over everything in the git repository

6. commit changes

7. checkout the oscommerce branch

8. create a new branch for the contribution you want to install

9. check out the contribution's branch

10. install the contribution (this is now much easier since you're installing it in to the base oscommerce code)

11. commit changes

12. checkout the existing site's branch

13. tell git to merge in the contribution's branch

14. resolve any conflicts

15. commit changes

The existing site's branch should now have the contribution's code nicely merged in to it.  This works because both the existing site's branch and the contribution's branch were both based on the same base branch.  This could theoretically be used to merge in multiple contributions and / or upgrade an existing site to the latest oscommerce code base without nearly as much pain as that usually causes.  Of course there will be conflicts and you will have to manually resolve those, but with a good file merge utility, that's not nearly as bad.

 


Using IDENTITY in a SELECT

Posted on September 8, 2009 17:35 by Mike
I learned a new sql trick today... I had to figure out how to get the position of a row within a result set (in this case the rank of a user based on points). I could get back the list of all the users and their points, but I didn't see a way to have a "rank" column. Then I found that you can use "IDENTITY" inside a select statement if the select statement is going in to a temporary table. That let me get all the results back and then add in a "rank" column using IDENTITY. That also let me figure out ranks on the fly and return just a single rank for a single user. That's what this sql does:

 

 

DECLARE @sportID int
DECLARE @personID int

SELECT dbo.CalcPoints(p.HomeScore, p.VisitorScore, g.HomeScore, g.VisitorScore) AS Points, PersonID
INTO #TmpPoints
FROM Game AS g
INNER JOIN Prediction AS p ON g.GameID = p.GameID
INNER JOIN UserPrediction AS up ON p.PredictionID = up.PredictionID
INNER JOIN Team AS ht ON ht.TeamID = g.HomeTeamID
INNER JOIN Team AS vt ON vt.TeamID = g.VisitorTeamID
WHERE
(g.HomeScore IS NOT NULL) AND (g.VisitorScore IS NOT NULL)
AND (ht.SportID = @sportID OR vt.SportID = @sportID)

SELECT IDENTITY (Int, 1, 1) AS Rank, PersonID, SUM(Points) AS Points
INTO #TmpRank
FROM #TmpPoints
GROUP BY PersonID
ORDER BY Points DESC

SELECT Rank, Points FROM #TmpRank WHERE PersonID = @personID

DROP TABLE #TmpRank
DROP TABLE #TmpPoints

 

 

There may be a more efficient way to do the above with less temp tables, but that was the best I could come up with in a short time and it's still pretty darn fast for what it does. Anyway, using IDENTITY in a select is pretty useful for things like determining the rank of something in an arbitrary list. So in case you didn't know you can do that, FYI, you can ;)

Xcode iPhone OS 3.0.1 Error

Posted on August 28, 2009 16:39 by Mark

I recently upgraded my phone to 3.0.1 and it broke my development environment.

"The version of iPhone OS on Mark Dev iPhone does not match any of the versions of iPhone OS supported for development with this copy of Xcode. Please restore the device to a version of the OS listed below. If necessary, the latest version of Xcode is available here."

OS Installed on Mark Dev iPhone is
3.0.1 (7A400)

Damn.

Fortunately, another developer on our team download the latest Beta SDK and it corrected the problem so I knew there was a solution. But I didn't want to download another 2GB of SDK and poked around a little to see if there was another solution.

The device builds on my machine are located here: /Developer/Platforms/iPhoneOS.platform/DeviceSupport/

I noticed there were other entries that were only links. For example, I have a 2.1.1 pointing to 2.1 so I thought I would do the same.

ln -s 3.0\ \(7A341\) 3.0.1

It works!


So many sucky web applications, so little time!

Posted on August 12, 2009 13:09 by Mark

[No text]


New versions of our jQuery listnav and listmenu plugins are now available:

http://www.ihwy.com/labs/jquery-listnav-plugin.aspx
http://www.ihwy.com/labs/jquery-listmenu-plugin.aspx

What's new:

ListNav plugin

1. added an includeOther option to provide a top level '...' nav link to access items that start with chars other than A-Z and 0-9. For example, chars like Ä and Ü.

2. added a prefixes option to provide a way to show "The New York Times" under T and N. Pass in your own prefix array.

See the new demo 6 here for examples of both:

    http://www.ihwy.com/labs/Demos/Current/jquery-listnav-plugin.aspx

ListMenu plugin

1. added an includeOther option, just like the one for the ListNav plugin.

2. added an onClick option that simplifies handling clicks in the dropdown menu (for things like pulling an href out of the clicked link to use it for an ajax call). The onClick uses event delegation, so is low overhead and the clicked object is available as a jquery object in your onClick function.

See demo 3 here for includeOther example and demo 6 for onClick example:

    http://www.ihwy.com/labs/demos/current/jquery-listmenu-plugin.aspx

Some of these features were based on user requests from the jQuery community. Thanks to everyone for the feedback!


Email Campaign Manager a Success

Posted on July 15, 2009 22:40 by Mark

I'm always excited to hear the positive feedback when our team delivers another fine solution to a client. It's especially gratifying when you are able to track the direct impact to the bottom line.

We built an application to manage and track opt-in email campaigns. It's one small piece of an entire application suite. The results of a campaign sent early this morning are amazing.

  • ~ 3000 emails sent in ~30 seconds
  • ~ 1000 opened (based on web bug) so far by recipients (the emails were well targeted)
  • ~ $60k worth of merchandise bought within the first 10 hours as a direct result of the campaign


Whoa!


Introduction: The business problem

One of our core strengths is our ability to build tools that collect, analyze and search large volumes of information in a user friendly manner. We use great technologies to solve complex problems (see sidebar). Our experience in these types of applications is broad. We built the entire Intelitouch system, which we can easily claim was one of the first real estate management systems available on the Internet. That first generation CRM application led to many of the features that are common in all of today’s similar applications. We wrote the second and third generations of the entire Sponsorwise platform, which allows clients to collect specific pieces of information and generate detailed analysis. This application is in use today by companies like Jet Blue, US Bank, Panera and Pet Smart. The user interface is simple, yet intelligent and sophisticated. Underneath the simple user interface is a robust set of tools designed to collect and analyze information. These applications solve complex data collection problems.

One of our recent projects, Mainstay, is the newest generation of enterprise software in this class of applications. The term “generation” is appropriate because this product is a step above all the others. iHwy's collective experience, know-how and pain have been applied it to every aspect of this technology.

Mainstay is a platform-independent web technology tool that collects data.

Our customer, Harkcon, came to us with a need to create a solution that would run disconnected from the web and work on Mac, Windows and Linux as a desktop application. The program also needed to be able to run disconnected, regardless of whether or not there was an Internet connection. It was not a requirement to use web technologies, but it was a more effective, modern and nimble.

Stay tuned for more detailed information about this project.