It’s not a security threat or concern. I don’t mean StructureMap does any harm. As IoC container, StructureMap tries to do his job by searching for assemblies specified in your machine.config or web.config. For example, it is a kind of legacy, but we specified our custom GAC assemblies in web.config in C:\Windows\Microsoft.NET\Framework64\v2.0.50727\CONFIG The problem is StructureMap [...]
Archive for the ‘Uncategorized’ Category
structuremap will scan your machine.config / web.config
Posted in Uncategorized, tagged StructureMap on February 14, 2012 | Leave a Comment »
Ruby dojo #2 reverse string, array permutation, and filtering binary numbers
Posted in Uncategorized on February 10, 2012 | Leave a Comment »
It was the second ruby dojo yesterday (Thu. 9/2/2012). A few more people turned up this time. No pizza, sadly, but understandable that they can’t buy pizza and drinks every time. This time, it was more organised. If you are agile, you get better at each iteration. 3 problems were given. Reverse the string: “Welcome! [...]
d3.js Data-Driven Documents
Posted in Uncategorized, tagged d3, javascript library, mime type on February 2, 2012 | Leave a Comment »
This is an amazing javascript library that allows you to impressively visualise your data. http://mbostock.github.com/d3/ When you download it from github, you have a great number of examples (I believe they are about 100). In order to try those examples, you need to request those example htmls through http, I mean, using web server. Javascript [...]
Show and hide hidden files on mac
Posted in Uncategorized, tagged lion, mac, mac os x on December 27, 2011 | Leave a Comment »
This should be a simple matter, but it troubled me so much. Simply, you need to the followings, but be warned that there are slight incorrect version of command on internet, at least which didnt’ work for me on Lion. defaults write com.apple.finder AppleShowAllFiles -bool true Then killall Finder For me, if you did “YES” [...]
My favourite jQuery expressions
Posted in Uncategorized on May 4, 2011 | Leave a Comment »
This is purely for me and to remind myself of the frequently used jQuery expressions. Forgetfulness is a curse as well as a bliss! Make the first option of <select > selected (http://stackoverflow.com/questions/1414276/how-to-make-first-option-of-select-selected-with-jquery) populate select list dynamically. This simply replace html. If there is a better way, please let me know. I used an extension [...]
mongodb and norm
Posted in Uncategorized on April 16, 2011 | Leave a Comment »
People use ORM like Entity Framework and NHibernate a lot and I am one of them. When I use ORM, often I ma haunted by two inner thoughts. One is “This can be done in sql so easily” and the other is “What would it be like to use object database or document database? It [...]
Using uploadify in ASP.Net MVC application
Posted in Uncategorized on September 24, 2010 | 3 Comments »
Dropbox is getting more and more popular. I use it on my desktop, laptop, iphone, and ipad. Once I went to a post office to post a document, and realised that I don’t know the address. I had my iphone with me, so used Dropbox to get the address. It was so useful, and ever [...]
Using NHibernate, Sqlite in your ASP.Net MVC project
Posted in Programming, Uncategorized, tagged MS Test, NHibernate on April 29, 2010 | 4 Comments »
I used Entity Framework for my personal projects for a while but wanted to try NHibernate. Instead of NUnit, I tried MS Test this time. First problem was that MS Test fails, complaining that hibernate.cfg.xml does not exist. It did not copy the file to MS Test out directory. Of course, I set “Copy to [...]
Recycling IIS application pools and COM+ programmatically in C#
Posted in Uncategorized on April 14, 2010 | 4 Comments »
These days, I work on projects that is based on Sitecore CMS. Sitecore caches everything, so if you make any changes to your code, the web page does not reflect your change until you reset IIS or recycle the application pool. Resetting IIS often takes 10 to 20, even 30 seconds, and it is a [...]
The type of the key field ‘JobId’ is expected to be ‘System.Int32′, but the value provided is actually of type ‘System.Int64′.
Posted in Uncategorized on April 5, 2010 | Leave a Comment »
It’s a Easter Monday, very quiet everywhere. I have been working with Sqlite and had an weird error. When I try to update a record in sqlite, using Entity Framework, it complains that the type of primary key id is system.int64. My code is below JobTable jobToUpdate = (from j in _entities.JobTableSet where j.JobId == [...]