.:: Run Fat Boy .net ::.

Fitness for the buffet enthusiast.

Choose a Topic:

Clueless about getting into shape? Try RunFatBoy.

Top Posts:

Mon
27
Oct '08

Karaoke, kJams, and Auto CrossFading with iTunes

Anybody who knows me knows that I am a huge fan of karaoke. Back in the college days we took it upon ourselves to build a karaoke stage in the living room complete with mounted multi-monitors on the wall. Those were the good ole’ days

Karaoke stage

In an attempt to recreate these great memories, I have put together a portable karaoke setup that I like to call Karaoke In a Bag ™. KIAB contains a laptop, portable computer speakers, a mixer board, and a library of karaoke music. It works well. I bring it to parties. We sing on the beach. We sing in old folks homes. It’s a blast.

I’ve been using the kJams for playback of my karaoke music. kJams is on the bleeding edge of the karaoke software. Nothing on the PC even comes close to touching it.

Usually when we throw parties we setup the system and just allow people to come up, search for the song they want, double-click it, and away they go. But it’s no fun when the party is just starting. At the beginning of the night no one is drunk and when people are searching for karaoke songs, you can hear crickets chirp.

I have been holding out on registering the software for I want one feature; the ability to automatically cross-fade back and forth between karaoke playback and iTunes playback. In other words, I want music from iTunes to play when the user is searching for their karaoke song, then when the user begins to sing, I want the iTunes music to automatically fade out (karaoke music fade in) and then once the karaoke song is done, the iTunes music should automatically fade back in and continue to play. Constant music is the goal whether it comes from the karaoke singer & kJams or my iTunes library. I never want to hear silence and I want it all to be managed by the computer (there’s important beer drinking to be done, no way in hell I’m going to sit there all night playing DJ switching between iTunes and kJams).

So I set out to write a script to do such a thing. Luckily the user “oss” from the kJams support board gave me a running start with his iTunes crossfade script that he wrote.

Below is my modified version of his script. You will want to start kJams Pro (the Lite version doesn’t have scripting support), iTunes (with the playlist you want it to play through) and then leave the following script running in the background (run it using OS X Script Editor) :

-- Modified 10-27-08 by Jim Jones
-- Script now looks to see if the Video window is full screen.  If the video window is full screen
-- it assumes that a karaoke song is playing and fades out iTunes.  If the video screen is less
-- than full resolution it assumes that karaoke is not being played and starts playing a track from iTunes.
	
-- 11-27-07
-- http://karaoke.kjams.com/forum/viewtopic.php?t=265
-- Please have iTunes and kJams running before launching this script and
-- have a playlist selected in iTunes
-- The simple logic of the script assumes that if iTunes is playing and this script is run,
--  you want to cross fade over to kJams.. Alternately, if iTunes is not playing a track,
--  it assumes you want to cross fade over to iTunes.
-- when you are ready to cross fade to kJams, make sure your next song is
-- highlighted/selected.  It will NOT automatically go to the next track in
-- your kJams playlist.
-- Although I have tested this code, I make no guarantees with this code,
-- any disasters that occur are not my fault.  Use at your own risk!! 
	
tell application "kJams Pro" to set kSpeakers to 0
	
--sets how much in percentage the volume is decreased per step
set fadeStep to 5
	
--sets how long in seconds between each step in the fade
set fadeDelay to 0.1
set kScriptCommand_PLAY_PAUSE to 1
set kScriptCommand_STOP to 2
	
--this is the max volume settings.. iTunes and kJams must share this for proper mixing.. Change to whatever you like.
set MaxVolume to 100
	
--this is the minimum volume setting
set MinVolume to 0
	
set appName to "kJams Pro"
set itunesAppName to "iTunes"
	
-- Playstate will be either 1 for iTunes or 0 for kJams
set playState to 0
set prevPlayState to 0
	
-- Find the bounds for the current system
set _desktopw to 0
set _desktoph to 0
	
-- Get max resolution of system
tell application "Finder"
	set _b to bounds of window of desktop
	set _desktopw to item 3 of _b
	set _desktoph to item 4 of _b
end tell
	
