Monday, September 23, 2013

Les Misérables

Finished watching Les Misérables tonight, such a pity I got so busy have to finish a movie over a week in small pieces. Read the story as a cartoon long time ago, and the movie certainly bring back most of the memories, I have to say for a opera it is well done. I don't like some of the singing, but I love the ending song and it brought down some tears.

Monday, July 1, 2013

Age of sorcery build path

I recently started to play a game on windows phone, Age of Sorcery. Found out no one has posted its building upgrade path yet, so here it is, hopefully it can be helpful to other new players when they google: Academy => Shrine of fire 1 Academy 2 => shrine of wind 2 Academy 3 => shrine of earth 3 Academy 4 => shrine of fire 4 Academy 5 => City walls 5 Academy 6 => Shrine of Fire 5 Academy 7 => shrine of fire 6 Academy 8 => Castle 7 Academy 9 => Shrine of wind 8 Academy 10 => shrine of earth 10 House 2 => farm 1 House l3=> farm l2 House l4=> mithril 3 House l5 => farm l4 House l6 => Shrine of earth 1 House 7 => Academy 1 House l8 => warehouse l6 House 9 => City walls 7 House l10 => Warehouse l10 Warehouse 2 => Castle 1 Warehouse l3=> mithril l2 Warehouse l4=> House 3 Warehouse 5 => Shrine of Wind 2 Warehouse l6 => castle l5 Warehouse 7 => Castle 5 Warehouse 8 => house 7 Warehouse 9 => Castle 8 Warehouse 10 => City walls 9 Farm 2 => Castle 2 Farm 3 => Warehouse 2 Farm 4 => Castle 2 Farm 5 => Warehouse 4 Farm 6 => Shrine of Fire 1 Farm 7 => Academy 4 Farm 8 => City Walls 6 Farm 9 => City walls 8 Farm 10 => Warehouse 9 City walls 2 => Castle 1 City walls 3 => mithril 1 City walls 4 => farm 4 City walls 5 => House 6 City walls 6 => Warehouse 7 City walls 7 => Farm 7 City walls 8 => Mithril 7 City walls 9 => castle. 8 City walls 10 => castle 10 Castle 2 => House 1 Castle 3 => Warehouse 2 Castle 4 => City walls 3 Castle 5 => House 4 Castle 6 => Academy 5 Castle l7 => city walls l7 Castle 8 => Academy 7 Castle 9 => forge 5 Castle l10 => academy l9 Mithtil 2 => Warehouse 1 Mithril 3 => Warehouse 3 Mithtil 4 => Warehouse 3 Mithtil 5 => Academy 2 Mithril 6 => Academy 2 Mithril 7 => Castle 6 Mithtil 8 => city walls 7 Mithril 9 => Shrine of Fire 7 Mithtil 10 => shrine of fire 10 Shrine of wind => Castle 2 Shrine of Wind 2 => farm 3 Shrine of Wind 3 => mithril 3 Shrine of Wind 4 => mithril 6 Shrine of Wind 5 => farm 6 Shrine of Wind 6 => Castle 6 Shrine of Wind 7 => city walls 7 Shrine of Wind 8 => Farm 8 Shrine of wind 9 => Academy 9 Shrine of Wind 10 => Castle 10 Shrine of earth => Castle 3 Shrine of earth 2 => castle 3 Shrine of earth 3 => mithril 4 Shrine of earth 4 => Warehouse 5 Shrine of earth 5 => Castle 5 Shrine of earth 6 => forge 4 Shrine of earth 7=> forge 6 Shrine of earth 8 => Academy 7 Shrine of earth 9 => Academy 8 Shrine of earth 10 => Castle 10 Shrine of Fire => Castle 4 Shrine of Fire 2=> city walls 4 Shrine of Fire 3 => mithril 5 Shrine of Fire 4 => House 6 Shrine of Fire 5 => Castle 6 Shrine of Fire 6 => forge 4 Shrine of Fire 7 => Academy 6 Shrine of Fire 8 => Academy 6 Shrine of Fire 9 => Academy 8 Shrine of Fire 10=> Castle 10 Forge => Castle 7 Forge 2 => Shrine of wind 4 Forge 3 => Shrine of earth 5 Forge 4 => shrine of fire 5 Forge 5 => city walls 6 Forge 6 => shrine of earth 6 Forge 7 => shrine of wind 7 Forge 8 => Shrine of Fire 8 Forge 9 => city walls 9 Forge 10 => castle 10

Wednesday, May 8, 2013

I xxking love science

Take a look at this face book page, you will love it! https://www.facebook.com/IFeakingLoveScience

Sunday, May 5, 2013

Ants in mail box

Today my neighbor come by, after given us a mis-delivered letter, he told us ants are all over our mail box. Initially I thought there are food inside, so I was planning to flush them out. But after some observation, I found the ants are delivering food into our mail box!! Some search later, found the solution here. It can be solved simply by open the mail box door :-)

Wednesday, April 3, 2013

Eric Lippert’s Blog

One of my friend introduced me to Eric Lippert's blog. The conversion went from linqpad to nrefactor to Roslyn project than to him. Have not dig in yet but I will leave it here so I don't lose it. http://blogs.msdn.com/b/ericlippert/?

Full moon over Wellington , NZ...

http://vimeo.com/58385453, beautiful moon raise, unedited :-)

Friday, March 1, 2013

Entity framework and varchar

Just learned about EF and varchar types. EF strings are unicode and when querying database, it will cause performance problems (I was surprised by this, one would assume it should cast to varchar first...). There are 2 solutions, one is to use EntityFunctions.AsNonUnicode, i.e. from t in table where t.id == EntityFunctions.AsNonUnicode(id) The other is use attribute, [Column(TypeName = "varchar")] on the field.

Sunday, February 17, 2013

Wednesday, February 13, 2013

EF decimal precision

Encountered a strange problem at work. Entity framework code first, entity's decimal field always save to 2 decimal points even though the field has 4. Turned out in EF4 you need to specify percision: modelBuilder.Entity().Property(e=> e.property).HasPrecision(x, d);

Thursday, January 24, 2013

Cool HTML5 page

Very cool, roll and see some of the tricks :-) http://fff.cmiscm.com/#!/main Also some tests seems run faster with IE, but some can't be run on IE.