Follow @Lusse3 (118 followers)

Flickr Recent Photos

DessertSen är det fika på #valtech :)God lunch med @mohseno2010-03-08 010Fikar med Sara @ vete katten#biltema bjuder på slushies idag :)Fick tag på nå billig cigarr :)Länge sen man unna sig det här, men Inter - Chelsea är värt detÄr det ok att fota sin rotfyllning? :)Vilken dag!Lost och gotta! :)det verkar som om det är ok med 99 liv. Liam körde på iskallt ;) så du slipper fundera på det nu @Joopey

Categories

How to connect Twitter to your Google Buzz

Google Buzz is out and most of you will see it just below your inbox. But since a lot of people already use Twitter, google would’ve made a huge mistake not to let users connect their twitter account to their google account. They did implement it but not as good as you would’ve hoped.

Anyway, once you click on the Buzz link, you’ll see your information on the top of the page and click on “linked webplaces” ( mine says “länkade webbplatser” ‘cuase it’s on swedish).

You’ll get a list of supported webplaces you can connect too.

Choose what to connect too (in this case Twitter) and press the “Add” button (“Lägg till” due swedish as mentioned before)

Then just fill in your twitter username and click “Connect” (“Anslut” once again… swedish)

and you’re all set!

The silly thing about this is that you’ll never do an authentication with Twitter, you just grab a username, meaning that you can choose whomever’s twitter account. That would be silly but still. They’re just grabbing the users feeds and showing it on your buzz.

Anyways, it’s that simple but lets hope that we get a proper integration of Twitter in gmail – Buzz.

SlideME, Solution to buy apps in non-market countries

So you have an Android phone but can’t buy a single application? Some app creaters have made it possible to let you buy the game on their website and then enter the key yourself. But the people over at SlideME did a very nice solution for all of us that wants to buy apps and can’t wait until we can get it (hopefully in march)

It’s very very handy. All you need to do is register an account at their website and add your creditcard to it. Download Mobentoo Marketplace, install it and just browse around, pretty much like Android Market, but this one has atleast sorting and better category overview.

This will open up quite a few apps and games for you at affordable prices. Most of the games and apps go for $0.99, but the “better” ones go for between 2-4 dollars.

I bought Speed Force 3D and it works incredibly great! Smooth installation and no need to enter the key myself. Also, SlideME will give you access to all your transactions through their website and also the possibility to browse the market directly from the webpage.

Anyways, I truly recommend this solution for all you Android users that just don’t have patience enough (like me :) )

Ten Applications and six games on my Android HTC Hero

It’s been over a month now and I’m truly loving my HTC Hero. We had a lab at work where we made a simple stepcounter for android and was a nice introduction into programing for android. But now I was thinking about sharing few of the application and games installed on my phone. Specially since you start off installing whatever comes your way just cause it’s fun and simple :)

Applications (in no significant order)

* Handcent SMS. Just a very very very nice sms app. Gives you a better overview, more settings, smilies an da nice quickreply window. Everyone has this one on their toplist and I just can’t help to have it there aswell :P

*NewsRob: It’s not the best, but certainly a very comfortable and working application. This app synchronizes with your Google Reader account and also downloads the feeds, letting you browse them offline. This is great for people that lacks a flatrate deal on their phone or if you’re in a train and there are a lot of tunnels in the area :)

* Twidroid. I actually bought this app which is the one and only bought application on my phone, since we swede’s can’t buy anything from Android Store (PLEASE LET US!). This is a great Twitter client with a great widget and plenty of settings. You can also add several accounts incase you have an alter ego or some secret account.

* Taskpanel. Android takes well care of your phone and ends applications when it needs to free up memory. But for people that can’t really help themselves to have control over their phone, it’s great! Let’s you kill applications or even all of them with single tap.

* Ringdroid. This sweet little app let’s you cut and edit tunes on your phone, letting you create sweet signals, alerts… well, you name it! :)

* Spotify. Do I even need an explination? :)

* Eniro.se. This is a great application! it might steal some battery, I don’t know. But it’s worth it even if it does! Whenever you get an incoming call, if you don’t have the phone number as a contact, it will look the number up and give you a toast (androids tiny little window with a message) with who it is. It has been of great use!

* Market Suggest. This will look at what you have installed and search for stuff that you might like. I’ve actually found three apps (don’t use them THAT rarely though) and two games this way.

