Ana içeriğe atla

Kayıtlar

Ekim, 2010 tarihine ait yayınlar gösteriliyor

ASP.Net Website root folder

To access to the root folder in website :  Server.MapPath("~/") This sample demonstrates to create or to open a file in the root folder of website, then writes test text into it. using System; using System.IO; public partial class _Default : System.Web.UI.Page {     protected void Page_Load(object sender, EventArgs e)     {         string root = Server.MapPath("~/");         string path = root + "testselim.txt";         using (FileStream fs = new FileStream(path, FileMode.OpenOrCreate))         {             using (StreamWriter sw = new StreamWriter(fs))             {                 sw.WriteLine("Test Text");                 sw.Close();             }             fs.Close();         }     } }

Microsoft Visual SourceSafe Undo Checkout File that Checked out By Someone Else

One of your teammate checked out a file and has forgotten to leave the file. There is an emergency so you have to get that file and edit. Find that file in your local disk and change ReadOnly setting of the file. That's it. You may edit that file. Later, when emergency is over, get a backup of your files and tell your friend to leave the files you need. Then you check the files out again and replace them. Maybe your college quit working and forgot to leave a file. So you have to do this to make the file Undo Checkout: - Open command line -  Run -> cmd - Go to the directory where your SourceSafe is in. (c:\Program Files\Microsoft Visual SourceSafe) - Run "ssexp.exe -yadmin" That's it! - Find the files you need and Undo Checkout. Hope it helps.

Find (Select) / Remove Duplicate Rows From Table

To find the duplicate records , this select query can be used: SELECT column1 , COUNT(*) FROM tableName GROUP BY column1 HAVING COUNT(*) > 1; And to Delete these records, use this: DELETE FROM tableName WHERE id NOT IN (SELECT  MIN(id)                               FROM tableName                               GROUP BY column1, column2, column3...   ) !!! Be careful! It is always good to work with backup. ;)

First Order In Google

How to move up to the first order If you would like to be in the first order in google. You have to do this. Unique keywords will make your web page valueable ;)

MSSQL Datetime Comparison

To compare datetime values in mssql this code can be used Select Convert(datetime, '01.01.1990', 102) Convert(datetime, COALESCE(BIRTH_DATE, '01.01.1990') ,102) < Convert(datetime, '01.01.1990', 102)