-- Poll the resolution of the Video window and compare it against the max resolution of the system
--  If they are equal, then you can assume the user is playing a karaoke song and you should cross
--  fade out iTunes and crossfade in kJams
	
repeat
	
	set w to 0
	set h to 0
	
	-- Repeatedly get the resolution of kJams Video window and
	--  don't progress until the width and height are greater than zero
	--  If there's an error, probably means the user just closed the Video window
	repeat until w > 0 and h > 0
		try
	
			tell application "System Events"
				tell process "kJams Pro"
	
					tell window "Video"
	
						set _s to get size
						set w to item 1 of _s
						set h to item 2 of _s
	
					end tell
	
				end tell
			end tell
	
		on error errStr number errorNumber
			-- error occurred, Video window was probably closed
		end try
	
		delay 0.1
	
	end repeat
	
	tell application "iTunes"
	
		-- Resolution of Video window equal to max resolution
		--  So we're probably playing a karaoke song.  Fade out music
		--  fade in karaoke music
		if (w ≥ _desktopw and h > _desktoph) then
			set playState to 0
	
			-- If prevPlayState is not the same as the current state
			if (prevPlayState = 1) then
	
				set kJamsVolume to MinVolume
				set iTunesVolume to MaxVolume
				set the sound volume to MaxVolume
	
				tell application "kJams Pro" to set volume kSpeakers level MinVolume
	
				repeat until iTunesVolume ≤ 0
					set iTunesVolume to (iTunesVolume - fadeStep)
					set kJamsVolume to (kJamsVolume + fadeStep)
					tell application "iTunes" to set the sound volume to iTunesVolume
					tell application "kJams Pro" to set volume kSpeakers level kJamsVolume
					delay fadeDelay
				end repeat
				--tell application "kJams Pro" to docommand kScriptCommand_PLAY_PAUSE
	
				tell application "iTunes" to next track
				tell application "iTunes" to pause
	
			end if
	
		else -- Video window not at max, so fade out kJams and fade in iTunes
			set playState to 1
	
			if (prevPlayState = 0) then
				set iTunesVolume to MinVolume
				set kJamsVolume to MaxVolume
				tell application "kJams Pro" to set volume kSpeakers level MaxVolume
				tell application "iTunes" to set the sound volume to MinVolume
				tell application "iTunes" to play
				repeat until kJamsVolume ≤ 0
					set iTunesVolume to (iTunesVolume + fadeStep)
					set kJamsVolume to (kJamsVolume - fadeStep)
					tell application "iTunes" to set the sound volume to iTunesVolume
					tell application "kJams Pro" to set volume kSpeakers level kJamsVolume
					delay fadeDelay
				end repeat
				tell application "kJams Pro" to docommand kScriptCommand_STOP
			end if
		end if
	
		set prevPlayState to playState
	
		delay 0.5
	
	end tell
	
end repeat


Wed
28
May '08

Uncle Bob

My Uncle Bob bought my family growing up their first ever telescope, a telescope so big that at the time it stood taller than me. I can remember watching the stars with the neighbors on a few summers nights.

He took us on a tour of StorageTek in 1988 showing off proudly the systems that they had built and the parts that he had individually machined.

He garnered a respect in myself for the sciences and engineering disciplines that still lives with me today. And along with his adeptness for engineering precision and measurement, he was a really nice guy.

Our lives are given meaning through others. We live through others, we live for others.

Our individual lives are a manifestation of all that who have come before us. And it’s only through giving back to future generations do we give thanks to those that helped us along the way.

Thank-you Uncle Bob. Rest in Peace.

Uncle Bob
Bob Sedlak April 2nd, 1950 - May 20th, 2008


