No Sound on Ubuntu 8.10 with Intel Sound Card

December 30th, 2008

In addition to the problems I have had with KDE after my upgrade to 8.10, I also lost my sound. I have been trolling the Internet trying to find a solution and finally got it fixed after a couple days of frustration. I followed the instructions here for PulseAudio, and now everything seems to be working fine - well, at least I am able to get sound out of my speakers while listening to a CD and from Flash Movies on websites. Haven’t tried an input device yet…

Pass multi-dimensional array in ajax request with jQuery

December 24th, 2008


I have a bunch of javascript objects flying around page that interacts with Google Maps, and I wanted to get the data out of some of the objects to pass via a jQery AJAX $.post call to a PHP script. jQuery seems to have everything, so I was surprised there wasn’t any functionality built in to do this (at least as far as I am aware of). I found JSON stringify, which may come in very handy in the future, but seemed like overkill for this particular instance, as I needed a very limited set of data. Below is the code I came up with. My object lineM has an array of Line objects (lineM.lines), and I added a method getWaypoints to the Line object prototype (this method returns a regular javascript array). Then it’s just a matter of creating an object literal, and adding properties with “[]” appended to the property name.

var params = {};
for(var i = 0; i < lineM.lines.length;i++) {
params['line'+i+'[]']=lineM.lines[i].getWaypoints();
}
$.post('/test.php',params,function(data) {
$("#ieTest").text(data);
});

When I spit out the results in PHP, I get :

Array ( [line0] => Array ( [0] => 47.399458084,-121.393484585 [1] => 47.405251153,-121.395479813 [2] => 47.412148202,-121.397021664 [3] => 47.419077186,-121.395984907 [4] => 47.422244288,-121.387493955 [5] => 47.427556822,-121.382973259 [6] => 47.431650627,-121.383301159 [7] => 47.433441086,-121.382011855 [8] => 47.432344733,-121.381145837 [9] => 47.431196412,-121.37981873 ) [line1] => Array ( [0] => 47.457933301545786,-121.42310857772827 [1] => 47.46124106812506,-121.41435384750366 [2] => 47.46318500928391,-121.40516996383667 [3] => 47.45874575472201,-121.40710115432739 [4] => 47.458716738753324,-121.41165018081665 ) [line2] => Array ( [0] => 47.45471721756243,-121.42242193222046 [1] => 47.45404979509893,-121.41409635543823 [2] => 47.4578510880274,-121.41624212265015 [3] => 47.45634221074817,-121.40671491622925 [4] => 47.459766139142666,-121.40469789505005 ) )

GMap Double Click Event Fired When Double Clicking on Markers in Firefox

December 24th, 2008

According to the Google Map’s documentation, a doubleclick event should not be triggered on the GMap object when it occurs on a marker : “This event is fired when a double click is done on the map. Notice that this event will not be fired if the double click was on a marker or other clickable overlay. ” But I am finding in Firefox 3.0.5 on both Windows and Linux, the event is triggered when clicking on a marker, which results in centering the map. This does not occur in IE7 on Windows. It’s not a huge deal, but I have attached event listeners to markers so I could delete them when a user double clicks. They do in fact get deleted in Firefox, but the maps also centers on where the user clicked, which isn’t what I want.

I am using custom icons and thought that might be the problem, so I went with the standard icon but the problem persists. I searched GMaps issues and sure enough, if your marker is set to be draggable, the event will pass through to GMap and center in Firefox.I tried to mess around with the code and see if I could find a hack to fix it, but nothing worked. Might be able to “un-center” the map by keeping trac of the events fired, as the marker doubleclick always came first in when I was debugging. But it’s probably not worth it…

Seattle Weather and Amazon

December 22nd, 2008


Here is Seattle we are having a cold spell, which has allowed about 6″ of snow to accumulate where I live, with upwards of 12″ in other neighborhoods. Not a lot considering what I used to deal with in Vermont, but no plows, no sand/salt on the road, lots of hills and drivers unaccustomed to snow makes for treacherous driving. Anyways, I had placed an order with Amazon, and they just sent me an email notifying me that my order may be delayed by a day due to the weather. I don’t know many online stores that would have done that. It isn’t a huge deal, but it goes to show you how Amazon makes buying online so easy.

KDE problems on Intrepid

December 7th, 2008

I updated to 8.10 (Intrepid Ibex) and while the new interface for KDE looks great, I am having major problems. Need to get some work done, so I haven’t had a chance to try and figure out what the issues are. I am writing this while using Gnome… Here is a nice screenshot of my desktop after about 10 minutes of use. I updated my Nvidia driver, but that doesn’t seem to help. Things seems to be working fine in Gnome, although GIMP is acting a little strange.