Saturday, January 5, 2013

Problems with Adobe CS2 software activation

I am reconfiguring my computer and need to run my old Adobe Creative Suite 2 Premium software.  After spending time installing it, I received an error that it could not be activated.  A brief search turned up the fact that Adobe recently shut off their activation server for this old version. 

They provided a page with links to download a version of CS2 that bypasses the need for the activation server, but it appears to not provide all the software in CS2 Premium.  I'm not the first to have this issue: http://forums.adobe.com/thread/1114930?tstart=0

I started a separate discussion for Mac CS2 Premium at http://forums.adobe.com/thread/1129934?tstart=30

Thursday, December 27, 2012

Solving erratic mouse behavior in Ubuntu 12.10 inside VirtualBox

My Ubuntu installation within a VirtualBox VM has been nearly unusable due to random, erratic behavior of the mouse cursor. Problems have included:
  •  a click near the middle of the screen activates a button in the launcher on the left side
  •  occasional hits on the exit button of a window, though the cursor was far from it
  •  inability to drag to select text; the selection would jump upward while I was trying to drag down
  •  other dragging operations would create unpredictable and unwanted results

I did research and found these two references:
http://askubuntu.com/questions/202789/cursor-jumps-when-moving-and-some-other-times
https://forums.virtualbox.org/viewtopic.php?f=3&t=51727&start=45

Based on these, I typed the following into the terminal.
sudo apt-add-repository ppa:a7x/bug1041063
sudo apt-get update
sudo apt-get install xserver-xorg-core

My initial tests show this to be a successful fix for the problems listed above.

Monday, November 5, 2012

Dell Optiplex 780 noise after upgrading to Windows 7

I just finished upgrading my Dell Optiplex 780 to Windows 7 64-bit.  The tower was producing a very irritating high-pitched noise after this upgrade.  After a bit of searching, I found this discussion that seemed to match my problem:
http://en.community.dell.com/support-forums/desktop/f/3514/p/19292677/19546282.aspx

I tested the BIOS setting change for C State Control suggested by carl.hobbs and petewitt.  It solved the problem instantly.


Thursday, October 11, 2012

Drupal REST process update

I posted earlier about the problems I have had integrating Drupal 7 REST with an external site.  Since my last post on the topic,  it has been working flawlessly.

Today, though, I upgraded the Drupal site to use Services 7.x-3.2, and configured the site to require TLS for all traffic.

The REST connection died with no explanation.

After an hour of stressful debugging, I found two separate causes:

1. The upgrade of the Services module reset the REST resources settings. I had to re-enable parsing of application/x-www-form-urlencoded  and the node resource. http://stackoverflow.com/questions/8535820/drupal-login-via-rest-server

2. Requiring all traffic to route through https (TLS) killed the PHP cURL methods.  For a debugging quick fix, adding curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); solved the problem. For a better solution, see http://unitstep.net/blog/2009/05/05/using-curl-in-php-to-access-https-ssltls-protected-sites/

Thursday, August 23, 2012

Google Maps API 3 inside jQuery Accordion

I am working on a web page that utilizes multiple JS libraries including jQuery and Google Maps. My map is inside a jQuery Accordion pane, and has been presenting a problem with partial rendering as described on a StackOverflow topic. In my case, the code was configured to initialize the map at the time of the first click on the accordion panel that contained the map. It worked fine, unless the user switched to a different pane then tried to return to the map. Then, it would only draw approximately 1/4 of the map canvas, with the remainder being gray.

In my research, calling google.maps.event.trigger(map, "resize"); was a consistent suggestion, but the first few locations I tried calling it did not work. I finally solved the problem by binding the trigger to the click event of the jQuery Accordion pane, based on an example at essentialwebconcepts.com.

My code:
function triggerMapResize()
    {
    google.maps.event.trigger(map, "resize");
    }

jQuery(document).ready(function() {
    jQuery("#the-accordion").bind('accordionchange', function(event, ui) {
        if (ui.newContent.attr('id') == 'the-pane-id')
            {
            triggerMapResize();
            }
        });
    });
The only remaining problem is that the center of the map changes when the user returns to the map pane after looking at a different pane.  I started a topic on SO for this issue.

Update August 24:
Several changes were required to get this to work on all browsers including IE. IE failed upon page load when I was trying to initialize the map. Originally I was using window.onload = function () { initialize_map(); } but that resulted in a vague IE error.

I added code to capture the map's center LatLng when the user moves the mouse outside the map canvas, and more code to move the center to that point upon returning to the map.

          var map=null;
    var currMapCenter = null;

    jQuery(document).ready(function() {
    jQuery("#accordion").bind('accordionchange', function(event, ui) {
    if (ui.newContent.attr('id') == 'region-list')
    {
    if(map==null) {
    //first load; call map initialization
    initialize_map();
    }
    triggerMapResize();
    }
    });

    function initialize_map() {
   
    //do initialization here...
   
    google.maps.event.addListener(map, 'mouseout', function() {
    currMapCenter=map.getCenter();
    });
    }

    function triggerMapResize() {
    google.maps.event.trigger(map, "resize");
    map.setCenter(currMapCenter);
    }

A side note about another problem I ran across in IE8 that has limited documentation online: When creating LatLng arrays, double-check syntax to be sure there is no comma after the final element. While the map looked perfect in standards-compliant browsers, in IE8 each polygon had a segment extending up to near the North Pole.

var polygonPoints= [
        new google.maps.LatLng(24.3250983277945,-79.4028109345145),
        new google.maps.LatLng(48.9377507851552,-142.984008088915),
        new google.maps.LatLng(37.9247004907078,-131.891417410329),
        new google.maps.LatLng(29.8055038628199,-122.143142289543),
        new google.maps.LatLng(21.6909424687438,-114.135809333967),
        new google.maps.LatLng(24.3250983277945,-79.4028109345145),
        ];

This mistake cost me an hour of confusion. Finally I found a discussion mentioning trailing commas with Google Maps in Internet Explorer and discovered the improper extra comma at the end of each array.   It was caused by creating the LatLng object using concatenation in Excel without manually trimming the last value.

Saturday, August 18, 2012

The power of introverts



I just finished reading Quiet, by Susan Cain. It is by far the best book I have read in a very long time. I can relate completely to her description of extroversion being prized by society, and quietness being condemned.  I have lived with such condemnation my entire life. I have even sought medical treatment to be "cured" of the affliction. This book made me aware that I am not alone in this. It has also given me a new perspective on my place and value in society.
 
This is worth sharing:
In a culture where being social and outgoing are prized above all else, it can be difficult, even shameful, to be an introvert. But, as Susan Cain argues in this passionate talk, introverts bring extraordinary talents and abilities to the world, and should be encouraged and celebrated.


I am very thankful to have finally found employment in an organization that has other people like me, and values my contribution and strengths rather than coercing me to be something I am not.  If only other groups of people in my life could be as understanding.

Wednesday, August 8, 2012

Capturing Facebook Atom feed via PHP cURL

I have been working on how to retrieve the RSS feed of our company Facebook page for inclusion in our website. Thanks to the answer by Francois Deschenes on a Stack Overflow topic, I have the beginnings of a functional solution:

$curl_handle=curl_init();
curl_setopt($curl_handle, CURLOPT_URL,"https://www.facebook.com/feeds/page.php?format=atom10&id=111111111111111"); curl_setopt($curl_handle, CURLOPT_CONNECTTIMEOUT,5);
curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER,1);
curl_setopt($curl_handle, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl_handle, CURLOPT_USERAGENT, array('User-Agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Safari/534.45'));
curl_setopt($curl_handle, CURLOPT_VERBOSE, true);
$buffer = curl_exec($curl_handle);
curl_close($curl_handle);

if (empty($buffer))
    {
    print "Sorry, request failed.";
    }
else
    {

    (do stuff with the feed)
           }

I will update this posting as this project progresses.