10 day hoodia diet
10 day hoodia diet review
100 hoodia gordonii
18 takes viagra
20 mg cialis dose advice
2007 viagra hmo
acheter cialis france
acheter du viagra
acomplia diet pills
acomplia no prescription
acomplia rimonabant zimulti
acomplia without prescription
adipex versus hoodia
adverse side effects of viagra
african hoodia cactus
ald enterprises hoodia
alli vs xenical
alli xenical diet pill
alternative to viagra
alternative viagra uses
answers about xenical
apcalis levitra viagra
buying viagra in uk
buying viagra online
buying viagra online in britain
can viagra be taken by women
can viagra be used by women
can viagra cause restless leg syndrome
can viagra causes legs to ache
can woman take cialis
can women take cialis
can women take mens viagra
can women take viagra
can young people take viagra
canada in levitra
cheap viagra online
cheap viagra overnight
cheap viagra sales
cheap viagra tablets
cheap viagra walmart
cheap xenical paypal uk
cheapest cialis professional
discount viagra online
discount viagra pills
do boots sell viagra
does cialis work
does hoodia really work
does hoodia work
does medicaid cover viagra kentucky
does propecia cause genetic disorders
does propecia really work for women
does propecia work
does viagra really work
does viagra work
does viagra work for women
does walmart hoodia work
does watermelon have viagra effect
dog ate viagra tablet any danger
drinking and viagra
ecstacy and viagra
edinburgh 17 viagra pages find search
effect of viagra on women
effective hoodia diet pill
effects of hoodia on diabetics
effects of viagra
effects of viagra on women
energy from hoodia gordonii
ephedra hoodia fusion
fake viagra prescription
fast delivery cialis
fda approves viagra
fda on viagra
female use of viagra
female version of viagra
female viagra cream
female viagra sildenafil
file viewtopic t 21508 viagra
file viewtopic t 73 cialis
find search pages years viagra edinburgh
find sites computer shop viagra free
find sites computer shop viagra search
find viagra edinburgh pages search
find viagra edinburgh sites pages
find viagra free computer sites
find viagra free sites
find viagra free sites computer
find viagra free sites edinburgh
free levitra trial
free sample cialis
free sample of cialis
free sample of viagra
free sample pack of viagra
free sample prescription for viagra
free sample viagra
free samples of cialis
g postmessage cialis subject remember
g postmessage cialis subject reply
g postmessage propecia smiley forum
g postmessage propecia smiley online
g postmessage propecia smiley post
g postmessage propecia smiley remember
generic mexican viagra
generic name of viagra
generic soft tab viagra
generic soft tabs cialis
generic viagra canada
generic viagra cheap
generic viagra india
generic viagra lowest prices
generic viagra mexico
generic viagra online
home made viagra
hoodia 14 day free trial
hoodia and heart problems
hoodia and weight loss
hoodia and weight loss and x57
hoodia at gnc
hoodia balance reviews
hoodia buy cheap 34546
hoodia buy cheap 34546 buy
hoodia cj industries
hoodia diane irons
hoodia diet 57
hoodia diet patch
hoodia diet pill
hoodia diet pills
hoodia diet pills site
hoodia diet supplement
hoodia dropship suppliers
hoodia drug interactions
hoodia gordoni medical problems
hoodia gordoni plus
hoodia gordonii cactus lipodrene
hoodia gordonii dangers
hoodia gordonii diet 57
hoodia gordonii extract
hoodia gordonii grow
hoodia gordonii plant
lowest prices for cialis
mail order viagra
mail order viagra in uk
make your own viagra
male enhancement cialis
male quadriplegic using viagra
marajuana and viagra
prime with hoodia
problems with viagra
product team cialis
professional viagra discussions b ogs
propecia 90 count
propecia canada cheap
propecia for less
propecia long term buy
propecia lower dht
propecia picture results
quick forum readtopic propecia answer search
quick forum readtopic propecia none content
quick forum readtopic propecia none generated
quick forum readtopic propecia none online
quick forum readtopic propecia none search
quick forum readtopic propecia signature content
quick forum readtopic propecia signature generated
smartburn with hoodia
soft cialis mastercard
soft tab viagra
soft tabs viagra
soma and viagra prescriptions free viagra
songs about viagra
source naturals hoodia complex
south african hoodia
subaction showcomments cialis thanks newest
subaction showcomments cialis thanks older
subaction showcomments cialis thanks online
subaction showcomments cialis thanks posted
subaction showcomments cialis thanks remember
subaction showcomments cialis thanks watch
u 5674 cialis
ubat kuat cialis
uk alternative viagra
uk pharmacies cheap viagra
uk viagra sales
university of mississippi hoodia testing
uprima cialis viagra
viagra compare prices
viagra covered by insurance
viagra delayed reaction
viagra difference in mg
viagra discount 800 number customer service
viagra doesnt work
viagra effects on women
viagra in britain
viagra in china
viagra in manchester uk
viagra in mexico
viagra in the uk
viagra in the water
viagra joke sheet off leg
viagra larger forever
viagra lawsuit updates in march 2009
viagra sex domination
viagra shelf life
viagra side affects
viagra side effect
viagra side effects
viagra soft tabs
viagra sore wife
viagra store in canada
viagra stories and pics
viagra suppliers in the uk
viagra suppositories ivf
what is hoodia
what is in cialis
what is levitra
zoft hoodia gum
wkrakowie.org map
jessica hahn nude
teen printable activities
anderson nude videos nude
euro teen models
lesbian teen hunter
couple amateur hot
huge teen breasts
free teen nudist
teen bible study
amateur photo album
amateur wives pics
free teen sex videos
nude candid teen photos
blowjob in phoenix az
young nude galleries
nude girl pics
free nude gay men
amateur porn clips
amateur home videos
nude sex videos teen
petite teen movies
amateur lesbian videos
hot nude moms
tight teen pussy
teen shower scenes
britney spears nude
hot teen babes
bathroom blowjob turns
nude pics blowjob
nude women having sex

