Tweets

  • 7y: Testing twitter gadget for opera mobile
  • 7y: Bonnie Bassler (TED): Discovering bacteria's amazing communication system: http://is.gd/rpad
  • 7y: You cannot have a better past, so abandon that idea right now. You did what you knew how to do, given the circumstances of your life.
  • 7y: aXbo Sleep Phase Alarm Clock: Monitors your sleep phases and wakes you up when you're ready. Bought one today! http://axbo.com
  • 7y: Just put I Am America (And So Can You!) by Stephen Colbert in the shopping basket. http://is.gd/r2nI
  • 7y: (Audio) book recommendation: A Briefer History of Time by Stephen Hawking http://is.gd/r1I3
  • 7y: (Audio) book recommendation: The Universe in a Single Atom: The Convergence of Science and Spirituality by Dalai Lama http://is.gd/qQON
  • 7y: Recommending an audio book about the American democracy: The Assault on Reason by Al Gore. About: http://is.gd/qQuS Buy: http://is.gd/qQwJ
  • 7y: "I am more than what bothers me." #86, http://is.gd/qQig
  • 7y: "Circumstances do not make the man, they reveal him." http://is.gd/qQ78

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: