unboxing MacBookPro
Yesterday, our MacBookPro finally delivered to our office. This is our first Mac. Because this is for iOS application and to be one of our AdvGen staff computer, that is not for myself. I am not very exited about that. But the Apple pays attention to details in packing. This looks a presents.

That looks a gift from Apple. The whole computer is wrapped by a thin plastic. Moreover, I need to pull on the middle of plastic wrap to open it up! So cool!
In addition, this is a basic model. It has a 4GB RAM with i7 2.3GHz, but the performance is not bad.
I am quite happy about it.
Edit Connection String in code and save into web.config
I am building an installer for my CMS, AdvGenCMS. The first part is adding connection string and saves it into web.config. That is doable in C#. Just like the following code:
Code
Configuration config = WebConfigurationManager.OpenWebConfiguration("~"); | |
ConnectionStringsSection connectionStrSection = config.GetSection("connectionStrings") as ConnectionStringsSection; | |
string conntectStr = String.Format("data source={0};Initial Catalog={1};uid={2};password={3};Intergrated Security=SSPI",serverModel.ServerName,serverModel.DatabaseName,serverModel.UserName,serverModel.UserPassword); | |
if (connectionStrSection != null) | |
{ | |
if ( connectionStrSection.ConnectionStrings["AdvCMS.Data.Linq.Properties.Settings.AdvCMSConnectionString"] == null) | |
{ | |
ConnectionStringSettings setting = new ConnectionStringSettings(); | |
setting.Name = "AdvCMS.Data.Linq.Properties.Settings.AdvCMSConnectionString"; | |
connectionStrSection.ConnectionStrings.Add( | |
setting); | |
} | |
connectionStrSection.ConnectionStrings["AdvCMS.Data.Linq.Properties.Settings.AdvCMSConnectionString"].ConnectionString = conntectStr; | |
connectionStrSection.ConnectionStrings["AdvCMS.Data.Linq.Properties.Settings.AdvCMSConnectionString"].ProviderName = "System.Data.SqlClient"; | |
config.Save(); | |
} |
We can use WebConfigurationManager.OpenWebConfiguration("~") to get the whole configuration and then use config.GetSection("connectionStrings") to get the connection string section. Now, we can play around the connection string section freely.
Openclipart.org went back to normal now
My last post mentioned Openclipart.org is down, but now I checked it again. The server is up again.
This website went back to normal now.
Openclipart.org is down
I found Openclipart.org is down now. Previously, I was still able to access via http://openclipart.org/. That is not working this times, does anyone have a solution?
Stayed At visual studio 2010
Windows 8 is released for about a month. Moreover, there is a new version of Visual Studio for Windows 8. But I have a few amount codes in WPF and Winforms. I will be still with these projects for a little while. Moreover, nowadays, the trend is moving toward web apps and mobile apps. That is the reason, I put rest of my effort to build asp.net websites and android app. Get myself into Metro UI app is not very attractive unless Windows 8 is more popular in the tablet market. Thus, I will stay in visual studio 2010 for a little while.