Fri
16
May '08

Managing Multiple Images for Multimodel Forms

So, I have this web app that I am creating for a friend that helps with managing inventory for eBay auctions.

When a user created a product, my intention was to allow them to upload as many images as they would like to be associated with that product. When they would go to edit the inventory item I would like for them to be able to delete any previously uploaded images and upload new images if they like.

Here’s what my interface looks like.

Interface screenshot.

So I have a good idea that I will probably use attachment_fu to manage the uploading of images. But wait, things are slightly more complicated because I will have one model that manages the product attributes (Products) and then another model that manages the uploaded images (ProductImages).

As usual, Ryan Bates to the rescue with his Railscast “Complex Forms Part 3″. Much of the following code will be familiar if you’ve watched this Railscast; I am just going to demonstrate the usage of attachment_fu with a multi-model setup.

So, within the product new/edit form I have a div defined where my images will be displayed.

  ........
  <p>
    Wholesale Price
< %= f.text_field :wholesale_price %>
  </p>
	
  <div id="images">
    Images
      < % @product.product_images.in_groups_of(3) do |group| %>
          < %= render :partial => 'product_image', :collection => group %>
          <p style="clear: both"/>
      < % end %>
  </div>
	
  <p style="clear: both"/>
	
  < %= link_to_function image_tag('add.png', :border => 0, :alt => "Add image.") + "&nbsp;Add Image" do |page|
    page.insert_html :bottom, :images, :partial => "product_image", :o bject => ProductImage.new
  end %>
  <p>
	
</p>

My product_image partial looks like this :

    < % if product_image != nil %>
        < % fields_for "product[image_attributes][]", product_image do |f| %>
          < % if product_image.new_record? %>
            <div class="newimage">
               <p>
                 < %= f.file_field :uploaded_data, :class => "formField", :index => nil %>
                 < %= link_to_function "Remove", "$(this).up('.newimage').remove()" %>
               </p>
            </div>
        < % else  %>
          <div class="image">
            < %= image_tag(product_image.public_filename(:stamp), :border => 0) %>
	    < %= f.file_field :uploaded_data , :index => nil, :style => 'display:none' %>
	    < %= link_to_function image_tag('cancel.png', :border => 0, :alt => "Delete image."), "mark_for_destroy(this)" %>
	
            < %= f.hidden_field :id, :index => nil %>
            < %= f.hidden_field :should_destroy, :index => nil, :class => 'should_destroy' %>
          </div>
      < % end %>
    < % end %>
  < % end %>

Areas of interest : I’m using the fields_for form helper because our images are part of another model. There’s a set of empty brackets after the definition

product[image_attributes][]

to tell Rails that we’re passing an array (in this case multiple images).

The call to the mark_for_destroy method. This allows me to directly hide the display of the image and mark a form flag that tells the system to destroy it once the form has been submitted. This technique is outlined in Ryan’s railscast.

