• Home

  • Custom Ecommerce
  • Application Development
  • Database Consulting
  • Cloud Hosting
  • Systems Integration
  • Legacy Business Systems
  • Security & Compliance
  • GIS

  • Expertise

  • About Us
  • Our Team
  • Clients
  • Blog
  • Careers

  • VisionPort

  • Contact
  • Our Blog

    Ongoing observations by End Point Dev people

    Liquid Galaxy at the Economist World Ocean Summit

    Dave Jenkins

    By Dave Jenkins
    March 3, 2014

    The Liquid Galaxy with image capture equipment

    End Point had the distinct privilege of providing a Liquid Galaxy to the Economist World Ocean Summit held in Half Moon Bay, California last week. Originally conceived as a Google Earth and Google Street View platform, the Liquid Galaxy is rapidly becoming a premiere display for ocean content as well. Google is partnering with NGOs and corporations that are actively working toward ocean sustainability. Together, these organizations capture and categorize a great deal of ocean content, with most of that content publicly available via Street View. Some of this equipment was on display next to the Liquid Galaxy: a Trekker camera for remote areas and an underwater camera provided by the Catlin Seaview Survey for capturing hi-definition panoramas underwater.

    This deployment used a custom configuration with six large HDTVs arrayed in a curved 3x2 panorama. The Liquid Galaxy is able to show this content as a single large surface with geometrically-adjusted angles. In short, it’s like a bay window on a submarine. Viewers are able to navigate to different locations through a touchscreen interface, and then rotate and zoom in on detailed …


    google-earth visionport event

    DBD::Pg prepared statement change

    Greg Sabino Mullane

    By Greg Sabino Mullane
    February 28, 2014

    One of the changes in the recently released DBD::Pg version 3 (in addition to the big utf8 change), is the addition of a new attribute, pg_switch_prepared. This accompanies a behavior change in the use of prepare/execute. DBD::Pg will now postpone creating a server-side PREPARE statement until the second time a query is run via the execute() method.

    Technically, DBD::Pg will use PQexecParams (part of the underlying libpq system that DBD::Pg uses) the first time a statement is executed, and switch to using PQexecPrepared the second time the statement is executed (by calling PQprepare first). When it actually switches is controlled by the pg_switch_prepared attribute, which defaults to 2 (the behavior above). You can set it to 0 or 1 to always use PQexecPrepared (as the older versions did), or you can set it to -1 to always use PQexecParams and avoid creating prepared statements entirely.

    The typical flow of events in a DBI script is to create a statement handle via the prepare() method, then call the execute() time with varying arguments as many times as needed.

    #!perl
    
    use strict;
    use warnings;
    use DBI;
    
    my $DSN = 'DBI:Pg:dbname=postgres';
    my $dbh = DBI->connect($DSN, …

    dbdpg perl postgres

    Monitoring Productivity with RescueTime

    Mike Farmer

    By Mike Farmer
    February 26, 2014

    RescueTime.com

    I’m always on the lookout for tools that help me be more productive in my daily work. Time tracking is always one of those difficult tasks for those who bill time by the hour. I’ll admit that there are days here and there where I know I’ve worked all day but at the end of the day I can’t remember where I spent my time and how long I’ve spent on different tasks. Last week I discovered a new tool that I have loved! It’s called RescueTime and it has changed how I approach my days.

    RescueTime is a web service that you can sign up for free. You download a little app that runs in the background and monitors your productivity throughout the day. You can then log into the RescueTime website and see many different breakdowns of how you spent your day.

    So how does it track productivity? It monitors how much time you spend in different applications on your computer. Then it tries to tag that time on a scale from distracting to very productive. You might be thinking that if you spend your whole day in a browser that wouldn’t be very helpful. But RescueTime is pretty smart and it also monitors which web sites you visit and lets you categorize that time as well.

    The nicest thing about …


    tips tools

    MySQL, ASCII Null, and Data Migration

    Mark Johnson

    By Mark Johnson
    February 26, 2014

    Data migrations always have a wide range of challenges. I recently took on a request to determine the difficulty of converting an ecommerce shop’s MySQL 5.0 database to PostgreSQL 9.3, with the first (presumably “easier”) step being just getting the schema converted and data imported before tackling the more challenging aspect of doing a full assessment of the site’s query base to re-write the large number of custom queries that leverage MySQL-specific language elements into their PostgreSQL counterparts.

    During the course of this first part, which had contained a number of difficulties I had anticipated, I hit one that I definitely had not anticipated:

    ERROR:  value too long for type character varying(20)
    

    Surely, the error message is absolutely clear, but how could this possibly be? The obvious answer—​that the varchar definitions were different lengths between MySQL and PostgreSQL—​was sadly quite wrong (which you knew, or I wouldn’t have written this).

    After isolating out the row in question, the first clear distinction of the data in question was the presence of the ASCII null character in it:

    '07989409006\007989409'
    

    OK, sure, that’s weird (and I have a hunch why it’s …


    database mysql postgres

    Accepting Bitcoin with BitPay

    Mark Johnson

    By Mark Johnson
    February 25, 2014

    End Point recently began discussions with long-time Interchange client FrozenCPU about their desire to accept bitcoin payments. Because of the newness of bitcoin, as well as its non-traditional nature as a cryptocurrency, traditional payment gateways do not support it. While ideally suited to function as an exchange medium for ecommerce, we had to seek solutions that allowed for its integration into the checkout process.

    BitPay Payment Gateway

    After investigating their options, FrozenCPU elected to partner with BitPay to handle bitcoin payments. BitPay provides merchants with a solution similar in function to PayPal, where users are either redirected to the BitPay servers to complete payment, or the interaction with BitPay can be embedded directly into the merchant site via an iframe. In either case, all communication between customer and payment processor is direct.

    Customers with a digital wallet then approve a transfer for the converted amount of bitcoin. Merchants need not display or maintain conversion rates; they can continue to use their native currency and BitPay will manage the exchange rate directly.

    The payment negotiation is managed by the creation of an invoice which …


    cryptocurrency ecommerce interchange payments

    More jQuery confusion: hidden, disabled fields

    Jeff Boes

    By Jeff Boes
    February 24, 2014

    As you may have read in my earlier post, I have a proclivity for stumbling into oddball bits of jQuery behavior. (Maybe it’s not just me.)

    Here’s another I discovered recently. I was debugging an odd AJAX bug in a form, one of those dynamically updating form widgets in a page:

     <select name="make">...</select>
     <select name="model">...</select>
    

    where the first selector sends off an AJAX query to retrieve data to fill the second selector, and it in turn fires off a query to get data for the next, and so on down the line.

    Squirreled away in the form was:

     <input type="hidden" name="limitation" disabled="disabled" value="">
    

    Supposedly, this input was filled in to restrict the query on some pages, but not all. I think the original author’s intent was to put data in here as it became available, and to toggle the field’s disabled setting when it was pertinent to limit the query. (Mostly, it was pertinent when the second or third selector was firing off its AJAX query.)

    However, a recent change to the code behind this AJAX query created a bug, because the “limitation” parameter was showing up where it wasn’t …


    javascript jquery

    Python decorator basics, part II

    Miguel Alatorre

    By Miguel Alatorre
    February 21, 2014

    This is a continuation of my previous post: Python decorator basics. Here I’ll talk about a decorator with optional arguments. Let’s say we want to pass an optional argument to the same debug decorator:

    def debug(msg=None):
        def actual_decorator(f):
            def wrapper(*args):
                if msg:
                    print msg
                return f(*args)
            return wrapper
        return actual_decorator
    
    @debug("Let's multiply!")
    def mul(x, y):
        return x*y
    

    Calling mul:

    mul(5, 2)
    Let's multiply!
    10
    

    Excellent. Now let’s decorate without a msg and call mul:

    @debug
    def mul(x, y):
        return x*y
    
    mul(5, 2)
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    TypeError: actual_decorator() takes exactly 1 argument (2 given)
    </module></stdin>
    

    Oh oh. Let’s see what happens at time of decoration:

    mul = debug(mul)
    

    Hmmm, mul gets passed to debug as it’s argument and then the arguments (5, 2) are passed to actual_decorator, since debug returns actual_decorator. To resolve this we need to always call the decorator as a function:

    @debug()
    def mul(x, y):
        return x*y
    
    mul(5, 2)
    10
    

    Assuming that we always expect the msg …


    python

    DBD::Pg 3.0.0 and the utf8 flag

    Greg Sabino Mullane

    By Greg Sabino Mullane
    February 19, 2014

    One of the major changes in the recently released 3.0 version of DBD::Pg (the Perl driver for PostgreSQL) was the handling of UTF-8 strings. Previously, you had to make sure to always set the mysterious “pg_enable_utf8” attribute. Now, everything should simply work as expected without any adjustments.

    When using an older DBD::Pg (version 2.x), any data coming back from the database was treated as a plain old string. Perl strings have an internal flag called “utf8” that tells Perl that the string should be treated as containing UTF-8. The only way to get this flag turned on was to set the pg_enable_utf8 attribute to true before fetching your data from the database. When this flag was on, each returned string was scanned for high bit characters, and if found, the utf8 flag was set on the string. The Postgres server_encoding and client_encoding values were never consulted, so this one attribute was the only knob available. Here is a sample program we will use to examine the returned strings. The handy Data::Peek module will help us see if the string has the utf8 flag enabled.

    #!perl
    use strict;
    use warnings;
    use utf8;
    use charnames ':full';
    use DBI;
    use Data::Peek;
    use lib …

    dbdpg perl postgres unicode
    Previous page • Page 103 of 220 • Next page