*Prisjakt. Just a simple awesome application. If you’re at Elgiganten or OnOff or whatever swedish store, remember to use this on whatever you are planning to buy. It’s really helpful!

* Soccer Livescore. Great app to follow live scores on football games played all over the world.

Games (in no significant order)

* Gem Miner. Great game and a great timekiller :) You play as a little gem miner and you just dig dig dig dig. You have to use different tools like ladders, pillars, elevators and much more. Really fun!

* Monkey Kick Off. Simple but fun game! Kick a coconut as far as you can :)

* Jewels. Old faithful. Great game, simple as that :)

* Papi Jump. Try it! first you might think “wth is this??” but it’s addictive!

* Zebra Paint. My kids loves this game. Whenever we’re somewhere and their attention level is set on HIGH, then this game comes like a gift from heaven :)

* 2 player reactor. This is a GREAT game. lots of minigames that you can play against someone else. I really recommend this one.

The reason why I have these applications and games on “my list” is because I truly use them all. Some several times per hour, some per day and some per week. Sure, I think I’ve over 100 different things installed but the majority are used just once in awhile. I hope that you can find any of these tip useful and find your new favorite app/game :)

How to prevent EPiServer to inherit categories to childrenpages

One of the pages I’ve been working on uses EPiServers categories a lot. But the annoying part with EPiServers categories is the way they inherit down to all children, which leads to the problem that categories can be deleted without someone meaning too. e.g you create a page called “Books” and you have a control that creates a category using the pagename. Below “Books” you’ll add all the books you want, but all those books will get the category “books” aswell. But to prevent dead categories, you might want to make a check that once you delete a page, you’ll also delete the category. Then, when deleting a childpage, you’ll also delete the real category, since the childpage also had this category. There are of course ways to prevent this but this can easily be forgotten and cause future problems. It will also mess up search results that uses categories to find information and so on.

Enough with examples, let’s get on the easy solution.


EPiServer.DataFactory.Instance.PublishingPage += CreateCategory;

EPiServer.DataFactory.Instance.SavedPage += CreateCategory;

EPiServer.DataFactory.Instance.SavingPage += CreateCategory;

EPiServer.DataFactory.Instance.CreatingPage += CreateCategory;

static void CreateCategory(object sender, EPiServer.PageEventArgs e)

{

if (!ValidPage(e.Page.PageTypeID))

{

e.Page.Property["PageCategory"].Value = string.Empty;

}

}

Basicly, you’ll call the method “CreateCategory” whenever you create, save or publish a page. Then use a method to determinate if the pagetypeid of the page you are creating is a validpage (i.e you don’t want these pages to inherit categories) and then just give it a string.Emtpy as PageCategory value.  Whatever the situation, just make a method to check if you want the page to inherit the category or not, then use the code above.

Hope this helps

EPiServer.DataFactory.Instance.PublishingPage += Instance_SavingPage;
EPiServer.DataFactory.Instance.SavedPage += Instance_SavingPage;
EPiServer.DataFactory.Instance.SavingPage += Instance_SavingPage;
EPiServer.DataFactory.Instance.CreatingPage += Instance_SavingPage;

GoogleWave Invites

Googlewave invites arrive to those who wait, just like a Christmas gift :P But on a serious note. When you have a googlewave account, you eventually get a few invites to give away. I still have 10 to give away so just add a comment here (with your email ofc) and I’ll be sending one your way.

Goolewave to the people! Viva Google! :P

HTML5 fix for Internet Explorer And Doctype fix for EPiServer solutions

HTML 5 introduces new elements to use such as <header> <section> <nav> and many more. The problem is that no version of Internet Explorer recognizes the new elements, but Firefox, chrome and many others does. The solution is easy but a bit boring when you think about it, since it’s about replacing all new elements to div instead. Which means that IE users won’t be able to appreciate HTML5 but users that use Firefox, Chrome and so on will.

Anyway, on with the solution! What you need to do is modify the writer and basically find all elements and change them with a div.  A good place to do it on is on your masterpage.

protected override void Render(HtmlTextWriter writer)
{
if(Request.Browser.Browser == "IE")
HTML5Replace(writer);
else
base.Render(writer);
}

