Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
I

Imtiaz Murtaza

@Imtiaz Murtaza
About
Posts
227
Topics
172
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Regex issue
    I Imtiaz Murtaza

    Hey guys, Can anyone help me in writing the simple regex. Here is the situation: I have a text file something like: // Contents // Contents MyDataBlock {    @$       The datablock text    @$ } // Contents // Contents I want to extract "The datablock text". There is single "MyDataBlock" in this text file. It means that i have to extract entire MyDataBlock {...} and then what is inside @$ into a regex group. I've created a regex. It is successfully extracting following in regex group <b>DataBlockContents</b>:    @$       The datablock text    @$ But i don't want @$ in the regex group DataBlockContents. How can i do so ? The regex i created is: MyDataBlock[\\w\\s]*{(?<DataBlockContents>[^}]*)}

    Imtiaz

    C# question help regex

  • String and non english characters
    I Imtiaz Murtaza

    I want digit numbers too.

    Imtiaz

    C# question business

  • String and non english characters
    I Imtiaz Murtaza

    I have a string. The value of that string contains some english and non english characters. I have two requirements: 1) Determine whether the string contains non english characters. 2) Remove all the non english characters from the string and get the resultant string which contains only english characters. How can i do so ?

    Imtiaz

    C# question business

  • File comparison tool
    I Imtiaz Murtaza

    Looking for a good tool to compare two files in order to see the changes. Google yields many results. So want to know that what fellow CPians advice.

    Imtiaz

    The Lounge

  • Making remote machine inaccessible
    I Imtiaz Murtaza

    Dear All, I have an application which connects to remote machine. I want to check the behavior of this application when remote machine is suddenly restarted. For this purpose, i have to physically access remote machine and restart it. After that i check how my application behaves. By restarting the remote machine, i am actually making that remote machine inaccessible. Now i want to do it programatically so that i don't need to physically connect to remote machine to restart it. How can i make a "remote" machine inaccessible from my local box for a certain time ? I want to do it programatically. By making remote machine "inaccessible" doesn't necessarily mean that i restart it. What i want to do is to just temporarily make it inaccessible from my local box.

    Imtiaz

    C / C++ / MFC question

  • Making remote machine inaccessible
    I Imtiaz Murtaza

    Dear All, I have an application which connects to remote machine. I want to check the behavior of this application when remote machine is suddenly restarted. For this purpose, i have to physically access remote machine and restart it. After that i check how my application behaves. By restarting the remote machine, i am actually making that remote machine inaccessible. Now i want to do it programatically so that i don't need to physically connect to remote machine to restart it. How can i make a "remote" machine inaccessible from my local box for a certain time ? I want to do it programatically. By making remote machine "inaccessible" doesn't necessarily mean that i restart it. What i want to do is to just temporarily make it inaccessible from my local box.

    Imtiaz

    C# question

  • Exception throwing - Advice required
    I Imtiaz Murtaza

    Friends, Quite frequently i need to throw exception from the code. But i don't want to write my custom exception class. Reason is that i don't have any dynamic data to be associated. In such situation, currently i am doing something like this: skyColor = GetSkyColor(); if(skyColor == Blue) { Console.WriteLine("Its a day"); } else if(skyColor == Black) { Console.WriteLine("It is night"); } else { msg = String.Format("{0} is not a valid sky color", skyColor.ToString() ); throw new Exception(msg); } As you can see above i am throwing "Exception" which is considered as bad practice. The second option is that i use InvalidOperationException, but this exception is used when object state is not valid which is not the case here. Third option is that i write my own exception class InvalidSkyColorException. The case i described above is well qualified for custom exception as i can associate dynamic data SkyColor. But issue is that in most of the cases i don't even have dynamic data to associate. I just want to throw a string message. Now if i start writing my custom exception class for each of the situation, then there will be thousands of such classes in the project. So what you guys suggest me in such cases. Shall i continue to throw generic "Exception" or use InvalidOperationException ? Or is there better solution ?

    Imtiaz

    C# help question

  • Advice regarding security software
    I Imtiaz Murtaza

    I want some kind of security software in my Laptop running Windows Vista. Please advice me. I heard good comments about Kaspersky. Norton has a reputition of slowing down the system. But in Amazon, i've read some really good comments about latest Norton 2009. Thus, a bit confused. Please give me your suggestions.

    Imtiaz

    The Lounge security

  • How to insert code snippet
    I Imtiaz Murtaza

    I want to insert code snippet for Console.WriteLine(). I type the characters cw and pressing ENTER or TAB. But nothing is happening. When i type the characters cw intellisense shows me that this is code snippet for Console.WriteLine(), but either by pressing TAB or ENTER i can only see cw written. Yes, i can explicitly invoke the "insert snippet" menu and select my snippet. But i want to insert snippet quickly during coding without invoking menu. Please tell me how to do so ?

    Imtiaz

    C# visual-studio tutorial question

  • Function name under execution
    I Imtiaz Murtaza

    Hi! How can i find out the name of function which is under execution. For example, please see the following code: void TestFunction() { String currentFunctionName = "TestFunction"; } In the above code, i've hardcoded the name of function in variable currentFunctionName. I want to do that programatically. Please tell me how can i do so. Back during the days of C+, i use __FUNCTION__, please tell me how can i do this is C#. Is it an area of reflection ?

    Imtiaz

    C# question csharp tutorial

  • Active Directory and C#
    I Imtiaz Murtaza

    Dear Friends, I the project i am working on, i've a requirement of some very simple work related to active directory. Actually, i've to just query some data. Now i am searching for some kind of article from which i can quickly learn only the basics of Active Directory, its installation and some basic programming of AD in C#. If you are aware of any such resource(s) which can help me in quickly done my job then please tell me. Sometimes google is not of much help and experience of friends is more useful.

    Imtiaz

    C# csharp database windows-admin algorithms help

  • Monitoring FILE changes
    I Imtiaz Murtaza

    Dear friends, I've a log file and this file is getting updated regularly. Now i want to develop an application which *monitors* this file and display the contents of this file. If there is any new addition in this file, the application should immediately update the text in GUI window ? How can i do so.

    Imtiaz

    C / C++ / MFC question announcement

  • XML comments header
    I Imtiaz Murtaza

    Dear Friends, I am looking into someones project in C#. What i noticed is that they have XML comments header on the top of every source file. Can you please tell me how to *automate* this process ? I mean, what i want is that whenever i add new class or source file, this header should get generated automatically on the top of the file. If automation not possible then what is the shortcut to generate these XML tags ?Here is the header: //----------------------------------------------------------------------- // <copyright file="MyClass.cs" company="ABC"> // Copyright (c) ABC Corporation. All rights reserved. // <author>Imtiaz(imtiaz)</author> // <created>3/12/2007</created> // <LastUpdated>4/12/2007</LastUpdated> // </copyright> // <summary> // Some kind of automation. // </summary> //-----------------------------------------------------------------------

    Imtiaz

    C# question csharp testing tools xml

  • HTML documentation
    I Imtiaz Murtaza

    Friends, Few months back, i've noticed a feature in Visual Studio with which we can generate HTML documentation of our classes. I don't know that which version of Visual Studio i've seen this feature or whether it is for C# or C++. Please tell me that from which menu item i can invoke this option ?

    Imtiaz

    C# csharp c++ html visual-studio question

  • Console.WriteLine in color
    I Imtiaz Murtaza

    Hi! We can write something on the console window using Console.WriteLine. I want to write something on console in some color like Red or blue. How can i do so ?

    Imtiaz

    C# question

  • CreateProcess to launch command prompt
    I Imtiaz Murtaza

    Friends, I want to launch command prompt window from my application running on Windows Vista. For this purpose i am using CreateProcess. What i want is that command prompt window shoul be launched with Administrative priviliges. Please tell me how can i do so ?

    Imtiaz

    C / C++ / MFC question

  • Shortcut to Command Prompt
    I Imtiaz Murtaza

    Would be glad if you could tell the way to do it.

    Imtiaz

    System Admin tutorial question

  • Shortcut to Command Prompt
    I Imtiaz Murtaza

    Friends, I am using Windows Vista. I want to add a shortcut to command prompt on the desktop. I want to add it in such a manner, that whenever i double click it, the command prompt should get open with Administrative privileges by default. I don't want to right click it and select "Run as Administrator". Please tell me how to do so ?

    Imtiaz

    System Admin tutorial question

  • GAC related question
    I Imtiaz Murtaza

    Friends, I am navigating inside GAC folder using command prompt i.e on my machine: c:\Windows\Assembly\GAC I have three versions of .NET installed in my machine. So i am expecting three different System.dll files in the respective folders. But when im issuing *dir* command to look inside system directory, there is only one folder visible:

    Directory of C:\Windows\assembly\GAC\System

    12/12/2007 11:42 AM <DIR> .
    12/12/2007 11:42 AM <DIR> ..
    12/12/2007 11:42 AM <DIR> 1.0.5000.0__b77a5c561934e089
    0 File(s) 0 bytes
    3 Dir(s) 119,704,276,992 bytes free

    i.e version 1.0.5000.0 of System.dll is there. My question is that where are the other versions of this dll and why their respective folders are not there ?

    Imtiaz

    C# question csharp dotnet announcement

  • Changing extension of assembly [modified]
    I Imtiaz Murtaza

    Is it possible to change the extension of the produced assembly dll to something else. Any solution other than PostBuildEvent ? Looking for solution like CustomAttribute setting or anything like that.

    Imtiaz

    modified on Tuesday, February 12, 2008 10:03 PM

    C# question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups