Francis Ford Coppola Winery Launched

We have finally launched the all new Franics Ford Coppola Winery website.

I was responsible for all the front end and back end code including HTML/CSS/JS and All the wonderful flash you see on the homepage. The site was built custom using C# and ASP.Net MVC framework and has a supporting custom built Content Management System.

The flash homepage was built out in a modular way with a custom framework so new modules could easily be developed and dropped right in.

Please enjoy
http://www.franciscoppolawinery.com

fcw

Dizcollect.com has launched…

I was late launching and now I’m late notifying my blog about it ;-)

At DizCollect we want to help you track and grow your collection of Disney Pins, Disney Vinylmation, Disney Dollars, Disney Books, Disney Blogs, Disney Podcasts, Disney Figurines, Disney Miniatures and much much more. Our site is in its infancy stage and will be growing by leaps and bounds over the coming days, months and years.

Our goal is to become the definitive destination for Disney Collectible information.

I invite you to explore and start building your online portfolio today.

Dizcollect.com is launched. Check it out!

dc

BetaMouse – A New Podcast Where Tech Meets Disney

n444092770433_6986Join me and 4 other tech nuts and disney geeks talk about the small little space (ok, it’s actually quite large) where Disney and Technology meet.

BetaMouse.net Blog

BetaMouse on Facebook

BetaMouse on Twitter

BetaMouse on iTunes

 

 

 

 

Coppolaresorts.com Launched

We have launched our new web site here at work to support Francis Ford Coppola’s Resorts Business.

http://www.coppolaresorts.com

It is my first full project (sole coder) building a site of this size using ASP.NET/MVC framework. I also built out a custom back-end content management system.

Enjoy!

cr

Oh my … someone needs to learn recursion

Was modifying some legacy code I inherited and came across this beautiful piece…
Something tells me, RECURSION, could have helped this mess.

Click here to see the whole thing…

Taste:

# This sorts out the responses.  It currently goes to seventeen levels.
for (my $a = 0; $a < $message_counter; $a++) {
my $no = ($all_these{$response_to[$a]} ? 0 : 1);
if ($response_to[$a] == 0 || $no) {
$page .= qq(\r<BR>) . ‘&nbsp;’ x 2 . qq($line[$a]);
for (my $b = 0; $b < $message_counter; $b++) {
if ($response_to[$b] == $message_id[$a]) {
$page .= “\r<BR>” . ‘&nbsp;’ x 4 . qq($line[$b]);
for (my $c = 0; $c < $message_counter; $c++) {
if ($response_to[$c] == $message_id[$b]) {
$page .= “\r<BR>” . ‘&nbsp;’ x 6 . qq($line[$c]);
for (my $d = 0; $d < $message_counter; $d++) {
if ($response_to[$d] == $message_id[$c]) {
$page .= “\r<BR>” . ‘&nbsp;’ x 8 . qq($line[$d]);
for (my $e = 0; $e < $message_counter; $e++) {
if ($response_to[$e] == $message_id[$d]) {
$page .= “\r<BR>” . ‘&nbsp;’ x 10 . qq($line[$e]);
for (my $f = 0; $f < $message_counter; $f++) {
if ($response_to[$f] == $message_id[$e]) {
$page .= “\r<BR>” . ‘&nbsp;’ x 12 . qq($line[$f]);
for (my $g = 0; $g < $message_counter; $g++) {
if ($response_to[$g] == $message_id[$f]) {
$page .= “\r<BR>” . ‘&nbsp;’ x 14 . qq($line[$g]);
for (my $h = 0; $h < $message_counter; $h++) {
if ($response_to[$h] == $message_id[$g]) {
$page .= “\r<BR>” . ‘&nbsp;’ x 16 . qq($line[$h]);
for (my $i = 0; $i < $message_counter; $i++) {
if ($response_to[$i] == $message_id[$h]) {
$page .= “\r<BR>” . ‘&nbsp;’ x 18 . qq($line[$i]);
for (my $j = 0; $j < $message_counter; $j++) {
if ($response_to[$j] == $message_id[$i]) {
$page .= “\r<BR>” . ‘&nbsp;’ x 20 . qq($line[$j]);
for (my $k = 0; $k < $message_counter; $k++) {
if ($response_to[$k] == $message_id[$j]) {
$page .= “\r<BR>” . ‘&nbsp;’ x 22 . qq($line[$k]);
for (my $l = 0; $l < $message_counter; $l++) {
if ($response_to[$l] == $message_id[$k]) {
$page .= “\r<BR>” . ‘&nbsp;’ x 24 . qq($line[$l]);
for (my $m = 0; $m < $message_counter; $m++) {
if ($response_to[$m] == $message_id[$l]) {
$page .= “\r<BR>” . ‘&nbsp;’ x 26 . qq($line[$m]);
for (my $n = 0; $n < $message_counter; $n++) {
if ($response_to[$n] == $message_id[$m]) {
$page .= “\r<BR>” . ‘&nbsp;’ x 28 . qq($line[$n]);
for (my $o = 0; $o < $message_counter; $o++) {
if ($response_to[$o] == $message_id[$n]) {
$page .= “\r<BR>” . ‘&nbsp;’ x 30 . qq($line[$o]);
for (my $p = 0; $p < $message_counter; $p++) {
if ($response_to[$p] == $message_id[$o]) {
$page .= “\r<BR>” . ‘&nbsp;’ x 32 . qq($line[$p]);
for (my $q = 0; $q < $message_counter; $q++) {
if ($response_to[$q] == $message_id[$p]) {
$page .= “\r<BR>” . ‘&nbsp;’ x 34 . qq($line[$q]);
for (my $r = 0; $r < $message_counter; $r++) {
if ($response_to[$r] == $message_id[$q]) {
$page .= “\r<BR>” . ‘&nbsp;’ x 36 . qq($line[$r]);
for (my $s = 0; $s < $message_counter; $s++) {
if ($response_to[$s] == $message_id[$r]) {
$page .= “\r<BR>” . ‘&nbsp;’ x 38 . qq($line[$s]);
for (my $t = 0; $t < $message_counter; $t++) {
if ($response_to[$t] == $message_id[$s]) {
$page .= “\r<BR>” . ‘&nbsp;’ x 40 . qq($line[$t]);
for (my $u = 0; $u < $message_counter; $u++) {
if ($response_to[$u] == $message_id[$t]) {
$page .= “\r<BR>” . ‘&nbsp;’ x 42 . qq($line[$u]);
for (my $v = 0; $v < $message_counter; $v++) {
if ($response_to[$v] == $message_id[$u]) {
$page .= “\r<BR>” . ‘&nbsp;’ x 44 . qq($line[$v]);
for (my $w = 0; $w < $message_counter; $w++) {
if ($response_to[$w] == $message_id[$v]) {
$page .= “\r<BR>” . ‘&nbsp;’ x 46 . qq($line[$w]);
for (my $x = 0; $x < $message_counter; $x++) {
if ($response_to[$x] == $message_id[$w]) {
$page .= “\r<BR>” . ‘&nbsp;’ x 48 . qq($line[$x]);
for (my $y = 0; $y < $message_counter; $y++) {
if ($response_to[$y] == $message_id[$x]) {
$page .= “\r<BR>” . ‘&nbsp;’ x 50 . qq($line[$y]);
for (my $z = 0; $z < $message_counter; $z++) {
if ($response_to[$z] == $message_id[$y]) {
$page .= “\r<BR>” . ‘&nbsp;’ x 52 . qq($line[$z]);
for (my $aa = 0; $aa < $message_counter; $aa++) {
if ($response_to[$aa] == $message_id[$z]) {
$page .= “\r<BR>” . ‘&nbsp;’ x 54 . qq($line[$aa]);
for (my $bb = 0; $bb < $message_counter; $bb++) {
if ($response_to[$bb] == $message_id[$aa]) {
$page .= “\r<BR>” . ‘&nbsp;’ x 56 . qq($line[$bb]);
for (my $cc = 0; $cc < $message_counter; $cc++) {
if ($response_to[$cc] == $message_id[$bb]) {
$page .= “\r<BR>” . ‘&nbsp;’ x 58 . qq($line[$cc]);
for (my $dd = 0; $dd < $message_counter; $dd++) {
if ($response_to[$dd] == $message_id[$cc]) {
$page .= “\r<BR>” . ‘&nbsp;’ x 60 . qq($line[$dd]);
for (my $ee = 0; $ee < $message_counter; $ee++) {
if ($response_to[$ee] == $message_id[$dd]) {
$page .= “\r<BR>” . ‘&nbsp;’ x 62 . qq($line[$ee]);
for (my $ff = 0; $ff < $message_counter; $ff++) {
if ($response_to[$ff] == $message_id[$ee]) {
$page .= “\r<BR>” . ‘&nbsp;’ x 64 . qq($line[$ff]);
for (my $gg = 0; $gg < $message_counter; $gg++) {
if ($response_to[$gg] == $message_id[$ff]) {
$page .= “\r<BR>” . ‘&nbsp;’ x 66 . qq($line[$gg]);
for (my $hh = 0; $hh < $message_counter; $hh++) {
if ($response_to[$hh] == $message_id[$gg]) {
$page .= “\r<BR>” . ‘&nbsp;’ x 68 . qq($line[$hh]);
for (my $ii = 0; $ii < $message_counter; $ii++) {
if ($response_to[$ii] == $message_id[$hh]) {
$page .= “\r<BR>” . ‘&nbsp;’ x 70 . qq($line[$ii]);
for (my $jj = 0; $jj < $message_counter; $jj++) {
if ($response_to[$jj] == $message_id[$ii]) {
$page .= “\r<BR>” . ‘&nbsp;’ x 72 . qq($line[$jj]);
for (my $kk = 0; $kk < $message_counter; $kk++) {
if ($response_to[$kk] == $message_id[$jj]) {
$page .= “\r<BR>” . ‘&nbsp;’ x 74 . qq($line[$kk]);
for (my $ll = 0; $ll < $message_counter; $ll++) {
if ($response_to[$ll] == $message_id[$kk]) {
$page .= “\r<BR>” . ‘&nbsp;’ x 76 . qq($line[$ll]);
for (my $mm = 0; $mm < $message_counter; $mm++) {
if ($response_to[$mm] == $message_id[$ll]) {
$page .= “\r<BR>” . ‘&nbsp;’ x 78 . qq($line[$mm]);
for (my $nn = 0; $nn < $message_counter; $nn++) {
if ($response_to[$nn] == $message_id[$mm]) {
$page .= “\r<BR>” . ‘&nbsp;’ x 80 . qq($line[$nn]);
for (my $oo = 0; $oo < $message_counter; $oo++) {
if ($response_to[$oo] == $message_id[$nn]) {
$page .= “\r<BR>” . ‘&nbsp;’ x 82 . qq(<A HREF=”sub_discuss.cgi?section_id=$section_id&subject_id=$subject_id&vp=1&message_id=$message_id[$oo]&vp=1#$message_id[$oo]“><I>more…</I></A>);
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
   # This sorts out the responses.  It currently goes to seventeen levels. 

	for (my $a = 0; $a < $message_counter; $a++) {

        my $no = ($all_these{$response_to[$a]} ? 0 : 1);

        if ($response_to[$a] == 0 || $no) {

          $page .= qq(\r<BR>) . '&nbsp;' x 2 . qq($line[$a]);

          for (my $b = 0; $b < $message_counter; $b++) {

            if ($response_to[$b] == $message_id[$a]) {

              $page .= "\r<BR>" . '&nbsp;' x 4 . qq($line[$b]);

              for (my $c = 0; $c < $message_counter; $c++) {

                if ($response_to[$c] == $message_id[$b]) {

                  $page .= "\r<BR>" . '&nbsp;' x 6 . qq($line[$c]);

                  for (my $d = 0; $d < $message_counter; $d++) {

                    if ($response_to[$d] == $message_id[$c]) {

                      $page .= "\r<BR>" . '&nbsp;' x 8 . qq($line[$d]);

                      for (my $e = 0; $e < $message_counter; $e++) {

                      if ($response_to[$e] == $message_id[$d]) {

                        $page .= "\r<BR>" . '&nbsp;' x 10 . qq($line[$e]);

                        for (my $f = 0; $f < $message_counter; $f++) {

                          if ($response_to[$f] == $message_id[$e]) {

                            $page .= "\r<BR>" . '&nbsp;' x 12 . qq($line[$f]);

                            for (my $g = 0; $g < $message_counter; $g++) {

IE7 + keypresses + wmode solution found

The DOM is like an Ogre — it has layers… lots and lots of layers…

This way of thinking was key to the solution I found to a very interesting problem a friend of mine presented.

Problem: Integrating a Flash game that uses the up and down arrows into a new site with drop down menus. The menus need to sit on top of the flash game, so wmode=transparent must be used. As we know, Z-index does not work when a flash piece is running in the default “window” mode. Because the page is longer than the viewable area, it needed to scroll and in IE7, when hitting the up and down arrows in the game, the whole page would scroll. Essentially when the flash piece runs in wmode=transparent|opaque, IE7 captures the keystrokes along with the flash piece.

What do we want: We want the user to be able to use the up and down arrows without the page scrolling and the key presses registering in the game like it does in all other browsers.

Solution: overflow:auto

I wrapped the flash content div in a wrapper div the exact height of the flash movie and set its overflow property to auto. What this does is put the scrolling/key capturing focus on that div instead of the document when you click on the flash piece and play the game. Because the wrapper div is the exact height, there is nothing to scroll and all works well, flash registers the key presses and the screen does not move.

Sample:

<div id="gameWrapper" style="height:400px; overflow:auto">
<div id="flashContent">Flash will load here via SWFObject call. The flash movie is 400px in height and has the param.wmode set to "transparent|opaque"</div>
<div>

I was shocked I could not find this solution as easily online as I’d hoped. I did find a few examples of this after I figured it out, but the posts were very difficult to read made a simple solution look terribly difficult.

ThreeSharp and creating an empty folder

I’m building a web based S3 explorer/media manager for a work project as well as my DizCollect project. It is being written in .NET/C# ASP.NET MVC and I had a special need — creating empty folders for users to upload files to. Since I don’t store the files locally, I couldn’t just upload new files and have the folders build out.

I use the wonderful C# S3 library ThreeSharp.

The one thing it does not do out of the box is allow you to just create an empty folder. My behavior will be that a user clicks on a “new folder” button and is presented a text box. They enter the name of the new folder and it is created in the current location they are browsing in my S3 explorer. To get ThreeSharp to do this, you must add a content_type of  “binary/octet-stream” and specify the folder with a trailing ‘/’. The ‘/’ is very important and is the difference between a folder or a file being created.

I hope this helps someone. It took me several hours to figure this out and I could not find a good example online anywhere.

Here is my extension to the ThreeSharpWrapper class to create an empty folder

/// <summary>
/// Adds a folder (empty) to a bucket
/// </summary>
public void AddEmptyFolder(String bucketName, String keyName) {
using (ObjectAddRequest objectAddRequest = new ObjectAddRequest(bucketName, keyName))
{
objectAddRequest.QueryList.Add("content_type", "binary/octet-stream");
using (ObjectAddResponse objectAddResponse = this.service.ObjectAdd(objectAddRequest)) { }
}
}

then to call the function you would use:

wrapper.AddEmptyFolder("myBucket", "test/");  //@params: (str)bucketName, (str)folderName

DizCollect

DizCollect.com

COMING SOON

Tetro Launched

Working hard this last week and a half to build a new flash based site for Francis Coppola’s new movie – Tetro.

Please visit the site, more content being added in the coming weeks.

http://www.tetro.com/

tetro

Lee Cockerell on Leadership

I just finished a great book calld “Creating Magic: 10 Common Sense Leadership Strategies from a Life at Disney” by Lee Cockerell. Lee was an Executive Vice President of Operations for Walt Disney World and helped build up Marriot to the hotel powerhouse it is today.

This book is a guide for leaders based on lessons he and others learned at Marriot and Disney. Any great leader should read this book and get inside knowledge that they teach at the Disney institute on how to interact with customers, but much more importantly how to interact with your employees and how to be the best ethical and productive leader you can be.

One passage near the end of the book summed it up for me and really is how I feel and live my life:

At the end of your life, no one will care what titles you once held, or how much money you made, or what a big shot you thought you were. If you really care about your legacy—and you should if you want to be a great leader—then take a long, close look at your values and the principles on which they are based. If your character is strong, and you build your actions faithfully on that foundation, you will be remembered as a leader worthy of being followed.

←Older