This text is replaced by the Flash movie.

Archive for May, 2010

NFS Carbon

May 29th, 2010


Watch it over youtube 480p

Draw Muhammad Day

May 19th, 2010

Draw Muhammad Day

Muhammad Loves to be drawn :)

Subarashiii.

May 8th, 2010
Japanese Digital Teen Artists


作者:中西 倫子/nakanishi NORIKO

Thanks to Tomo-san letting me know that the music was done by SuperCar(スーパーカー, Sūpākā), The combination of music and the short movie is simply awesome - more at http://www.nhk.or.jp/digista/

Remove number of words…

May 1st, 2010
Remove number of words at the beginning of string?

Looking for a function that you want to make string only return the last words within the strings? and remove number of words at the beginning Using C#


Windows Form Remove words

This function could help you:
        /// <summary>
        /// Return only last several words  and remove the number of words at the beginning from string.
        /// </summary>
        public static string RemoveFirstWords(string input, int numberWords)
        {
            try
            {
                string[] Split = input.Split(new Char[] { ' ' });
                input = string.Empty; //After passing the words to Split - Empty in again
                for (int i = numberWords; i < Split.Count(); i++)
                {
                    input += Convert.ToString(Split[i]) + " "; //Get Only the last words
                }
                return input;
            }
            catch (Exception)
            {
                // Log the error.
            }
            return string.Empty;
        }
Use the function like this:
private void removeWords_Click(object sender, EventArgs e)
        {
            if (stringToRemove.Text == string.Empty)
            {
                MessageBox.Show("The String is Empty");
            }
            else
            {
                int paramNumOfWords = Convert.ToInt16(numOfwords.Text);
                string returnOnlyLastWords = RemoveFirstWords(stringToRemove.Text.ToString(), paramNumOfWords);
 
                //Return Words
                MessageBox.Show("Return Words: " + returnOnlyLastWords);
            }
        }

Download Source code MVS version 9 C#

Cannot Create MSSQL Database.

May 1st, 2010

File Path is compressed Cannot Create MSSQL Database.

While trying to add Database which I want to name "SimpleCMS" to MSSQL server and trying to put it under App_Data folder, I encountered this error.


Error Details:
An exception occured while executing a Transact-SQL statement or batch.
(Microsoft.SqlServer.ConnectionInfo)

The file "you mssql db path here" is compressed but does not reside in a read-only database or filegroup. The file must be decompressed. CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
...

Cannot Create Database


Most cases this was cause that the Project folder is inside a compressed drive or under a compressed folder, which will save space for your drive.

I just want to share how I resolved this.

Note: That You can uncompressed only the Project folder and leave other compressed.

I'm using windows XP so what I did was 
1.) Right Click on the folder (Project Folder) in General Tab > Click Advanced
2.) Under Compress or Encrypt attributes
3.) uncheck "Compress Contents to save disk space"

Compression

From here I can now add the database "SimpleCMS" under the App_Folder inside the Project Folder.

Database Added