CSS Selector Browser Support

As many web developers know, CSS support is highly varied amongst browsers. I often find myself hunting for which selectors are more heavily supported. As such, I thought I’d post a direct link to a quality resource here so I wouldn’t have to hunt anywhere besides on BorkWeb.

Here’s some decent resources:

Oracle 10g: Using The Returning Clause With ADOdb

Plymouth State University uses Oracle heavily due to its Student Information System of choice – SungardHE Banner. As such, I play around in Oracle a lot (sometimes a lot more than I’d like) and I occasionally find functionality that seems more cumbersome than it should.

One such item is selecting the last inserted value on an auto-incrementing column.

Historically, when you are inserting into a table with auto incrementing values (via a sequence) you have always been able to grab the last value with a simple SELECT statement (line 22):

-- setup a table
CREATE TABLE bork (id INTEGER NOT NULL PRIMARY KEY, data VARCHAR2(10) NOT NULL);

-- create the sequence
CREATE SEQUENCE sq_bork INCREMENT BY 1 START WITH 1; 

-- create a trigger for auto-incrementing the sequence'
CREATE OR REPLACE TRIGGER tr_sq_bork
BEFORE INSERT
ON bork
REFERENCING NEW AS NEW
FOR EACH ROW
BEGIN
SELECT sq_bork.NEXTVAL INTO :NEW.id FROM DUAL;
END;
/

-- insert a record into the table
INSERT INTO bork (name) VALUES ('Matt');

-- retrieve last inserted id
SELECT sq_bork.CURRVAL FROM dual;

As you see there, two statements must be executed to get that new id. The INSERT and the SELECT. Well, as of Oracle 10g you can utilize the RETURNING clause like so:

INSERT INTO bork (name) VALUES ('Matt') RETURNING id INTO i_id;

That statement inserts a record into “bork” and returns the value of “id” into the “i_id” variable. Pretty sexy and all with one DML statement. Here’s what we do at Plymouth to utilize the RETURNING clause with the PHP library ADOdb:

< ?php
//do your database object initialization here:
//$db = new ADONewConnection...

$sql = "BEGIN INSERT INTO bork (data) VALUES ('Matt') RETURNING id INTO :i_id; END;";
$stmt = $db->PrepareSP($sql);
$db->OutParameter($stmt, $inserted_id, 'i_id');
$db->Execute($stmt);
?>

Yup. 4 lines of PHP but only 1 statement sent to the database! I’d take the extra lines any day over the latency of data retrieval.

JamLegend – Rock Band Online…and Social

[[innerindex]]JamLegend
Wow. Its all I could say when Adam sent me an invite to JamLegend – a Guitar Hero-esque game that is a pleasant mix of playability, art, and social interaction. I wasn’t expecting much when I got the invite, but as soon as I played through my first song, I was blown away.

The site isn’t allowing open registration at the moment, but you can get on a waiting list…but you can get around some aspects of the waiting list as stated by the JamLegend FAQs:

JamLegend is currently in invitation-only beta. We will be letting people into the site on a first-come, first-served waiting list.

If you really want to get an invite, twitter “@JamLegend I want http://www.JamLegend.com” or become a fan on Facebook. We will randomly send out invites to users who twitter or are fans.

You could also ask your friends to see if they have any invite codes.

The beta will end once we work out some kinks.

JamLegend

How It Works

JamLegend is a Flash game with the number keys 1-5 (and function keys F1-F5) bound to their corresponding positions on the fret board. Like Guitar Hero, dots approach the bottom in time with the music and you must hold the appropriate number(s) in and strum. How? With the Enter key, of course!

You have two primary modes of play: Jam Style and Chill Style…shown here:

JamLegend

Playing the game can be odd depending on your keyboard. If you have a beefy enough keyboard where the function keys are evenly spaced (unlike one of my keyboards) you shouldn’t have much trouble with Jam Style.

My favorite method for play, however, has been using my Wii Guitar on my Mac thanks to DarwiinRemote. :D

The Music

The site’s slogan is “The free way to play the songs you love” is a little misleading. JamLegend is a new site with a small user base at the moment and little buy-in from big name stars. So…the appropriate slogan for now is “The free way to play the songs you will soon love because this site is freaking awesome”.

Are the songs bad? Definitely no. I hadn’t heard of any of the bands prior to playing around with JamLegend. Am I bummed that the songs aren’t from my favorite bands? No…I actually like a number of the artists. Blue Judy being one of my favorites – an Indie Rock Band from LA – and Double Stamp – another Indie Rock Band from Claremont, CA.

JamLegend does a nifty job displaying the songs that are currently popular (although this feature will become better as the user base grows), as well as bubbling new songs in front of your face. In addition to listing top songs, you can search and browse the site for specific genres, artists, and songs. Good times!

JamLegend

The Social Side