In application.js


function mark_for_destroy(element) {
	$(element).next('.should_destroy').value = 1;
	$(element).up('.image').hide();
}

I have a product_image model that manages the attachments using attachment_fu. It has an attribute should_destroy which allows an image to be marked for deletion from the form.

class ProductImage < ActiveRecord::Base
  has_attachment :content_type => :image,
                 :storage => :file_system,
                 :max_size => 2000.kilobytes,
                 :resize_to => '320x200>',
                 :thumbnails => { :thumb => '150x150>', :stamp => '75x75>' },
                 :processor => :ImageScience   
	
  validates_as_attachment
	
  attr_accessor :should_destroy
	
  def should_destroy?
    should_destroy.to_i == 1
  end
	
end

For the products model, we want to setup a virtual attribute called image_attributes (remember the array of images that we defined in our form above?) that will handle the saving/deletion of product images.

class Product < ActiveRecord::Base
  belongs_to :vendor
  belongs_to :product_status
  belongs_to :ebay_category
  has_many   :product_images, :dependent => :destroy
	
  after_update :save_images
	
  def image_attributes=(image_attributes)
    image_attributes.each do |attributes|
      if attributes[:id].blank?
        product_images.build(attributes)
      else
        product_image = product_images.detect { |t| t.id == attributes[:id].to_i}
        product_image.attributes = attributes
      end
    end
  end
	
  def save_images
    product_images.each do |image|
      if image.should_destroy?
        image.destroy
      else
        image.save(false)
      end
    end
  end
	
end

Tue
13
May '08

Recording Type Definitions From Unit Tests For Autocompletion

I just got done reading Steve Yegge’s “Dyanmic Languages Strike Back”. He notes that one of the perceived problems with dynamic languages is the lack of tools, (he notes specifically the autocomplete feature).

While the thought of type declarations or any sort of annotations makes me cringe, is there any useful type data that could be recorded while running the unit tests that could later be used for the autocompletion of methods from within your Favorite Editor (I Textmate)?

While this may be cheating by deriving types at runtime, it certainly seems simpler than the probabilistic methods Steve outlines for determing types in dynamic languages. And it would certainly encourage the act of writing tests if you could get the added productivity boost of autocomplete.

Sat
3
May '08

Lower Blood Pressure and Seasonal Changes

Ever since Jr. High I looked forward to the winter time. I loved the way the cool breezes hit against my face. I loved the fact that I could wear a long sleeve shirt and not worry about breaking into a sweat or develop pit stains. Winter was the fat man’s paradise where the lower temperatures gave me a sense of freedom that no other season provided. I was in a seasonal wonderland where my above average body heat didn’t control me and I could finally wear and act how I wanted without the embarrassment of my overly-sweating body showing itself.

But winter was no friend and he was only acting as a mask to further deep rooted problems. Most people who chronically sweat are probably over weight and I was no exception. Furthermore, I had high blood pressure as a result. And the high body temps were probably a result of this. Who wouldn’t be hot when your heart is working twice as hard as the average individual?

In May of 2006 I was hospitalized for my high blood pressure and as a result, I have been taking three different blood pressure medications. Atentolol, a beta blocker, Avalid, a diuretic, and Norvasc, a vasodilator.

My entire perception has changed. With a normal blood pressure, I now enjoy the sun and the heat and have even worn a long sleeve shirt when it’s 80 degrees out. I actually have days where I want to feel the warmth of the sun against my neck and feel the summer’s breeze blow against my shirt.

It’s such a strange perception shift. This has to be the feeling that one would feel when observing an indigenous tribe for the first time or experiencing weightlessness in space. While before others would tell me that they “feel cold”, I didn’t understand. But now I feel their cold and I feel their discomfort, and for once my perception of temperature seems right in line with those around me. And I am finally figuring out that I was living in a whole different world these past few years.


addiction to soma
alternative to viagra
aspirin and viagra
bad side effects of viagra
bayer levitra samples
but soma online
buy cheap cialis
buy cheap viagra
buy cheap viagra online
buy cheap viagra online uk
buy cialis doctor online
buy cialis online
buy cialis soft online
buy generic cialis
buy generic soma
buy generic viagra
buy levitra online
buy soma online
buy soma online without rx
buy viagra cheap
buy viagra in england
buy viagra in london england
buy viagra meds online
buy viagra online
buy viagra online 35008
buy viagra online at
buy viagra soft online
buying generic cialis
buying viagra in uk
buying viagra online
can viagra causes legs to ache
celebrex adverse side effects
celebrex and dosage
celebrex for dogs
celebrex heart attack
celebrex online prescription
celebrex side effects
celebrex vs bextra
cheaest cialis professional
cheap generic cialis
cheap generic viagra
cheap viagra canada
cheap viagra tablets
cheapest cialis professional
cheapest price for cialis
cheapest uk supplier viagra
cheapest viagra in uk
cheapest viagra prices
cialis 10 mg
cialis for order
cialis low priced
cialis no prescription
cialis side effects
cialis soft tab
cialis soft tabs
cialis surrey bc
cialis to buy new zealand
cialis uk suppliers
cialis versus levitra
cialis vs viagra
cialis without prescription
cost of viagra
description of soma
does propecia work
does watermelon have viagra effect
effect of viagra on women
effects of soma
effects of viagra
female use of viagra
free sample pack of viagra
free trial of viagra
free viagra in the uk
free viagra sample
free viagra samples
free viagra samples before buying
free viagra without prescription
g postmessage cialis smiley forum
g postmessage cialis smiley online
g postmessage cialis smiley post
g postmessage cialis smiley remember
g postmessage cialis smiley reply
g postmessage cialis subject forum
g postmessage cialis subject online
g postmessage cialis subject post
g postmessage cialis subject remember
g postmessage cialis subject reply
g postmessage propecia smiley forum
g postmessage propecia smiley online
g postmessage propecia smiley post
g postmessage propecia smiley remember
g postmessage propecia smiley reply
g postmessage propecia subject forum
g postmessage propecia subject online
g postmessage propecia subject post
g postmessage propecia subject remember
g postmessage propecia subject reply
g postmessage viagra smiley forum
g postmessage viagra smiley online
g postmessage viagra smiley post
g postmessage viagra smiley remember
g postmessage viagra smiley reply
g postmessage viagra subject forum
g postmessage viagra subject online
g postmessage viagra subject post
g postmessage viagra subject remember
g postmessage viagra subject reply
generic cialis cheap
generic cialis softtab
generic viagra india
guaranteed cheapest viagra
herbal viagra reviews
herbs and viagra interaction
history of soma drug
how does levitra work
how does viagra work
how long does cialis last
how long does viagra last
how to buy viagra
how to use viagra
india viagra cialis vicodin
instructions for viagra use
is soma a barbiturate
is soma a controlled substance
is soma a narcotic
is soma addictive
is viagra safe for women
levitra side effects
low cost cialis
low cost viagra
lowest price viagra
lowest prices for cialis
mail order viagra
marijuana and viagra
mexican rx cialis low price
mexican rx cialis low priced
mix vicodin and soma
muscle relaxants soma
natural herbs used as viagra
natural viagra substitutes
new drug levitra
non prescription viagra
order soma carisoprodol
order soma online
order viagra online
over the counter viagra
prescription drug called soma
price of viagra
problems with viagra
propecia canada cheap
propecia side effects
purchase viagra online
q buy cialis online
q buy soma
q buy soma online
q buy viagra online
query lowest cialis price online
quick forum readtopic cialis none online
quick forum readtopic cialis none search
quick forum readtopic propecia answer content
quick forum readtopic propecia none generated
quick forum readtopic propecia signature content
quick forum readtopic viagra answer search
recreational viagra use
resturants soma neiborhood
rx cialis low price
side effects of celebrex
side effects of cialis
side effects of viagra
soma 350mg saturday delivery
soma 350mg saturday fed-ex shipping
soma by wallace
soma carisoprodol online
soma cod without prescription
soma drug history
soma drug toxicity
soma muscle relaxant
soma muscle relaxer
soma san diego
soma saturday shipping
soma side effects
soma with codiene wholesale
subaction showcomments cialis optional newest
subaction showcomments cialis optional older
subaction showcomments cialis smile watch
subaction showcomments cialis start from older
subaction showcomments propecia archive posted
subaction showcomments propecia optional older
subaction showcomments propecia smile older
subaction showcomments propecia smile remember
subaction showcomments propecia start from online
subaction showcomments propecia thanks posted
subaction showcomments viagra archive remember
subaction showcomments viagra start from newest
subaction showcomments viagra start from watch
subaction showcomments viagra thanks remember
subaction showcomments viagra thanks watch
tadalafil cialis from india
try viagra for free
uk alternative viagra
uk viagra sales
viagra 6 free samples
viagra and alternatives
viagra and cannabis
viagra and hearing loss
viagra for sale
viagra for sale without a prescription
viagra for women
viagra free trial
viagra from india
viagra liver damage
viagra no prescription
viagra on line
viagra online cheap
viagra online stores
viagra online uk
viagra or cialis
viagra oral jelly
viagra prescription uk
viagra rrp australia
viagra rrp australia cost
viagra side effects
viagra soft tabs
viagra suppliers in the uk
viagra uk cheap purchase buy
viagra uterine thickness
viagra vs cialis
viagra without a prescription
viagra without prescription
watermelon viagra affect
what is celebrex
what is celebrex used for
what is generic viagra
what is soma
what is the medication soma for
what is viagra
what type of drug is soma
where can i buy viagra online

