Code Snippets

Migradoc vertical text

        Dim myTextFrame As TextFrame = Section1.AddTextFrame
        myTextFrame.Orientation = TextOrientation.Upward
        myTextFrame.Width = 10
        myTextFramew.Top = 0
        myTextFrame.Left = -14
        myTextFrame.Height = 600
        Dim myP As Paragraph = myTextFrame.AddParagraph
        myP.Format.Alignment = ParagraphAlignment.Center
        myP.Format.Font.Size = 8
        myP.AddText("text vertical")


Install SpamAssassin on Windows Server as a service

Here is a little tutorial on how to install SpamAssassin on Windows Server 2008 as system service:

  • Download and install the binary version of SpamAssassin (for example
  • Download NSSM ( and put the nssm.exe within Windows directory.
  • This is a wrapper to run spamd as service on Windows.
  • Now in a console type “nssm install SpamAssassin”, choose the spamd.exe file from the installation directory of SpamAssassin and put your parameters into the Options field.
  • Click on the install button and have a look to the server services. Here you have the SpamAssassin service ready to start.
SQL Server Transact-SQL

SQL SERVER – FIX : Error 15023: User already exists in current database.

Error 15023: User already exists in current database.

1) This is the best Solution.

First of all run following T-SQL Query in Query Analyzer. This will return all the existing users in database in result pan.

EXEC sp_change_users_login 'Report'

Run following T-SQL Query in Query Analyzer to associate login with the username. ‘Auto_Fix’ attribute will create the user in SQL Server instance if it does not exist. In following example ‘ColdFusion’ is UserName, ‘cf’ is Password. Auto-Fix links a user entry in the sysusers table in the current database to a login of the same name in sysxlogins.

EXEC sp_change_users_login 'Auto_Fix', 'ColdFusion', NULL, 'cf'

Run following T-SQL Query in Query Analyzer to associate login with the username. ‘Update_One’ links the specified user in the current database to login. login must already exist. user and login must be specified. password must be NULL or not specified

EXEC sp_change_users_login 'update_one', 'ColdFusion', 'ColdFusion'

more details in


Select all sites in IIS manager

You should be able to do:

cd %systemroot%\system32\inetsrv\

and then delete them

appcmd list site /xml | appcmd delete site /in
ASP.Net Microsoft

Datetime format / Globalization

<pre class="default prettyprint prettyprinted"><code><span class="tag"><configuration>
</span><span class="tag"><system.web>
</span><span class="tag"><globalization</span><span class="atn">culture</span><span class="pun">=</span><span class="atv">"en-GB"</span><span class="tag">/>
</span><span class="tag"></system.web>
</span><span class="tag"></configuration></span></code></pre>
Tips & tricks

Gmail and Outlook

Login to your google account then access:

Now you can configure your mail client with your gmail account.

Follow these steps:



Code Snippets


CKEditor is a ready-for-use HTML text editor designed to simplify web content creation. It’s a WYSIWYG editor that brings common word processor features directly to your web pages. Enhance your website experience with our community maintained editor

Tips & tricks

The Domain Name Expiration Process

This article focuses on the pre-release expiration process, which is now used for the majority of expired domain names.

read more »


Make a hyperlink textview in android

TextView textView =(TextView)findViewById(;
String text = "<a href=''> Google </a>";


JagPDF is a free, open source library for generating PDF documents.

The goal of this project is to provide a fast and reliable library that is usable in both server and desktop environments. The library is written in C++ and provides bindings for other languages. It runs on x86/Linux, amd64/Linux and x86/Windows platforms.

JagPDF aims to be easy to use, have a look at Hello World examples in C++, Python, Java or C. The library implements a fairly large subset of the PDF specification which enables creation of a broad range of document types.

The library is distributed under the MIT license which encourages both commercial and non-commercial usage. Consider contributing to JagPDF to keep it evolving and free.