Similar to the Guitar Hero stat site that came with Guitar Hero III, JamLegend lists your bests, averages, global rankings, etc. You can add friends, challenge them to duels, or have massive guitar showdowns with large numbers of players. As an additional cool thing, you can earn groupies by completing Achievements. Groupies serve no real purpose at this time save for bragging rights but in the future that may change!

Where Its Heading

In its current state, JamLegend is a pretty ballsy free web application. There are some things coming down the pipe, however, that will make it that much cooler.

Music: If adoption of this game picks up, we could very easily see some larger named bands put their music out for play. Heck, the All American Rejects song Gives You Hell is pending track creation. Awesome.

More Instruments: JamLegend claims they are working on additional playable instruments! They are planning on adding keyboard, drums, bass, and (due to popular request)… cowbell.

Thoughts

This game will very easily become my mobile Guitar Hero fix (and soon to be Rock Band fix once the new instruments are implemented). The JamLegend site is gorgeous. The game is very well implemented. The music is good. I <3 it.

Delete/Backspace Stops Working in Oracle SQLDeveloper

I a huge fan of Oracle SQL Developer but I ran into an issue a while back that left me scratching my head and re-installing. The issue? Most key strokes other than letters and numbers failed to function. Yeah…no delete or backspace.

When this issue happened a second time I did a little playing with the app and figured out what to do. If you find yourself in a similar predicament simply do this:

  1. Open SQL Developer
  2. Click on the Tools > Preferences menu
  3. Click on Accelerators on the left
  4. Click the Load Preset… button

Yup. That’s it. The only lame part about that is all your custom key bindings go away and must be re-done. But that is much nicer than re-installing!

Chickipedia: Babe Encyclopedia

Chickipedia. A wiki of attractive women. Awesome? I think so…my wife doesn’t.

Yeah, yeah. So it feels a bit weird posting something like this on BorkWeb, but its one of those sites that you wish you had thought about it first. The site is a good idea. A lot of people would happily waste their time perusing Chickipedia. The layout is very well done, there are all kinds of blocks of content making women very findable, and…lets face it…the content itself is quality.

Chickipedia is not a porn site. Instead, the site is your one-stop-shop to see <insert-name-here>’s birthdate, nicknames, height, hobbies, measurements, ethnicity, appearances, photos, videos, etc. Much of the data – including the measurements (see below) – can be clicked on to find women who match that specific attribute.

Picture 2

As an additional cool factor, you can embed women in your own content as I have done with Elisha Cuthbert (below). Pretty nifty. Heck, the whole site is. Thank you Chickipedia. My wife may think you are stupid, but on behalf of males everywhere…we salute you.


Elisha Cuthbert – see more hot women

Google Chrome on the Mac – a la CodeWeavers

Google launched its new browser Chrome on September 2nd and the web was abuzz with talk of a new contender in the browser space. My choice to pepper my house and cube at work with Macs rather than Windows boxes left me complaining about the lack of a native Mac version of Chrome…which Google assures us is coming.

Code Weavers, however, has just released Crossover Chromium built from build 21 of the Chromium Open Source browser.

Chromium

The initialization of Chromium the first time I opened it took a while but once it was up and running, things were pretty solid. The browser has all the JavaScript and DOM debugging tools but it seems the process manager tool isn’t fully functional..which is really my draw to the browser (when I get dead set on playing with the Process Manager tool, I’ll break down and install Chrome with Parallels). I suppose I’ll be following CodeWeaver’s suggestion:

Q. Should I run CrossOver Chromium as my main browser?

A. Absolutely not! This is just a proof of concept, for fun, and to showcase what Wine can do. Chromium itself is just beginning. As the Chromium project progresses, they will be providing more compelling support for Mac OS and Linux, particularly with process security and memory management. Those future versions from Chromium will be better suited for daily use than this version.

Until Google launches its official Mac native Chrome, Chromium will satisfy me for now.

iPhone App: pTerm

pTerm At long last a Terminal application is available on the iPhone, and pTerm is its name! Based on the desktop client PuTTY, you can SSH, Telnet, and raw TCP from your iPhone/iPod Touch!

Its features are:

  • xterm terminal emulation
  • Standard 80×24 screen
  • SSH, Telnet, or “raw” TCP connections
  • Ctrl key support
  • Landscape and Portrait modes
  • Works over Edge, 3G, or WiFi
  • Stores your list of host/port/protocol for convenient access
  • Terminal supports pinch and zoom
  • Based on PuTTY, a stable and feature-rich code base

All in all, the app seems pretty solid. My only gripe is the lack of a tab key for tab completion. Now I’ll be able to debug stuff remotely WITHOUT using VNCLite for the iPhone. Check pTerm out, it is well worth the $4.99.

Update:
There are some more things that I find annoying:

  • No tab key – no tab completion…
  • No arrow keys – this makes navigating around a line a little bit of a pain.
  • You can’t hide the keyboard. It’d be nice to see a full screen of top.
  • No color customization

