Tweets

  • 7y: @Dovre_Undertoy crazy
  • 7y: Voltaire's Candide, strange #book http://bit.ly/dD7cWv
  • 7y: #TF2 Drawing contest http://bit.ly/daoYme (all: http://bit.ly/cT4p9w )
  • 7y: Join the army: http://img.photobucket.com/albums/v628/Inkjunkie42/IMG_0256.jpg #funny
  • 7y: Cry me a river... Verve Remixed 4 (Spotify #music) http://bit.ly/br1Lw7
  • 7y: A Hidden Tribe, Superathletes, and the Greatest Race the World Has Never Seen. Christopher McDougalls #book Born to Run http://bit.ly/9KYjPn
  • 7y: Collected life tips from Reddit.com http://bit.ly/cC28wq
  • 7y: Glue... #funny http://bit.ly/aBe6Ey
  • 7y: I 1814 skjedde det noe utrolig viktig. Ikke alle overlevde. http://bit.ly/dtiT2T
  • 7y: #music Zero 7 - Yeah Ghost (2009): http://open.spotify.com/album/2pM7f9qa3SZCkI5NeGjsa5

Blog entries

  • Windows Live Mesh: class not registered

    Make sure that the "Windows Firewall" service is running.

    1) Start -> Run -> net start "windows firewall"

    or

    2) Start -> Run -> services.msc, locate "Windows Firewall" service and press Start. Read the entry
  • Integrating blogger.com with a personal website

    My website, andreasbrekken.com, runs ASP.NET MVC and is highly integrated with popular services such as Flickr, Delicious, and Blogger.

    So how do you display posts?

    In your controller:
    this.ViewData["Blog"] = from x in XDocument.Load("http://andreas-brekken.blogspot.com/feeds/posts/default")
    .Root.Elements(XName.Get("entry", "http://www.w3.org/2005/Atom")).Take(10)
    select x;

    In your view:

        <ul class="blog-entries">  
    <li>
    <h3><%= x.Element(XName.Get("title", "http://www.w3.org/2005/Atom")).Value%></h3>
    <%= x.Element(XName.Get("content", "http://www.w3.org/2005/Atom")).Value %>
    <a class="more-link" href="<%= x.Elements(XName.Get("link", "http://www.w3.org/2005/Atom"))
    .First(y => y.Attribute("rel").Value == "alternate").Attribute("href").Value %>">Read the entry</a>
    </li>
    <% } %>
    </ul>

    It'd be a better idea to process all of the XML in the controller and then pass the posts as strongly typed, or anonymous class, objects.

    Read the entry

Pictures

See more pictures on my Flickr profile.

Find me on: