<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Matt Dyor&#039;s Geek Blog</title>
	<atom:link href="http://geekdyor.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://geekdyor.wordpress.com</link>
	<description>Just another WordPress.com weblog</description>
	<lastBuildDate>Tue, 10 May 2011 06:18:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='geekdyor.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Matt Dyor&#039;s Geek Blog</title>
		<link>http://geekdyor.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://geekdyor.wordpress.com/osd.xml" title="Matt Dyor&#039;s Geek Blog" />
	<atom:link rel='hub' href='http://geekdyor.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Android not showing up on Eclipse</title>
		<link>http://geekdyor.wordpress.com/2011/05/10/android-not-showing-up-on-eclipse/</link>
		<comments>http://geekdyor.wordpress.com/2011/05/10/android-not-showing-up-on-eclipse/#comments</comments>
		<pubDate>Tue, 10 May 2011 06:18:06 +0000</pubDate>
		<dc:creator>geekdyor</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://geekdyor.wordpress.com/?p=38</guid>
		<description><![CDATA[Home &#62; Menu &#62; Settings &#62; Applications &#62; Development &#62; check &#8220;USB debugging&#8221; Of course! Seems like the thirteenth time I scrolled down looking for the device Eclipse could have figured this out:)<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekdyor.wordpress.com&amp;blog=11940809&amp;post=38&amp;subd=geekdyor&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Home &gt; Menu &gt; Settings &gt; Applications &gt; Development &gt; check &#8220;USB debugging&#8221;</p>
<p>Of course! Seems like the thirteenth time I scrolled down looking for the device Eclipse could have figured this out:)</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/geekdyor.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/geekdyor.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/geekdyor.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/geekdyor.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/geekdyor.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/geekdyor.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/geekdyor.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/geekdyor.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/geekdyor.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/geekdyor.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/geekdyor.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/geekdyor.wordpress.com/38/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/geekdyor.wordpress.com/38/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/geekdyor.wordpress.com/38/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekdyor.wordpress.com&amp;blog=11940809&amp;post=38&amp;subd=geekdyor&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://geekdyor.wordpress.com/2011/05/10/android-not-showing-up-on-eclipse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bff4101dea9bcdefa7b908c9eec9265e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">geekdyor</media:title>
		</media:content>
	</item>
		<item>
		<title>Notes on Rails</title>
		<link>http://geekdyor.wordpress.com/2010/12/04/notes-on-rails/</link>
		<comments>http://geekdyor.wordpress.com/2010/12/04/notes-on-rails/#comments</comments>
		<pubDate>Sat, 04 Dec 2010 06:30:37 +0000</pubDate>
		<dc:creator>geekdyor</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://geekdyor.wordpress.com/?p=34</guid>
		<description><![CDATA[This works along with Simply Rails: http://my.safaribooksonline.com/9780980455205 To start developing, go to terminal &#62; documents/rails/rallywire then type ruby script/server, then you can visit it at http://0.0.0.0:3000 To play around with your application in the console, terminal to the directory and type ruby script/console 1.    Get to the irb ⁃    go to terminal and type irb [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekdyor.wordpress.com&amp;blog=11940809&amp;post=34&amp;subd=geekdyor&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This works along with Simply Rails: http://my.safaribooksonline.com/9780980455205</p>
<p>To start developing, go to terminal &gt; documents/rails/rallywire then type ruby script/server, then you can visit it at http://0.0.0.0:3000</p>
<p>To play around with your application in the console, terminal to the directory and type ruby script/console</p>
<p>1.    Get to the irb<br />
⁃    go to terminal and type irb<br />
⁃    This lets you play with ruby<br />
2.    Create the rails app<br />
⁃    In terminal, go to the folder in which you want you application to be created (e.g., cd MattDyor/Documents/Rails is where I put all of my rails apps), and type rails APPLICATION_NAME<br />
⁃    rails RallyWire<br />
3.    Create the model<br />
⁃    open terminal<br />
⁃    terminal browse to the directory of the application (create it in finder if you need to)<br />
⁃    terminal rails script/generate model RallyPoint name:string<br />
⁃    fixed by running rails RallyWire &#8211; confirm and removei needed to copy the files from the archive over to get this to work<br />
⁃    generating the model automatically adds an id, created_at, and updated_at<br />
⁃    terminal rake db:migrate<br />
4.    Naming conventions:<br />
⁃    Use nouns as your class nouns (eg-use Subscription instead of Subscribe)<br />
⁃    This means you are describing what you are storing, not what you are doing<br />
⁃    Camelcase the class (Subscription, RallyPoint)<br />
⁃    lowercase and pluralize the table (subscriptions, rally_points)<br />
⁃    most references other than the class are lowercase (eg-the resources in the config)<br />
⁃    instance variables can be small, but should be lower<br />
⁃    attributes of the class are lower case<br />
5.    Now add data to the model<br />
⁃    terminal ruby script/console<br />
⁃    rp = RallyPoint.new<br />
⁃    rp.name = &#8216;Clubhouse Rally&#8217;<br />
⁃    rp.save<br />
6.    Now create the controller<br />
⁃    ruby script/generate controller RallyPoints index (note the plural here and not above)<br />
⁃    this will create our index page only<br />
⁃    the controller that is created is rally_point<br />
⁃    update the index method in the controller<br />
⁃    def index<br />
⁃    @rally_point = RallyPoint.find_by_name(&#8216;Clubhouse Rally&#8217;)<br />
⁃    end<br />
7.    Now update the view file (index.html.erb)<br />
⁃      &lt;p&gt;&lt;%= @rally_point.name%&gt;&lt;/p&gt;<br />
8.    Firing up the server<br />
⁃    ruby script/server<br />
⁃    you should be able to visit at 0.0.0.0:3000<br />
9.    Add a form to create new entries<br />
⁃    In textmate, go to app&gt;views&gt;XXX(datatype), right click and select new<br />
⁃    Call the file new.html.erb<br />
⁃    &lt;% form_for @rally_point do |f|%&gt;<br />
⁃    &lt;p&gt;<br />
⁃    name: &lt;br /&gt;<br />
⁃    &lt;%= f.text_field :name%&gt;<br />
⁃    &lt;/p&gt;<br />
⁃    &lt;p&gt;<br />
⁃    &lt;%= submit_tag %&gt;<br />
⁃    &lt;/p&gt;<br />
⁃    &lt;% end %&gt;<br />
⁃    update the controller&#8211;add a new method<br />
⁃    @rally_point = RallyPoint.new<br />
10.    Now add the helper URLs to map URLs to functions<br />
⁃    go to config/routes.rb<br />
⁃    add map.resources :rally_points<br />
⁃    Now you should be able to visit 0.0.0.0:3000/rally_points/new<br />
11.    A brief review<br />
⁃    The route directory is /rally_points (plural)<br />
⁃    In the config/routes.rb, there is the update above and the following<br />
⁃    map.root :controller =&gt; &#8220;rally_points&#8221;<br />
⁃    the class is RallyPoint, everything else is rally_point<br />
12.    Create your create method in the controller<br />
⁃    def create<br />
⁃    @rally_point  = RallyPoint.new(params[:rally_point])<br />
⁃    @rally_point.save<br />
⁃    redirect_to rally_points_path<br />
⁃    end<br />
13.    Test your controller<br />
⁃    navigate to /rally_point/new<br />
⁃    create a record<br />
⁃    fire up an irb console (terminal &gt; cd to project directory, ruby script/console)<br />
⁃    Story.find(2)<br />
⁃    Story.find(:all)<br />
⁃    Story.find(:all).last<br />
⁃    Story.find(:first, <img src='http://s1.wp.com/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> rder =&gt;  &#8216;id DESC&#8217;)<br />
⁃    Story.find_by_name(&#8216;Hello World Today&#8217;)<br />
⁃    Story.find(:first, <img src='http://s1.wp.com/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> rder =&gt; &#8216;RANDOM()&#8217;)<br />
14.    Create your layout<br />
⁃    create, in ap&gt;views&gt;layouts, a layout named application.html.erb<br />
⁃    standard XHTML web page with two extra fields: stylesheet under the title and yield in the body<br />
⁃    &lt;%= stylesheet_link_tag &#8216;style&#8217; %&gt;<br />
⁃    this will point the style sheet to /public/stylesheets/style.css<br />
⁃    &lt;div id=&#8221;content&#8221;&gt;<br />
⁃    &lt;%= yield %&gt;<br />
⁃    &lt;/div&gt;<br />
15.    Create your style sheet<br />
⁃    body<br />
⁃    {<br />
⁃    background-color: #666;<br />
⁃    margin: 15px 25px;<br />
⁃    font-family: Helvetica, Arial, sans-serif;<br />
⁃    }<br />
⁃    #content<br />
⁃    {<br />
⁃    background-color: #fff;<br />
⁃    border: 10px solid #ccc;<br />
⁃    }<br />
16.    Add some flash<br />
⁃    In the style.css<br />
⁃    #notification {<br />
⁃    border: 5px solid #9c9;<br />
⁃    background-color: #cfc;<br />
⁃    padding: 5px;<br />
⁃    margin:; 10px 0;<br />
⁃    }<br />
⁃    in the controller, add this line after the .save command<br />
⁃    flash[:notice] = &#8216;Rally Point submission succeeded.&#8217;<br />
⁃    add this to your index.html.erb<br />
⁃    &lt;% unless flash[:notice].blank? %&gt;<br />
⁃    &lt;div id=&#8221;notification&#8221;&gt;&lt;%= flash[:notice] %&gt;&lt;/div&gt;<br />
⁃    &lt;% end %&gt;<br />
17.    Validation<br />
⁃    add this to the model (app/models/rally_point.rb) inside the class<br />
⁃    validates_presence_of :name<br />
⁃    now update the controller&gt;create method so that it does not redirect if there is a (validation) problem<br />
⁃      if @rally_point.save<br />
⁃            flash[:notice] = &#8216;Rally Point submission succeeded.&#8217;<br />
⁃            redirect_to rally_points_path<br />
⁃        else<br />
⁃          render :action =&gt; &#8216;new&#8217;<br />
⁃        end<br />
⁃    add this to new.html.erb<br />
⁃    &lt;%= error_messages_for &#8216;rally_point&#8217; %&gt;<br />
18.    Now create unit tests<br />
⁃    unit tests are defined in test&gt;unit&gt;rally_point_test.rb<br />
⁃    def test_should_not_be_valid_without_name<br />
⁃    rp = RallyPoint.create(:name=&gt;nil)<br />
⁃    assert rp.errors.on(:name)<br />
⁃    end<br />
⁃    def test_should_create_story<br />
⁃        rp=RallyPoint.create(:name=&gt;&#8217;Big Juicy Unit Test&#8217;)<br />
⁃        assert rp.valid?<br />
⁃      end<br />
⁃    run your unit tests in terminal with rake test:units<br />
19.    Now create functional tests<br />
⁃    functional tests are defined in test&gt;functional?rally_points_controller_test.rb<br />
⁃      def test_should_show_index<br />
⁃        get :index<br />
⁃        assert_response :success<br />
⁃        assert_template &#8216;index&#8217;<br />
⁃        assert_not_nil assigns(:rally_point)<br />
⁃      end<br />
⁃    run your functional tests with rake test:functionals<br />
⁃        assert_select &#8216;form p&#8217;, :count =&gt; 3<br />
⁃    Test the create method:<br />
⁃      def test_should_add_rally_point<br />
⁃    post :create, :rally_point =&gt; {<br />
⁃          :name =&gt; &#8216;test from test&#8217;<br />
⁃        }<br />
⁃        #new_record? tests whether you have a new, unsaved record<br />
⁃        assert ! assigns(:rally_point).new_record?<br />
⁃        #i am not sure whether this actually saves it to the database&#8230;it does not appear to have<br />
⁃        assert_redirected_to rally_points_path<br />
⁃        assert_not_nil flash[:notice]<br />
⁃      end<br />
⁃    you can run all the tests with rake test<br />
20.    Create the user security bits<br />
⁃    ruby script/generate model User login:string password:string name:string email:string phone:string<br />
⁃    go to the created model (db/migrate/XXXcreate user.rb) and add this line outside of the create_table and inside self.up:<br />
⁃    add_column :rally_points, :user_id, :integer<br />
⁃    add this to the self.down after drop_table<br />
⁃    remove_column :stories, :user_id<br />
⁃    rake db:migrate<br />
⁃    in the user model, add has_many :rally_points<br />
⁃    in the rally_point model, add belongs_to :user<br />
⁃    Create the sessions controller for managing login (note: this is sessions…with an s, not sure why)<br />
⁃    ruby script/generate controller Sessions new create destroy<br />
⁃    including new create and destroy adds the methods and creates the templates<br />
⁃    update routes.rb with this (note the singular&#8211;this is a singleton object, meaning that each user can have only one session)<br />
⁃    map.resource :session<br />
⁃    since this is singular, all of the urls will be singular (eg., session/new)<br />
⁃    update the new.html.erb file<br />
⁃    &lt;% form_tag session_path do %&gt;<br />
⁃      &lt;p&gt;Please log in.&lt;/p&gt;<br />
⁃      &lt;p&gt;<br />
⁃        &lt;label&gt;Username: &lt;/label&gt;<br />
⁃        &lt;%= text_field_tag &#8216; login&#8217; %&gt;<br />
⁃      &lt;/p&gt;<br />
⁃      &lt;p&gt;<br />
⁃        &lt;label&gt;Password: &lt;/label&gt;<br />
⁃        &lt;%= password_field_tag &#8216; password&#8217; %&gt;<br />
⁃      &lt;/p&gt;<br />
⁃      &lt;p&gt;&lt;%= submit_tag &#8216; login&#8217; %&gt;&lt;/p&gt;<br />
⁃    &lt;% end %&gt;<br />
⁃    update sessions_controller.rb (in app&gt;controllers)<br />
⁃      def create<br />
⁃        @current_user = User.find_by_login_and_password(params[:login], params[:password])<br />
⁃        if @current_user<br />
⁃          session[:user_id] = @current_user.id<br />
⁃          redirect_to rally_points_path<br />
⁃        else<br />
⁃          flash[:notice]=&#8221;Incorrect username or password. Please try again.&#8221;<br />
⁃          render :action=&gt;&#8217;new&#8217;<br />
⁃        end<br />
⁃      end<br />
⁃    current_user = User. find session[:user_id]<br />
21.    Apply a login filter<br />
⁃    Add this code to the application_controller (app/controller/)<br />
⁃      before_filter :fetch_logged_in_user<br />
⁃        protected<br />
⁃          def fetch_logged_in_user<br />
⁃            return unless session[:user_id]<br />
⁃            @current_user = User.find_by_id(session[:user_id])<br />
⁃          end<br />
⁃    Add this code to the application layout (app/views/layout)<br />
⁃            &lt;div id=&#8221;login_logout&#8221;&gt;<br />
⁃          &lt;% if @current_user %&gt;<br />
⁃            Logged in as:<br />
⁃            &lt;%= @current_user.login %&gt;<br />
⁃            &lt;em&gt;&lt;%= link_to &#8220;(Logout) &#8220;, session_path,  :method =&gt; :delete %&gt;&lt;/em&gt;<br />
⁃          &lt;% else %&gt;<br />
⁃            &lt;em&gt;Not logged in.&lt;/em&gt;<br />
⁃            &lt;%= link_to &#8216;Login&#8217;, new_session_path %&gt;<br />
⁃          &lt;% end %&gt;<br />
⁃        &lt;/div&gt;<br />
⁃    Add the formatting to the style sheet (public/stylesheets)<br />
⁃    #login_logout {<br />
⁃      float: right;<br />
⁃      color: #999;<br />
⁃      font-size: smaller;<br />
⁃    }<br />
⁃    Add this to the session_controller (app/controllers)<br />
⁃      def destroy<br />
⁃        session[:user_id] = @current_user = nil<br />
⁃      end<br />
⁃    Update your logout page<br />
⁃    &lt;h2&gt;Logout successful&lt;/h2&gt;<br />
⁃    &lt;%= link_to &#8216;Back to the home page&#8217; , rally_points_path %&gt;<br />
⁃    Add Navigation to the template (within the body)<br />
⁃      &lt;ul id=&#8221;navigation&#8221;&gt;<br />
⁃        &lt;li&gt;&lt;%= link_to &#8216;Front page rally points&#8217;, rally_points_path %&gt;&lt;/li&gt;<br />
⁃        &lt;li&gt;&lt;%= link_to &#8216;Submit a new rally point!&#8217;, new_rally_point_path %&gt;&lt;/li&gt;<br />
⁃      &lt;/ul&gt;<br />
⁃    Helper methods for requiring login before visiting pages by updating the applicationcontroller (below the protected)<br />
⁃    def logged_in?<br />
⁃        ! @current_user. nil?<br />
⁃      end<br />
⁃      helper_method :logged_in?<br />
⁃    NOTE: the second helper method is so that you can access this method in the views (first method is for access via controller)<br />
⁃    And then add this that actually requires the user to login<br />
⁃    def login_required<br />
⁃        return true if logged_in?<br />
⁃        session[:return_to] = request.request_uri<br />
⁃        redirect_to new_session_path and return false<br />
⁃      end<br />
⁃    Update the rally_points_controller right under the class Intro<br />
⁃     before_filter :login_required, <img src='http://s1.wp.com/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> nly =&gt; [ :new, :create ]<br />
⁃    Replace the redirection line on sessions_controller with this:<br />
⁃    session[:user_id] = @current_user.id<br />
⁃          if session[:return_to]<br />
⁃            redirect_to session[:return_to]<br />
⁃            session[:return_to] = nil<br />
⁃          else<br />
⁃            redirect_to rally_points_path<br />
⁃          end<br />
⁃    Associate a user with a story by replacing the top line of the create method of the rally_points_controller with the following line<br />
⁃     @rally_point = @current_user.rally_points. build params[:rally_point]<br />
⁃    And show the user along with their story<br />
⁃    &lt;%= @rally_point.user.login %&gt;<br />
⁃    You may need to delete all your rally points or update them so that they have a<br />
23.    Code snippets<br />
⁃    &lt;%= link_to @rally_point.name, @rally_point.link %&gt;<br />
⁃    &lt;%= link_to &#8220;New&#8221;, new_rally_point_path %&gt;<br />
⁃    url helpers are rally_points_path [/rally_points], rally_point_path(@rally_point) [/rally_points/1], edit_rally_point(@rally_point) [/rally_points/1/edit)</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/geekdyor.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/geekdyor.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/geekdyor.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/geekdyor.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/geekdyor.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/geekdyor.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/geekdyor.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/geekdyor.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/geekdyor.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/geekdyor.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/geekdyor.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/geekdyor.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/geekdyor.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/geekdyor.wordpress.com/34/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekdyor.wordpress.com&amp;blog=11940809&amp;post=34&amp;subd=geekdyor&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://geekdyor.wordpress.com/2010/12/04/notes-on-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bff4101dea9bcdefa7b908c9eec9265e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">geekdyor</media:title>
		</media:content>
	</item>
		<item>
		<title>Everything you wanted to know about Ruby</title>
		<link>http://geekdyor.wordpress.com/2010/04/01/everything-you-wanted-to-know-about-ruby/</link>
		<comments>http://geekdyor.wordpress.com/2010/04/01/everything-you-wanted-to-know-about-ruby/#comments</comments>
		<pubDate>Thu, 01 Apr 2010 04:52:02 +0000</pubDate>
		<dc:creator>geekdyor</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://geekdyor.wordpress.com/2010/04/01/everything-you-wanted-to-know-about-ruby/</guid>
		<description><![CDATA[Ruby Classes always start with a capital letter each class has attributes, specified by attr_accessor :name, :age, :gender class Person attr_accessor :name, :age, :gender end inheritance class User &#60; Person attr_accessor :password def hollar puts &#8220;hollar&#8221; end end iterate using do and end or { and } &#8220;string&#8221;.scan(/./) {&#124;x&#124; puts x} RAILS: Overview: Ruby and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekdyor.wordpress.com&amp;blog=11940809&amp;post=33&amp;subd=geekdyor&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Ruby</p>
<p>Classes always start with a capital letter<br />
each class has attributes, specified by attr_accessor :name, :age, :gender</p>
<p>class Person<br />
attr_accessor :name, :age, :gender<br />
end</p>
<p>inheritance</p>
<p>class User &lt; Person<br />
attr_accessor :password<br />
def hollar<br />
puts &#8220;hollar&#8221;<br />
end<br />
end</p>
<p>iterate using do and end or { and }</p>
<p>&#8220;string&#8221;.scan(/./) {|x| puts x}</p>
<p>RAILS:</p>
<p>Overview:<br />
Ruby and Ruby on Rails come pre-installed in the Mac<br />
You will need to update Rails<br />
..this requires XCode developer tools from Apple<br />
..open Terminal, type &#8220;sudo gem update &#8211;system&#8221; enter &#8220;sudo gem install rails&#8221; enter &#8220;sudo gem update rake&#8221; enter &#8220;sudo gem install sqlite3-ruby&#8221; enter (i had to type &#8220;go&#8221;, but this might have been a rain dance)</p>
<p>To get to an interactive ruby session, type Terminal in spotlight (search in the top right corner) and type &#8220;irb&#8221; and hit enter.<br />
Now you can type puts &#8220;hello world&#8221; and it should say hello world<br />
You can also do some of the other ruby commands shown above</p>
<p>Terminal (like the command window)</p>
<p>cd = cd<br />
ls = dir</p>
<p>Ruby Commands</p>
<p>This is a paint by numbers reference to help people remember steps needed to get a new machine or a new site. If you want to learn rails, go to http://www.ruby-doc.org/docs/</p>
<p>In Finder, create a new folder called RubyApps<br />
Go to terminal and cd to RubyApps<br />
type &#8220;rails XXX&#8221; where xxx is the app name you are going to build<br />
BOOM…a lot of data starts flying by as Rails chunks out the skeleton of your app.</p>
<p>Random notes: if you want to get a copy of the documentation for rails, you can navigate to your newly created app directory (XXX) in Terminal and type in &#8220;rake rails:freeze:gems&#8221; enter &#8220;rake doc:rails&#8221; enter &#8211; after a few minutes of building the docs, you can navigate to /doc/api/index.html and check out the docs (feel free to move it to a location you can more readily find…these docs are not specific to the application but are for Rails generally)</p>
<p>Terminal: navigate to XXX and type &#8220;ruby script/server -d&#8221; (if you have Mongrel, OS will use that, otherwise, it will use WEBrick which is installed by default) To get Mongrel, type &#8220;gem install mongrel&#8221;</p>
<p>Now, in a browser you can check out http://localhost:3000 (localhost is the a reference to the name of the machine you are on…it a web server&#8217;s way of saying &#8220;me&#8221;).</p>
<p>In Terminal, To create a controller, navigate to XXX and type &#8220;ruby script/generate controller Home&#8221;</p>
<p>In finder,  navigate to XXX/app/controllers/home_controller.rb</p>
<p>Open this file up (if it is not opening in the editor of your choice, click on the more info &gt; open with option). Add a action of your choice, such as &#8220;def hello&#8221; enter &#8220;end&#8221;</p>
<p>In finder, go to XXX/public/ and rename or delete index.html</p>
<p>In finder, go to XXX/app/views/hello and create a file called &#8220;hello.html.erb&#8221; (the name of the view corresponds to the action)</p>
<p>In terminal, type &#8220;script/server&#8221; to fire up the webserver</p>
<p>In web browser, navigate to localhost:3000/home/hello</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/geekdyor.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/geekdyor.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/geekdyor.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/geekdyor.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/geekdyor.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/geekdyor.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/geekdyor.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/geekdyor.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/geekdyor.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/geekdyor.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/geekdyor.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/geekdyor.wordpress.com/33/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/geekdyor.wordpress.com/33/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/geekdyor.wordpress.com/33/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekdyor.wordpress.com&amp;blog=11940809&amp;post=33&amp;subd=geekdyor&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://geekdyor.wordpress.com/2010/04/01/everything-you-wanted-to-know-about-ruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bff4101dea9bcdefa7b908c9eec9265e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">geekdyor</media:title>
		</media:content>
	</item>
		<item>
		<title>Creating an MVC + ASP.net + Azure Storage Table Site in 10 minutes</title>
		<link>http://geekdyor.wordpress.com/2010/02/21/creating-an-mvc-asp-net-azure-storage-table-site-in-10-minutes/</link>
		<comments>http://geekdyor.wordpress.com/2010/02/21/creating-an-mvc-asp-net-azure-storage-table-site-in-10-minutes/#comments</comments>
		<pubDate>Sun, 21 Feb 2010 17:38:09 +0000</pubDate>
		<dc:creator>geekdyor</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://geekdyor.wordpress.com/?p=18</guid>
		<description><![CDATA[Get Started Get the proper software (Visual Studio 2010, possibly need cloud computing tools&#8230;not sure what is in the box) File &#62; New Project &#62; Cloud Service Call the solution &#8220;XXX&#8221; (where XXX is the name of your site, like RallyWire for www.RallyWire.com) The solution name (eg-XXX) will be the namespace for your solution. (not [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekdyor.wordpress.com&amp;blog=11940809&amp;post=18&amp;subd=geekdyor&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2>Get Started</h2>
<ul style="text-align:left;">
<li>Get the proper software (Visual Studio 2010, possibly need cloud computing tools&#8230;not sure what is in the box)</li>
<li>File &gt; New Project &gt; Cloud Service
<ul>
<li>Call the solution &#8220;<strong>XXX</strong>&#8221; (where XXX is the name of your site, like RallyWire for www.RallyWire.com)</li>
<li>The solution name (eg-XXX) will be the namespace for your solution. (not correct)</li>
<li>A &#8220;New Cloud Service Project&#8221; window will appear &#8212; at least add an ASP.net MVC 2 Web Role and hit OK</li>
</ul>
</li>
<li>Accept defaults on the &#8220;Create Unit Test Project&#8221; window and hit OK</li>
</ul>
<h2>Build your model </h2>
<ul style="text-align:left;">
<li>Right click on References &gt; Add Reference &gt; .NET &gt; System.Data.Services.Client</li>
<li>Right click the Models folder, add &gt; class</li>
<li>Name the class YYY (where YYY is the singular form of the class, such as RallyPoint for <a href="http://www.RallyWire.com">www.RallyWire.com</a>)</li>
</ul>
<pre style="text-align:left;">
<pre>using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Microsoft.WindowsAzure.StorageClient;
using Microsoft.WindowsAzure;
using System.ComponentModel.DataAnnotations;
using System.Web.Security;

namespace MvcWebRole1.Models
{
    public class YYY : TableServiceEntity
    {
        public YYY(string partitionKey, string rowKey)
            : base(partitionKey, rowKey)
        {
        }

        public YYY()
            : base()
        {
            PartitionKey = string.Empty;
            RowKey = Guid.NewGuid().ToString();
        }

        public string Name
        {
            get;
            set;
        }

        //when you add a new property, you must include this property in the edit method below or the value will not be updateable.
        //search for ITEMTOEDIT_UPDATE
    }

    //this is the context - akin to a data connection between the model and azure table storage
    /// &lt;summary&gt;
    /// DO NOT USE THIS FROM THE CONTROLLER. Use the YYYDataSource instead
    /// &lt;/summary&gt;
    public class YYYData : TableServiceContext
    {

        public YYYData(string baseAddress, StorageCredentials credentials)
            : base(baseAddress, credentials)
        {
        }

        public const string YYYTableName = "YYYTable";

        public IQueryable&lt;YYY&gt; YYYTable
        {
            get
            {
                return this.CreateQuery&lt;YYY&gt;(YYYTableName);
            }
        }
    }
    /// &lt;summary&gt;
    /// This is the bridge between the controller and the model; you drop the following code on your controller to implement
    /// var svc = new Models.YYYDataSource();
    /// &lt;/summary&gt;
    public class YYYDataSource
    {
        private YYYData _ServiceContext = null;

        public YYYDataSource()
        {
            var storageAccount = CloudStorageAccount.FromConfigurationSetting("DataConnectionString");
            storageAccount.CreateCloudTableClient().CreateTableIfNotExist(YYYData.YYYTableName);
            _ServiceContext = new YYYData(storageAccount.TableEndpoint.ToString(), storageAccount.Credentials);
        }

        private IQueryable&lt;YYY&gt; YYYTable
        {
            get
            {
                return _ServiceContext.YYYTable;
            }
        }

        public IEnumerable&lt;YYY&gt; Select()
        {
            var results = from c in _ServiceContext.YYYTable
                          select c;

            var query = results.AsTableServiceQuery&lt;YYY&gt;();
            var queryResults = query.Execute();

            return queryResults;
        }

        public void Edit(string id, YYY itemToEdit)
        {
            //var svc = new Models.YYYDataSource();
            var q = (from rp in YYYTable
                     where rp.RowKey == id
                     select rp).Single();

            //ITEMTOEDIT_UPDATE
            q.Name = itemToEdit.Name;

            _ServiceContext.UpdateObject(q);
            _ServiceContext.SaveChanges();

        }

        public void Delete(string id, YYY itemToEdit)
        {
            //var svc = new Models.YYYDataSource();
            var q = (from rp in YYYTable
                     where rp.RowKey == id
                     select rp).Single();
            _ServiceContext.DeleteObject(q);
            _ServiceContext.SaveChanges();
        }

        public void Insert(YYY newItem)
        {
            if (newItem.PartitionKey == null)
                newItem.PartitionKey = "primaryPartition";
            _ServiceContext.AddObject(YYYData.YYYTableName, newItem);
            _ServiceContext.SaveChanges();
        }
    }
}</pre>
</pre>
<h2 style="text-align:left;">Update WebRole.cs</h2>
<ul style="text-align:left;">
<li>In WebRole.cs in your MVCWebRole1 project, add a using Microsoft.Azure directive and replace your current OnStart() method with the following</li>
</ul>
<pre>        public override bool OnStart()
        {
            DiagnosticMonitor.Start("DiagnosticsConnectionString");
            RoleEnvironment.Changing += RoleEnvironmentChanging;
            CloudStorageAccount.SetConfigurationSettingPublisher((configName, configSetter) =&gt;
            {
                configSetter(RoleEnvironment.GetConfigurationSettingValue(configName));
                RoleEnvironment.Changed += (sender, arg) =&gt;
                {
                    if (arg.Changes.OfType&lt;RoleEnvironmentConfigurationSettingChange&gt;()
                        .Any((change) =&gt; (change.ConfigurationSettingName == configName)))
                    {
                        if (!configSetter(RoleEnvironment.GetConfigurationSettingValue(configName)))
                        {
                            RoleEnvironment.RequestRecycle();
                        }
                    }
                };
            });
            return base.OnStart();
        }</pre>
<h2><span style="font-family:Consolas;">Update Configuration</span></h2>
<ul>
<li><span style="font-family:Consolas;">Finally, you are ready to point your Model at the right data store. Start by using local storage, which involves right clicking on the MVCWebRole1 role in the XXX project, selecting Properties &gt; Settings &gt; Add Setting, Name = DataConnectionString, Type = ConnectionString, value = UseDevelopmentStorage=true (you can specify this last parameter by clicking the elipses, but you do have to remember what you named your connection string in your YYY.cs file)</span></li>
<li><span style="font-family:Consolas;">All of these steps are described in great detail at <a href="http://blogs.msdn.com/jnak/archive/2010/01/06/walkthrough-windows-azure-table-storage-nov-2009-and-later.aspx">http://blogs.msdn.com/jnak/archive/2010/01/06/walkthrough-windows-azure-table-storage-nov-2009-and-later.aspx</a> (steps 1-21), but then that article goes off to implement a grid view so it will not help you beyond this point. </span></li>
<li><span style="font-family:Consolas;">Save and Build. </span></li>
</ul>
<h2><span style="font-family:Consolas;">Update your controller</span> </h2>
<ul>
<li><span style="font-family:Consolas;">In the controllers folder in the MVCWebRole1 folder, overwrite the original code with the following code: </span><span style="font-family:Consolas;"> </span></li>
</ul>
<pre>using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using MvcWebRole1.Models;
using System.Collections;
using System.Linq;
namespace MvcWebRole1.Controllers
{
    public class HomeController : Controller
    {
        //private MvcWebRole1.Models.YYYDataSource _entities = new YYYDataSource();
        YYYDataSource svc = new Models.YYYDataSource();
        //
        // GET: /Home/
        public ActionResult Index()
        {
            return View(svc.Select());
        }
        //
        // GET: /Home/Details/5
        //On the details page, add a link to get you to the delete (just copy the edit page)
        public ActionResult Details(string id)
        {
            var originalItem = svc.Select().First(i =&gt; i.RowKey == id);
            return View(originalItem);
        }
        //
        // GET: /Home/Create
        public ActionResult Create()
        {
            return View();
        }
        //
        // POST: /Home/Create
        [AcceptVerbs(HttpVerbs.Post)]
        public ActionResult Create([Bind(Exclude = "RowKey")]YYY itemToCreate)
        {
            svc.Insert(itemToCreate);
            return RedirectToAction("Index");
        }
        //
        // GET: /Home/Edit/5
        public ActionResult Edit(string id)
        {
            var originalItem = svc.Select().First(i =&gt; i.RowKey == id);
            return View(originalItem);
        }
        //
        // POST: /Home/Edit/5
        [AcceptVerbs(HttpVerbs.Post)]
        public ActionResult Edit(string id, YYY itemToEdit)
        {
            var originalItem = svc.Select().First(i =&gt; i.RowKey == id);
            svc.Edit(id, itemToEdit);
            return RedirectToAction("Index");
        }
        //
        // GET: /Home/Delete/5
        //To generate this page, right click, Add View, add it as an update page and remove all of the fields and just have a button that says confirm and cancel
        public ActionResult Delete(string id)
        {
            var originalItem = svc.Select().First(i =&gt; i.RowKey == id);
            return View(originalItem);
        }
        //
        // POST: /Home/Delete/5
        [AcceptVerbs(HttpVerbs.Post)]
        public ActionResult Delete(string id, YYY itemToDelete)
        {
            svc.Delete(id, itemToDelete);
            return RedirectToAction("Index");
        }
    }
}</pre>
<h2><span style="font-family:Consolas;">Now Create Views</span></h2>
<ul>
<li><span style="font-family:Consolas;">Build your solution. (i threw an error on one of the tests for an about page, so I deleted the failing test)</span></li>
<li><span style="font-family:Consolas;">Delete About and Index from the Views &gt; Home folder (we are going to create new ones)</span></li>
<li><span style="font-family:Consolas;">Right click on Index, select Add View &gt; Strongly Typed View &gt; Select &#8220;MvcWebRole1.Models.YYY&#8221; from the top drop down and &#8220;List&#8221; from the bottom, Click Add. </span></li>
<li><span style="font-family:Consolas;">Open the Index view under the home folder. You can modify the view to suit your needs (eg-remove columns that your visitors do not care about). Also, modify the links at the bottom of the page as follows:</span></li>
</ul>
<p><span style="font-family:Consolas;font-size:x-small;">&lt;%= Html.ActionLink(&#8220;Edit&#8221;, &#8220;Edit&#8221;, new {  id=item.RowKey}) %&gt; |<br />
&lt;%= Html.ActionLink(&#8220;Details&#8221;, &#8220;Details&#8221;, new { id = item.RowKey })%&gt; |<br />
&lt;%= Html.ActionLink(&#8220;Delete&#8221;, &#8220;Delete&#8221;, new { id = item.RowKey })%&gt;</span></p>
<ul>
<li><span style="font-family:Consolas;font-size:x-small;">Back on the HomeController, right click the delete method, and select Add View. Select strongly typed view and, in the content drop down, select Details. </span></li>
<li><span style="font-family:Consolas;font-size:x-small;">On the Delete view, add the following code (probably below the fieldset):</span></li>
</ul>
<pre>    &lt;% using (Html.BeginForm()) {%&gt;
        &lt;fieldset&gt;
            &lt;p&gt;
                &lt;input type="submit" value="Delete" /&gt;
            &lt;/p&gt;
        &lt;/fieldset&gt;
    &lt;% } %&gt;</pre>
<ul>
<li><span style="font-family:Consolas;">You will need to uncomment and modify the Edit ActionLink to say:</span></li>
</ul>
<pre>id=Model.RowKey</pre>
<ul>
<li>Create views for Edit and Details. These are straight forward. Remember to uncomment and modify the id=Model.RowKey on the Details page.</li>
</ul>
<h2>Go Live</h2>
<ul>
<li><span style="font-family:Consolas;font-size:x-small;"><span style="font-family:Consolas;font-size:x-small;">You are now ready to MVC out. Go to <a href="http://www.azure.com">www.azure.com</a> and get an account. </span></span></li>
<li><span style="font-family:Consolas;font-size:x-small;"><span style="font-family:Consolas;font-size:x-small;">You need to get your keys from Azure and update your Web Config (see Update Configuration above&#8230;but use the key from your Azure storage account). </span></span></li>
<li><span style="font-family:Consolas;font-size:x-small;"><span style="font-family:Consolas;font-size:x-small;">Right click on the XXX project and select publish. This will open a folder on your machine and a web page. Use the web page to upload the items in the folder. </span></span></li>
<li><span style="font-family:Consolas;font-size:x-small;"><span style="font-family:Consolas;font-size:x-small;">Note: Azure charges you per hour that your instance exists, so you need to either buy the $60/month version, or delete (not suspend) the active instance (you get 25 hours for free in a month&#8230;that is one day). </span></span></li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/geekdyor.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/geekdyor.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/geekdyor.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/geekdyor.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/geekdyor.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/geekdyor.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/geekdyor.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/geekdyor.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/geekdyor.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/geekdyor.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/geekdyor.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/geekdyor.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/geekdyor.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/geekdyor.wordpress.com/18/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekdyor.wordpress.com&amp;blog=11940809&amp;post=18&amp;subd=geekdyor&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://geekdyor.wordpress.com/2010/02/21/creating-an-mvc-asp-net-azure-storage-table-site-in-10-minutes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bff4101dea9bcdefa7b908c9eec9265e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">geekdyor</media:title>
		</media:content>
	</item>
		<item>
		<title>Adding HTTPS / SSL / Secure endpoint to azure</title>
		<link>http://geekdyor.wordpress.com/2010/02/20/adding-https-ssl-secure-endpoint-to-azure/</link>
		<comments>http://geekdyor.wordpress.com/2010/02/20/adding-https-ssl-secure-endpoint-to-azure/#comments</comments>
		<pubDate>Sat, 20 Feb 2010 07:13:50 +0000</pubDate>
		<dc:creator>geekdyor</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://geekdyor.wordpress.com/?p=13</guid>
		<description><![CDATA[http://blogs.msdn.com/jnak/archive/2009/12/01/how-to-add-an-https-endpoint-to-a-windows-azure-cloud-service.aspx After you upload the certificate to azure, you will have to suspend and delete the instance or you will get one of the unintelligible azure errors: Different number of input endpoints for role Dr. Watson Diagnostic ID: 825d94c9-ca91-4b09-9a76-5a6ba92a2af0<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekdyor.wordpress.com&amp;blog=11940809&amp;post=13&amp;subd=geekdyor&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://blogs.msdn.com/jnak/archive/2009/12/01/how-to-add-an-https-endpoint-to-a-windows-azure-cloud-service.aspx">http://blogs.msdn.com/jnak/archive/2009/12/01/how-to-add-an-https-endpoint-to-a-windows-azure-cloud-service.aspx</a></p>
<p>After you upload the certificate to azure, you will have to <strong>suspend and delete</strong> the instance or you will get one of the unintelligible azure errors:</p>
<p>Different number of input endpoints for role Dr. Watson Diagnostic ID: 825d94c9-ca91-4b09-9a76-5a6ba92a2af0</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/geekdyor.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/geekdyor.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/geekdyor.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/geekdyor.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/geekdyor.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/geekdyor.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/geekdyor.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/geekdyor.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/geekdyor.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/geekdyor.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/geekdyor.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/geekdyor.wordpress.com/13/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/geekdyor.wordpress.com/13/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/geekdyor.wordpress.com/13/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekdyor.wordpress.com&amp;blog=11940809&amp;post=13&amp;subd=geekdyor&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://geekdyor.wordpress.com/2010/02/20/adding-https-ssl-secure-endpoint-to-azure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bff4101dea9bcdefa7b908c9eec9265e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">geekdyor</media:title>
		</media:content>
	</item>
		<item>
		<title>Creating REST APIs for ASP.net + MVC</title>
		<link>http://geekdyor.wordpress.com/2010/02/13/creating-rest-apis-for-asp-net-mvc/</link>
		<comments>http://geekdyor.wordpress.com/2010/02/13/creating-rest-apis-for-asp-net-mvc/#comments</comments>
		<pubDate>Sat, 13 Feb 2010 06:48:35 +0000</pubDate>
		<dc:creator>geekdyor</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://geekdyor.wordpress.com/?p=10</guid>
		<description><![CDATA[This is a stub. I will comment on this post when I finish implementing. Looks promising.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekdyor.wordpress.com&amp;blog=11940809&amp;post=10&amp;subd=geekdyor&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is a stub. I will comment on this post when I finish implementing. Looks promising.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/geekdyor.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/geekdyor.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/geekdyor.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/geekdyor.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/geekdyor.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/geekdyor.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/geekdyor.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/geekdyor.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/geekdyor.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/geekdyor.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/geekdyor.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/geekdyor.wordpress.com/10/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/geekdyor.wordpress.com/10/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/geekdyor.wordpress.com/10/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekdyor.wordpress.com&amp;blog=11940809&amp;post=10&amp;subd=geekdyor&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://geekdyor.wordpress.com/2010/02/13/creating-rest-apis-for-asp-net-mvc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bff4101dea9bcdefa7b908c9eec9265e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">geekdyor</media:title>
		</media:content>
	</item>
		<item>
		<title>Creating an MVC + ASP.net + SQL Site in 10 minutes</title>
		<link>http://geekdyor.wordpress.com/2010/02/09/creating-an-mvc-asp-net-azure-storage-site-in-10-minutes/</link>
		<comments>http://geekdyor.wordpress.com/2010/02/09/creating-an-mvc-asp-net-azure-storage-site-in-10-minutes/#comments</comments>
		<pubDate>Tue, 09 Feb 2010 16:39:46 +0000</pubDate>
		<dc:creator>geekdyor</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://geekdyor.wordpress.com/?p=4</guid>
		<description><![CDATA[Get the proper software (___) File &#62; New Project &#62; Web &#62; Asp.net MVC 2 Web App Call the solution &#8220;MVCPlayground&#8220; The solution name (eg-MVCPlayground) will be the namespace for your solution. In solution explorer, right click App Data &#62; Add &#62; New Item &#62; Data &#62; Sql Server database &#62; IdeaDB In server explorer, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekdyor.wordpress.com&amp;blog=11940809&amp;post=4&amp;subd=geekdyor&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<ul>
<li>Get the proper software (___)</li>
<li>File &gt; New Project &gt; Web &gt; Asp.net MVC 2 Web App
<ul>
<li>Call the solution &#8220;<strong><span style="color:#800000;">MVCPlayground</span></strong>&#8220;</li>
<li>The solution name (eg-MVCPlayground) will be the namespace for your solution.</li>
</ul>
</li>
<li>In solution explorer, right click App Data &gt; Add &gt; New Item &gt; Data &gt; Sql Server database &gt; <span style="color:#800000;"><strong>IdeaDB</strong></span></li>
<li>In server explorer, expand IdeaDB (click on the +), right click Tables, add new table
<ul>
<li>If solution explorer is not visible, View&gt;Server Explorer.</li>
</ul>
</li>
<li>Call it <span style="color:#800000;"><strong>IdeaTable</strong></span>
<ul>
<li>You could call it Idea, but the term becomes overloaded&#8230;we may change this.</li>
</ul>
</li>
<li>In solution explorer, right click Models &gt; Add &gt; New Item</li>
<li>Select ADO.net Entity Data Model</li>
<li>Name the file <span style="color:#800000;"><strong>DataModel</strong></span>.edmx
<ul>
<li>Generate from DB, select IdeaDB.mdf, the the check checked.</li>
<li>Name the thing (bottom box) IdeaDBEntities</li>
<li>Select (check box) tables and keep checkboxes checked</li>
<li>Model Namespace should be Model</li>
<li>Rename the entity from IdeaTable to Idea</li>
</ul>
</li>
<li>Delete Controllers &gt; Home Controller</li>
<li>Delete Views &gt; Home &gt; Index and About</li>
<li>Delete Test &gt; Controllers &gt; Home</li>
<li>Right Click controllers &gt; Add &gt; Controllers and name it HomeControllers, keep the checks checked</li>
<li>In HomeController.cs under &#8220;public class&#8230;&#8221; add &#8221;private IdeaDBEntities _entities = new IdeaDBEntities();&#8221;  and hit CTRL+. on IdeaDBEntities to add the using reference.</li>
<li>Build Solution (this makes the classes available for follow on steps)</li>
<li>For Index
<ul>
<li>Make it &#8221;return View(_entities.Ideas);&#8221;</li>
<li>Right click index, check create strongly typed view</li>
<li>Select MVCPlayground.models.idea (this is solutionName.ModelNamespace)</li>
<li>For View Content, select List</li>
</ul>
</li>
<li>Duplicate the above steps for create, but select &#8220;create&#8221; from drop down and do not update the &#8220;return View();&#8221;</li>
<li>On the create view&#8230;</li>
</ul>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/geekdyor.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/geekdyor.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/geekdyor.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/geekdyor.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/geekdyor.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/geekdyor.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/geekdyor.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/geekdyor.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/geekdyor.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/geekdyor.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/geekdyor.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/geekdyor.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/geekdyor.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/geekdyor.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=geekdyor.wordpress.com&amp;blog=11940809&amp;post=4&amp;subd=geekdyor&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://geekdyor.wordpress.com/2010/02/09/creating-an-mvc-asp-net-azure-storage-site-in-10-minutes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bff4101dea9bcdefa7b908c9eec9265e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">geekdyor</media:title>
		</media:content>
	</item>
	</channel>
</rss>