Despite the annoyances, the app is still pretty solid. Lets just hope new versions come out sooner than later with some of my hopes and dreams attached.

IMG_0004.PNGIMG_0004.PNG

TSNG 3: D&D Character Sketches

To help myself get into my new Dragonborn character in my friend’s 4th Edition Dungeons and Dragons campaign (TSNG 3), I’ve whipped up a couple of drawings.

This first one is a quick 1-hour sketch of my character clad in some scale armor and pointing at something. I did a very rough coloring job on this guy, leaving all the lines visible. I really could have spent a LOT more time doing the coloring, but I did this while waiting for my character to show up in the first game. Overall I think it turned out ok for a quickie.

Heskaar Ur'bara'da'eredar

This next one will eventually hold the finished heads of all 5 player characters. I haven’t heard what each character looks like so I’ve only drawn and colored my character (in the middle). I look forward to finishing this puppy! Here it is thus far:

TSNG 3 Character Sketches

Both were drawn in Adobe Photoshop with my Wacom tablet.

It is Official! Knights of the Old Republic MMORPG

KOTOR Exciting news! BioWare‘s secret MMO project has been unveiled and my hopes are being realized! Star Wars: Knights of the Old Republic Massively Multi-Player Online Game is slated for release in 2009, and if all goes well, this MMO will deliver where Star Wars Galaxies failed.

BioWare has a track record of developing outstanding computer role-playing games including the recent XBox 360 game that took the world by storm, Mass Effect. That game company can weave a story that rivals the ability of Blizzard and I have high hopes that they will be able to deliver on this MMO. Only time will tell!

Dr. Horrible’s Sing-A-Long Blog: Act 1 Posted!

Picture 1

Joss Whedon‘s much anticipated Dr. Horrible’s Sing-A-Long Blog has released Act 1 today! The singing, the dialog, and the plot are all awesome. Felicia Day, Neal Patrick Harris, and Nathan Fillion did an awesome job. I can’t wait until Act 2 on Thursday!

Check out Act 1 at the Official Dr. Horrible site!

Diablo 3 Website Launched

[[innerindex]]The exciting news of Diablo III was confirmed to the world this morning when Blizzard unveiled it in its week-long splash screen! Shortly after my previous post on the topic, the Diablo III website was launched too! The site, as is typical with Blizzard sites, is gorgeous…here’s some info that was gleaned.

Storyline

It has been twenty years since the events of Diablo II. Of those who faced the Lords of Hatred, Terror, and Destruction in the battle over the fate of Sanctuary, there are few still living who can bear to remember the horrors that the Prime Evils wrought upon the world. And of those who did not witness the terrible events firsthand, most believe the stories to be little more than myth. But something evil is stirring once again in Tristram, and it may already have claimed its first victim: Deckard Cain.

Character Classes

There will be 5 character classes in Diablo III and classes can be either male OR female.

The Barbarian

Picture 2

This old favorite is back! See the Barbarian page. Some skills that are definitely returning are: Cleave, Ground Stomp, Leap, and Whirlwind! Check the barbarian page for videos on these moves!

The Witch Doctor

Picture 1

Here’s the newbie! This guy seems pretty freaking sweet. Check the Witch Doctor page for more information. This class will feature spells such as: Firebomb, Horrify, Locust Swarm, Mass Confusion, and Soul Harvest.”

Video

Currently on the Diablo III site there are two trailers. Cinematic and Gameplay. I can’t find any version of the two in decent quality yet so I’ll have to post those puppies later. In the mean time, check the videos out on the Diablo III site!

Release Date

As with any Blizzard game during announcements…there is no release date announced. Meh. But that’s why we love it. They polish a game until it glistens beyond compare and THEN deliver it to the world. I just wish they’d wait to announce things until a day before it is released so I don’t have to drool for years on end :P

Diablo 3 Officially Announced!

Diablo 3 Announced

Blizzard has had a splash screen that changed daily for the past 5 days, today was its final day and I was extremely surprised to see that it revealed what has long been rumoredDiablo 3! This is exciting news!

The graphical announcement looks freaking awesome and I look forward to the link on the announcement to actually go to the Diablo site rather than a broken page! w000000t!

Compiling Invalid Objects in PL/SQL

While I do a lot of and prefer PHP and JavaScript development, my daily job has a darker side…PL/SQL. At times the packages that I oversee invalidate during upgrades or poor compilations of a package that ends up having a ripple effect.

Here’s a query I wrote to find the invalid objects and generate compile statements to attempt to fix whatever is busted.

SELECT CASE object_type
       WHEN 'PACKAGE' THEN
        'ALTER '||object_type||' '||owner||'.'||object_name||' COMPILE;'
       ELSE
        'ALTER PACKAGE '||owner||'.'||object_name||' COMPILE BODY;'
       END
  FROM dba_objects
 WHERE status = 'INVALID'
   AND object_type in ('PACKAGE','PACKAGE BODY','FUNCTION','PROCEDURE');