Sat
1
Mar '08

Rails Migrations - Command Line Power in 2.0

I absolutely loves Rails 2.0 and the command line conveniences it provides for the RESTful scaffolding and models. Here’s a couple of tricks to generate a migration to quickly to add/remove columns from an existing table.

Assume you already have a table called ‘Users’. You would like to add a column called ‘title’ and another column called ‘email’. You can quickly create a migration from the command line using the following :

script/generate migration AddTitleEmailToUsers title:string email:string

The migration generated looks like this:

class AddTitleEmailToUsers < ActiveRecord::Migration
  def self.up
    add_column :users, :title, :string
    add_column :users, :email, :string
  end
	
  def self.down
    remove_column :users, :email
    remove_column :users, :title
  end
end
</pre>
	
And if you need to remove those same columns, you can generate a migration with the following :
script/generate migration RemoveTitleEmailFromUsers title:string email:string

The title of the migration is significant. The beginning Add/Remove specifies the action to take, the To/From specifies the tablename to apply the action against.

How sweet is that?!?

Fri
28
Dec '07

Diagnose Me!

I am posting an image and three movies.

The image represents a chest x-ray that was performed on May 2, 2006.  The collection of movies are of a CT scan that was performed in early December.

I am hoping that a few qualified (and curious) individuals will take the time to review the scans and will be gracious enough to give their two cents regarding a diagnosis. Optimally, by making these records public I will attract a few quality outside diagnoses and hopefully those diagnoses will be in line with what my doctor has already stated.  If there are differing opinions on the scans, at least I can bring these points up with my next doctor’s appointment to have them addressed.

Before I get yelled at by the rest of the world stating "why the hell are you relying on stranger for your diagnosis!" let me reiterate that I have already been to one specialist and am getting a second opinion on Jan 2nd just to be safe.

I am intentionally keeping the details behind my diagnosis vague. I want all assessments done solely by the data presented.

I have a pretty good BS detector, so please don’t tell me that I have Leprosy. :-)

So if you’re a doctor or pre-med student, or if you’re a fan of “House”, post your best diagnosis.  Once you have your diagnosis, go ahead and read the comments. There I will give further information on my circumstances.

– Jim

Chest xray: 



Click to englarge

 

CT (AC) : Chest 5’s CHK 2ND

Hi-res images of this scan be found here along with a hi-res QuickTime version of this movie.

 

CT (AC) : Soft Tissue

Hi-res images of this scan be found here along with a hi-res QuickTime version of this movie.

 

CT : Chest 5′S CHK 2ND

Hi-res images of this scan be found here along with a hi-res QuickTime version of this movie.

Wed
18
Apr '07

Hyperfocus and the Loss of Sensitivity

