• 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

    Updating Firefox and the Black Screen

    Jeff Boes

    By Jeff Boes
    October 16, 2014

    If you are updating your Firefox installation for Windows and you get a puzzling black screen of doom, here’s a handy tip: disable graphics acceleration.

    The symptoms here are that after you upgrade Firefox to version 33, the browser will launch into a black screen, possibly with a black dialog box (it’s asking if you want to choose Firefox to be your default browser). Close this as you won’t be able to do much with it.

    Launch Firefox by holding down the SHIFT key and clicking on the Firefox icon. It will ask if you want to reset Firefox (Nope!) or launch in Safe mode (Yes).

    Once you get to that point, click the “Open menu” icon (three horizonal bars, probably at the far right of your toolbar). Choose “Preferences”, “Advanced”, and uncheck “Use hardware acceleration when available”.

    Close Firefox, relaunch as normal, and you should be AOK. You can try re-enabling graphics acceleration if and when your graphics driver is updated.

    Reference: here.


    browsers graphics windows

    Postgres copy schema with pg_dump

    Greg Sabino Mullane

    By Greg Sabino Mullane
    October 9, 2014


    Manny Calavera (animated by Lua!)
    Image by Kitt Walker

    Someone on the #postgresql IRC channel was asking how to make a copy of a schema; presented here are a few solutions and some wrinkles I found along the way. The goal is to create a new schema based on an existing one, in which everything is an exact copy. For all of the examples, ‘alpha’ is the existing, data-filled schema, and ‘beta’ is the newly created one. It should be noted that creating a copy of an entire database (with all of its schemas) is very easy: CREATE DATABASE betadb TEMPLATE alphadb;

    The first approach for copying a schema is the “clone_schema” plpgsql function written by Emanuel Calvo. Go check it out, it’s short. Basically, it gets a list of tables from the information_schema and then runs CREATE TABLE statements of the format CREATE TABLE beta.foo (LIKE alpha.foo INCLUDING CONSTRAINTS INCLUDING INDEXES INCLUDING DEFAULTS). This is a pretty good approach, but it does leave out many types of objects, such as functions, domains, FDWs, etc. as well as having a minor sequence problem. It’s also slow to copy the data, as it creates all of the indexes before populating the table via INSERT.

    My preferred approach …


    postgres

    Liquid Galaxy at the Ryder Cup 2014

    Will Plaut

    By Will Plaut
    October 6, 2014

    End Point was proud to present the Liquid Galaxy for the French Golf Federation at this year’s Ryder Cup in Gleneagles, Scotland. The French Golf Federation will be hosting the cup in 2018 at Le Golf National, which is just outside of Paris and is also the current venue of the French Open.

    Throughout the event, thousands of people came in and tried out the Liquid Galaxy. The platform displayed one of its many hidden talents and allowed golf fans from around the world to find and show off their home courses. One of the most interesting things to witness was watching golf course designers accurately guess the date of the satellite imagery based on which course changes were present.

    This deployment presented special challenges: a remote location (the bustling tented village adjacent to the course) with a combination of available hardware from our European partners and a shipment from our Tennessee office. Despite these challenges, we assembled the system, negotiated the required network connectivity, deployed the custom interface, and delivered a great display for our sponsoring partners. The event was a great success and all enjoyed the unseasonably mild Scottish weather.


    event visionport

    Rails Recursive Sorting for Multilevel Nested Array of Objects

    Selvakumar Arumugam

    By Selvakumar Arumugam
    October 6, 2014

    Whenever you display data as a list of records, sorting them in a particular order is recommended. Most of the time, Rails treats data as an array, an array of objects, or as a nested array of objects (tree). We would like to use a general sorting mechanism to display the records in ascending or descending order, to provide a decent view to end users. Luckily, Rails comes with a sorting method called ‘sort_by’ which helps to sort the array of objects by specific object values.

    Simple Array:

    Trivially, an array can be sorted just by sorting using the “sort” method:

    my_array = [ 'Bob', 'Charlie', 'Alice']
    
    my_array = my_array.sort;  # (or just my_array.sort!)
    

    This is the most basic way to sort elements in an array and is part of Ruby’s built-in API.

    Array of Objects:

    Usually, the result set of the Rails will have an array of objects and should be sorted based on specific attributes of the object in the array. Here is a sample array of objects which need to be sorted by date and fullname.

    s_array =
    [  
        {
            "date"=> "2014-05-07",
            "children"=> [],
            "fullname"=> "Steve Yoman" …

    ruby rails

    Liquid Galaxy at UNC Chapel Hill

    Dave Jenkins

    By Dave Jenkins
    October 3, 2014

    End Point has brought another academic Liquid Galaxy online! This new display platform is now on the storied campus of University of North Carolina - Chapel Hill. With a strong background in programming and technology, UNC wanted a premiere interactive platform to showcase the GIS data and other presentations the school researchers are putting together.

    Neil Elliott, our hardware manager for Liquid Galaxy, first assembled, preconfigured, and tested the computer stack at our facility in Tennessee, bringing together the head node, display nodes, power control units, switches, and cases to build a “Liquid Galaxy Express”: an entirely self-contained Liquid Galaxy unit that fits in just under 1-meter cubed. From there, Neil drove the computers and custom-built frame directly to Chapel Hill. Our install manager Neil described it as: “It’s a great drive from our office in Tennessee over the mountains to Chapel Hill. When I arrived, the UNC staff was on-hand to help assemble things, lay out the space, and it all went very quickly. We were live by 4pm that same day.”

    Overall, the installation took just over 6 hours, including assembly and final configuration. The University’s library …


    visionport

    Parsing Email Addresses in Rails with Mail::Address

    Patrick Lewis

    By Patrick Lewis
    October 3, 2014

    I’ve recently discovered the Mail::Address class and have started using it for storing and working with email addresses in Rails applications. Working with an email address as an Address object rather than a String makes it easy to retrieve different parts of the address and I recommend trying it out if you’re dealing with email addresses in your application.

    Mail is a Ruby library that handles email generation, parsing, and sending. Rails’ own ActionMailer module is dependent on the Mail gem, so you’ll find that Mail has already been included as part of your Rails application installations and is ready for use without any additional installation or configuration.

    The Mail::Address class within the library can be used in Rails applications to provide convenient, object-oriented ways of working with email addresses.

    The class documentation provides some of the highlights:

    a = Address.new('Patrick Lewis (My email address) <patrick@example.endpoint.com>')
    a.format       #=> 'Patrick Lewis <patrick@example.endpoint.com> (My email address)'
    a.address      #=> 'patrick@example.endpoint.com
    a.display_name #=> 'Patrick …

    email rails

    MediaWiki minor upgrade with patches

    Greg Sabino Mullane

    By Greg Sabino Mullane
    October 2, 2014

    One of the more mundane (but important!) tasks for those running MediaWiki is keeping it updated with the latest version of the software. This is usually a fairly easy process. While the offical upgrade instructions for MediaWiki are good, they are missing some important items. I will lay out in detail what we do to upgrade MediaWiki installations.

    Note that this is for “minor” upgrades to MediaWiki, where minor is defined as not moving more than a couple of actual versions, and not requiring anything other than patching some files. I will cover major upgrades in a future post. For this article, I assume you have full shell access, and not simply FTP, to the server that MediaWiki is running on.

    The first step in upgrading is knowing when to upgrade - in other words, making sure you know about new releases. The best way to do this is to subscribe to the low-volume mediawiki-announce mailing list. The MediaWiki maintainers have a wonderful new policy of sending out “pre-announcement” emails stating the exact time that the new version will be released. Once we see that announcement, or when the version is actually released, we open a support …


    mediawiki

    RSpec’s Anything Argument Matcher Trickery

    Brian Gadoury

    By Brian Gadoury
    September 29, 2014

    If you’re like me, and I know I am, then you’ve used RSpec’s “anything” argument matcher to test that a method is getting called with the expected arguments. If you haven’t, then I strongly recommend you check it out. Here’s a basic example:

    expect(object).to receive(:message).with(:foo, anything)
    

    That test will pass if object.message() is called with :foo as its first argument, and any non-nil value as its second argument. The “anything” matcher can be used anywhere in the argument list, as well as multiple times. For example:

    expect(object).to receive(:message).with(anything, :bar, anything)
    

    That test will pass if object.message() is called with a non-nil value for its first argument, :bar for its second argument, and any non-nil value for its third argument.

    I recently made one of those discoveries where the happiness of making the discovery quickly turned into the sneaking suspicion that I was actually the last person on the planet to make this discovery. So, I told a co-worker about my discovery. She hadn’t heard of it before, which meant at worst I was the second to last person on the planet. “There could be others,” I thought. “I must set alight our grail shaped beacon!” And …


    ruby rails testing
    Previous page • Page 89 of 219 • Next page