NinethSense oWnZ mE!: Praveen’s drawing book

Choose a Topic:

Fri
27
Apr '07

My new home page is up now!

I have integrated a CMS to my home page and is now up on http://www.ninethsense.com/. Now I can add contents easily. For my old website, I was manually making corrections on the HTML part.
'

How to remove/drop/delete a FOREIGN KEY in SQL Server

ALTER TABLE tableName 
 
DROP foreignKeyName
Tue
17
Apr '07

System.IO.Compression.GZipStream

Compress files using GZipStream in dotnet.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.IO.Compression;
 
namespace WindowsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
 
        private void Form1_Load(object sender, EventArgs e)
        {
            
            FileStream inFileStream = new FileStream(@“c:\cal.JPG”, FileMode.Open);
            byte[] buffer = new byte[inFileStream.Length];
            inFileStream.Read(buffer, 0, buffer.Length);
            inFileStream.Close();
 
            FileStream outFileStream = new FileStream(@“c:\cal.gz”, FileMode.Create);
            GZipStream compressedStream = new GZipStream(outFileStream, CompressionMode.Compress);
            compressedStream.Write(buffer, 0, buffer.Length);
            compressedStream.Close();
            outFileStream.Close();
 
 
        }
    }
}
Mon
16
Apr '07

winowl32.dll - Backdoor.Trojan

I was messed up with this nasty piece of dll. I tried to remove it with NAV but it simply detects and not cleans.. not even able to quarantine. I was not able to delete it maually also.

Now I fixed it (hope) by loging in to Administrator directly to the safemode command prompt. (I couldnt remove the file with safemode gui). then go to c:\WINDOWS\SYSTEM32 and delete this file winowl32.dll.

;) After that I created a text file with the same name and applied a attrib +r +h +s +a… just what I usually do for fooling the trojen/virus invokers.
'

Microsoft Silverlight

Microsoft Silverlight is a cross-browser, cross-platform plug-in for delivering the next generation of media experiences and rich interactive applications (RIAs) for the Web.

Microsoft Silverlight
http://www.microsoft.com/silverlight/
'

ASP.NET: How to detect .NET version from Browser - using User-Agent string.

This code will help you to fetch the .NET versions installed on the client browser.
/* Author: Praveen */
< %@ Page Language=“c#” ContentType=“text/html” %>
< %
	string useragent = Request.ServerVariables[“HTTP_USER_AGENT”];
   
	System.Text.RegularExpressions.Regex r = new System.Text.RegularExpressions.Regex(“.NET CLR [0-9.]*”);
	bool flag = false;
	foreach (Match m in r.Matches(useragent))
    {
        Response.Write(“<br><li>” + m.Value.Replace(“CLR”, “Framework”));
        flag = true;
    } 
    if (!flag) 
    {
        Response.Write(“You have NO .NET frameworks installed”);
    }
%></li>


Result will be somewhat like:
  • .NET Framework 2.0.50727

  • .NET Framework 1.1.4322
  • .NET Framework 3.0.04506.30
  • '

    I just received my MVP Academy Participation Certificate

    Months before, I joined for a cource (2310) Developing Microsoft ASP.NET Web Applications Using Visual Studio 2005. I just got the “Certificate of Participation” from Microsoft.

    Great to see :)
    Mon
    9
    Apr '07

    Developers! Mind this.

      * Inside every large program are a bunch of little programs trying to escape … Thus, instead of writing one large program, sometimes it’s better to have smaller ones based on a specific function.
      * Use good naming conventions and comment every major routine. Write this so that anyone can maintain it in the future.
      * Before start coding, visualize how it will execute.
      * Even a one-line change that is untested can get folks in trouble. So, test test test!
    Courtasy:allPM.com
    '

    My Microsoft MVP Profile

    Here is the link to my MVP profile at Microsoft Website. https://mvp.support.microsoft.com/profile/Praveen
    Tue
    3
    Apr '07

    My new Article on CodeProject - Menu UserControl

    My new article Navigation Menu for Windows forms (Outlook bar style) is now available on The Code Project.

    This article is about the creation of a user control which have the style like Outlook Express bar or DHTML Menu.



    Link: http://www.codeproject.com/cs/miscctrl/NavigationMenu.asp
    The CodeProject Microsoft Developer Network Official ASP.NET Forums Microsoft .NET Framework Community Microsoft Most Valuable Professional Kidoos forums Microsoft Visual Studio Developer Home Professional Information Technology Solutions Microsoft Research Home Trivandrum Microsoft Users Group Community Website