private void HTML5Replace(HtmlTextWriter writer)
{
MemoryStream memoryStream = new MemoryStream();
StreamWriter streamWriter = new StreamWriter(memoryStream);
HtmlTextWriter memoryWriter = new HtmlTextWriter(streamWriter);
base.Render(memoryWriter);
memoryWriter.Flush();
memoryStream.Position = 0;
TextReader reader = new StreamReader(memoryStream);
string output = reader.ReadToEnd();
output = Regex.Replace(output, RegExStrings.HTML5_BLOCK_ELEMENTS , RegExStrings.HTML5_BLOCK_ELEMENTS_REPLACEMENT );
writer.Write(output);
}

But what REALLY does the magic is the RegEx, since it will find the elements for you and replace them correctly.

public const string HTML5_BLOCK_ELEMENTS = @"<(\/)?(nav|section|header|aside|footer)";
public const string HTML5_BLOCK_ELEMENTS_REPLACEMENT = @"<$1div";

The reason why I use $1 on the replacement string, is because I want to add a “/” if there is one in the element I found. This to close the tag correctly. So basically, when it finds “<nav” it will replace it with “<div” and when it finds “</nav” it will replace it with “</div”. Closing tag and class/id names will still be there so the div can take on the behavior of the replaced element.

Another problem that you will run into, if you’re running your site with EPiServer that is, is that EPiServers friendlyurlrewriter doesn’t recognize the doctype and it will try to fix it for you. For HTML 5 you’ll need the following doctype  ”<!DOCTYPE html>” but EPiServer will change it to the following “<!DOCTYPE HTML PUBLIC “” “”>”. Mohsen Pirouzfar found a great solution for this which you can read here. It’s in swedish but the code itself is usable to anyone :)

IIS7 Session problems – Worker Processes & Web Garden

We’ve had huge problems with the testserver. It first felt like a cache problem, because when you updated the content and hit refresh several times, you saw the changes and then you didn’t. Also, pages that were dependant on session state were giving null expressions since the state was empty sometimes.

The problem was in the Application Pool. DefaultAppPool was for some odd reason by default set to 3 worker processes which makes it a web garden (used for load-balancing) and this caused the user to get the errors mentioned above, since only one of the worker process actually had a valid session, the others didn’t.

worker

Sidan är inte tillgänglig för aktuellt språk / This page is not available for the active language – EPiServer5 Upgrade to SP2

After upgrading EPiServer CMS5 r2 to CMS5 r2sp2 you might get a nice little error in edit mode. This page is not available for the active language. This is due globalization changes and the workaround is to activate a language for your site. To do this do the following:

1. Go to admin mode
2. Click on Config
3. Go to systemsettings
4. Activate Globalization
5. Go to Edit mode
6. click on Language Settings
7. Chose the default language
8. Go back to admin mode
9. Turn off globalization

This should do the trick. Remeber, if you have several sites, you need to click on the root of each one of them and set the language settings on all of them.

Visual Studio 2008 System.Runtime.InteropServices.COMException

I had to make a clean Vista install on my machine and all of a sudden I was getting System.Runtime.InteropServices.COMException when opening old solutions. The error says very little to the user but what it really want’s to say is:

Install IIS 6 WMI Compatibility by going to Control Panel, Programs, Turn windows features on and off and select as the picture below showswindowsfeatures

Boot camp 2.1 wont install

I’ve been working with VMWare running WinXP for a year now but now it’s feeling a bit too slow so I’ve decided to run vista native on my macbook pro.  (will upgrade to vista7 later on).

First problem was that Boot Camp assistant couldn’t create a partition for windows since it couldn’t move some of the files. The “best” solution seems to be to run time machine and recover. That way it will defrag the harddrive and let you create the partition.

Second problem was the drivers. I’ve installed Vista SP2 and boot camp2.0 didn’t really work as intended. Neither the trackpad nor fn button was working properly, so I had to install 2.1 as soon as possible. Problem is that the installation just pops up and nothing happens.

I’ve runned into two solutions for this problem.

One:

Try the following:

1) run: regedit.exe

2) search for: Boot Camp Services
the key should be: ProductName

3) change in the same path, the Language key to: 1033

4) run the installer again

I didn’t really try this one out at though but most people say it works.

Second way:

Change your region to English(US)
Uninstall Boot camp 2.0
Restart
Install Boot camp 2.0
Restart
Install Boot camp 2.1

Yes, it’s annoying. Yes, it takes time. But now it’s done and finally I’m running Boot camp 2.1. (restarting as I’m typing this). Just hope that trackpad and fn key will work now :P