Decrease Font Size
Increase Font Size
   BLOG

See Object Explorer Details for objects in this folder

by bryian 2. October 2011 17:34

See Object Explorer Details for objects in this folder |

MS SQL Server Management Studio missing databases |

MS SQL 2008 Database missing tables|

Connect to MS SQL 2008 Server missing databases and tables

 

Several days ago, I was trying to connect to Microsoft SQL Server 2008 on my hosting account. It connects successfully but I don't see any database when expanding the Databases folder. There is an unusual blue icon under the folder with the label "See Object Explorer Details for objects in this folder". Then I compared the build version of Microsoft SQL Management Studio on my machine and the SQL server 2008 version on the hosting account and I noticed that the version I have is not up-to-date. Everything are working correctly again after installing all the necessary service pack and critical update. If you come across this situation, first check the version of SQL Management Studio. Here is the step to check the versions. Then download/install the latest service pack or update from Microsoft website or run the windows update. I also found this link useful, it provides all the KB / Descriptions for all build.


Figure 1
Missing Database

Social Sharing Buttons using jQuery and XML

by bryian 12. September 2011 19:34

Social Buttons using jQuery and XML|

Social Sharing Buttons |

Social Sharing Buttons using jQuery and XML|

Social Networking Sharing Buttons|

Sharing Button

 

Yet, another social sharing buttons script created by using jQuery and XML for your website. The script is very straight forward and self explanatory. The buttons container and buttons setting are stored in the XML file.

Figure 1

buttons in vertical

Figure 2

buttons in horizontal

How to use it?

  1. Download the SocialButton.xml and jquery.social-buttons.js file. This script requires the latest jQuery library, get it at http://jquery.com/.

  2. Open the SocialButton.xml and customize the necessary setting. You can customize the div container border style, width, color, position, and margin and background color. The DivMargin allow us to adjust the div container to the left and right.

  3. Listing 1:
    <!--solid, dotted, dashed, none -->
        <DivBorderStyle>dashed</DivBorderStyle>
        <!--Border width (int) -->
        <DivBorderWidth>1</DivBorderWidth>
        <!--Border color-->
        <DivBorderColor>#0000A0</DivBorderColor>
        <!--left, right, top, bottom -->
        <DivPosition>left</DivPosition>
        <!--left or right (px) -->
        <DivMargin>50px</DivMargin>
        <!--Div background color -->
        <DivBgColor>#F9F9F9</DivBgColor>
    

    You have the option to show or hide a particular social button.

    Listing 2:
    <!--none, block -->
        <DisplayGooglePlusOne>block</DisplayGooglePlusOne>
        <DisplayFacebookLike>block</DisplayFacebookLike>
        <DisplayFacebookShare>none</DisplayFacebookShare>
        <DisplayTwitter>block</DisplayTwitter>
        <DisplayDigg>block</DisplayDigg>
        <DisplayStumbleUppon>block</DisplayStumbleUppon>
        <DisplayAddThis>block</DisplayAddThis>
    
  4. Open the jquery.social-buttons.js file and provide the location of the XML file on your server. Use absolute link if you are not sure of the relative path and make sure the script and xml file are in the same domain. For example:

    Figure 3

    xml
  5. Place the scripts before the body tag in the master page, template or web page that you want the social buttons to appear. For instance:

    Figure 4

    scripts

Frequent Questions and Answers

  1. Does your script work on different platforms?
    Yes, it should be cross-browser compatible.

  2. How come I don't see the social sharing button that I like?
    Currently, the script only provide the option to show or hide Google Plus One, Facebook like/Sharing, Twitter, Digg, StumbleUpon, and AddThis buttons. You can modify the script to fit your requirements.

  3. Is this script free?
    Yes. Use at your own risk.

  4. Why there are white space in between the button?
    Some buttons do not display the counter if the count is zero.

Conclusion

I hope someone will find this information useful and make your programming job easier. If you find any bugs or disagree with the contents or want to help improve this article, please drop me a line and I'll work with you to correct it. I would suggest downloading the demo and explore it in order to grasp the full concept of it because I might miss some important information in this article. Please send me an email if you want to help improve this article.

Watch this script in action

Demo

Downloads

Download

Could not load file or assembly Microsoft.WebPages.Configuration

by bryian 30. August 2011 17:59

Could not load file or assembly Microsoft.WebPages.Configuration|

Microsoft.WebPages.Configuration

 

This problem happen several weeks ago. I was playing with the MVC code on my Windows XP machine and I kept getting the following error. I did a lot of researches but couldn't find the correct solution. Then I try to run some application using .NET Framework 4.0 and getting the same error. Then it click my mind that the error has nothing to do with my MVC version or dlls, so after reinstalling the .NET Framework 4.0, the error went away. I still haven't figure out what's the cause of this error, but, hey, it working now.

Could not load file or assembly 'Microsoft.WebPages.Configuration, Version=1.0.0.0, Culture=neutral, publickeytoken=31bf3856ad364e35' or one of its dependencies.

Solution: After trying all the solutions I found on Google, the best solution is to reinstall the .NET Framework 4.0

Tags: ,

ASP.NET

Regular Expression to validate file path and extension

by bryian 24. June 2011 18:22

Regex that matches file path and extension |

Regular expression for full file path and file extension |

Using Regular Expressions to validate a filename and path|

Regular Expression to validate file path and extension

 

Recently I was looking for a regular expression to validate a file path and extension. I found several of them on Google but none of them fit my requirement. So I decided to put together a version that suits my need. Here is the Regular Expression to validate the file path and extension and it compatible with JavaScript and ASP.NET.

^(?:[\w]\:|\\)(\\[a-z_\-\s0-9\.]+)+\.(txt|gif|pdf|doc|docx|xls|xlsx)$

Explanation:

^(?:[\w]\:|\\) -- Begin with x:\ or \\

[a-z_\-\s0-9\.] -- valid characters are a-z| 0-9|-|.|_ (you can add more)

(txt|gif|pdf|doc|docx|xls|xlsx) -- Valid extension (you can add more)

 

Matches:
\\192.168.0.1\folder\file.pdf
\\192.168.0.1\my folder\folder.2\file.gif
c:\my folder\abc abc.docx
c:\my-folder\another_folder\abc.v2.docx

Non-Matches:
\\192.168.0.1\folder\fi<le.pdf
\\192.168.0.1\folder\\file.pdf
\\192.168.0.1\my folder\folder.2\.gif
c:\my folder\another_folder\.docx
c:\my folder\\another_folder\abc.docx
c:\my folder\another_folder\ab*c.v2.docx
c:\my?folder\another_folder\abc.v2.docx
file.xls

Test it:
http://regexpal.com/
http://regexlib.com/