My mother called me yesterday and told me that my sister had a mole removed from her leg and the doctors found it be cancerous.  My sister has been known to lay out the in the sun a little too long, but at only age 30, the percentages were definitely on her side for this very thing not to occur.

Today I was creating my "to-do" list for work and I list 1) finish up taxes (yes I know, they’re late), 2) some items regarding my daily job, and 3) call mom about Shannon.

It struck me as odd (and made me a little depressed) that I would have to created an item #3.  

Sometimes within my work I reach a level of focus for which all outside influences disappear and time is nonexistent. But with this hyperfocus, there’s a definite emotional disconnect.   And for the first time I am wondering what loved ones that have become second class to this overly stimulated way of working.

In the end, I feel incredibly guilty for making my sister’s condition just another checklist item.  I’m not sure what to make of this. 

Fri
5
Jan '07

Velocity Diet Recap

The last couple of days were uneventful — by then the shakes had become somewhat automatic, and I was mainly focused on how I was going to transition to a more normal eating pattern.  My skill with calipers is still a work in progress, but I would say that I went from about 18% bodyfat to about 13% bodyfat.  I lost 12 pounds in the 28 days, and I really don’t think any of it was muscle (it’s been about a week and a half since I finished up, and I’ve gained back 1-2 pounds while maintaining the same level of leanness, which I think represents any water weight that I might have lost).  There might even have been some muscle gain, which would make the numbers even more positive, but that’s a tougher thing to guage.  My stomach circumference measurement went down dramatically (I don’t have the numbers right in front of me, but it was at least 2.25 inches).  The interesting thing is that my stomach/waist measurements have both continued to decrease even since I came off the diet (even while I’ve been gaining weight). Aesthetically, I think that I look as good as I ever have (if I was ever this lean before, it must have been when I was in high school — back when I weighed 107 pounds).  The additional 45 pounds definitely makes a
difference.  :-)

I’ve continued to do weighted walks on my offdays, although I don’t mind taking the occasional day of rest if I feel like I need it.  The walks seem to have a lot of benefits outside of their contribution to calories burned — I’m not sure if it’s the weight I’ve lost, or if it’s been the walks, but my legs just feel "springier" — kind of a general positive feeling of good health/athleticism.  I’m up to using an xvest with 20 additional pounds, typically for about 3 miles, and I typically walk at a 1 mile/16 minute clip (just enough to feel it, not so much that I feel like it’s interfering with my workouts).

I’ve ramped by calories up from where I was on the v-diet (1300 on nontraining days, 1600 on training days) to about 2000-2100 every day (slightly higher number of calories on training days, and typically more carbs on training days).  I’m doing a routine from Chad Waterbury’s book (which I highly recommend — you can find it on t-nation) and am going to stick pretty closely to his suggestions for at least the next year.  I plan on slowly upping calories by looking at my weight and body composition (based on calipers, waist readings, the mirror, etc.) every couple of weeks and increasing calories as my weight gain slows (assuming it’s good weight gain).  A little bit of fat is certainly okay (if there’s anything this diet has proven, it’s that I can take the fat off if I need/want to), but I don’t want to go overboard bulking.  I think that getting to 160 lbs while maintaining my current level of leanness by the end of the year is a very reasonable goal, and I think that it may even be possible to come in a bit higher and a bit leaner.

Thu
21
Dec '06

Velocity Diet - Day 24

I’ve been keeping the volume of my workouts down this week and doing anything that strikes me as fun.  Today I thought I’d max out on bench press, just to see how much, if any, strength I’ve lost during this diet.  I worked up to a pretty easy 195 single, but failed miserably at 201 (200 is my previous best, and I was 12 pounds heavier at the time).  All in all, not bad — 5 lbs is a small enough difference that it could be chalked up to random fluctuations.  

After the workout, I had a big burrito meal which left me stuffed (mmm, solid food). As I had hoped when I originally started this diet, I think my newfound leanness is making it easier for me to eat carbs; this morning, even after that big meal, I only gained a pound, and according to the calipers, I actually lost bodyfat (I’m at 154 lbs at 12.3% bodyfat with a 31.5" maximum stomach circumference measurement).