Entries:
Comments:
Posts:

Loading User Information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading User Information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

Discussions

Jorgie Jorgie Jorgie
  • File Search​Pattern in .NET

    Just use regex.

    Have the user input a normal file mask, but befor you use what he have you, do this:

    string fromuser = "get string from user";

    fromuser = fromuser.replace(".","\\."
    fromuser = fromuser.replace("*",".*");
    fromuser = fromuser.replace("?",".");

    Of course you also need put slashes in fronot of the other special regex chars Smiley

  • string.empty and  

    There are many things you have to remember about asp web controls. Two of them are:

    1. When your code runs on the server side, it is seeing the ASP control, not the HTML control that ends up on the page.

    2. ASP controls do not map in a one to one fashion to HTML controls. ASP has to build them out of one or more HTML controls and manipulate their contents to fit the control.

    In this case, #1 means that you are looking at an abstraction that will later be rendered into HTML. #2 means that when a asp:DataGrid is turned into an HTML TABLE, empty cells cannot be left empty or they will not be displayed properly. To deal with this, they are 'filled' with a non-breaking-space.

    Jorgie

  • Command parameters and SQL syntax errors

    Your parameters look strange to me. I use the names I want to give them in my commandText, not question marks. But then again I am doing it a lot differt.

    Not sure if it will help, but here is how I do it in c$ on a page where our IT Pros will request our Vista MAK for systems that will not be on the network enough to use our KMS server:

    SqlCommand sc = _sql.CreateCommand();
    sc.CommandText =
      "INSERT INTO [VISTA_MAK_REQUESTS] ([PAWPRINT], [MACHINE], [IP], [CLIENT_ID], [RESULT])\n" +
      "VALUES (@PawPrint, @MachineName, @IP, @ClientID, @Result);";
     
    sc.Parameters.Add("@PawPrint", SqlDbType.VarChar, PawPrint.Length).Value = PawPrint;
    sc.Parameters.Add("@MachineName", SqlDbType.VarChar, MachineName.Length).Value = MachineName;
    sc.Parameters.Add("@IP", SqlDbType.VarChar, RemoteIP.Length).Value = RemoteIP;
    sc.Parameters.Add("@ClientID", SqlDbType.VarChar, ClientID.Length).Value = ClientID;
    sc.Parameters.Add("@Result", SqlDbType.VarChar, ResultMessage.Length).Value = ResultMessage;
    sc.Prepare();
    sc.ExecuteNonQuery();

  • Vista UAC - time for DRM keyboard?

    Badgerguy wrote:
    
    Sven Groot wrote:
    It would exclude things like speech recognition and other accessibility software though that simulate user actions for good reasons.

    And it would make the nay-sayers go "M$ forces people to buy new keyboards".


    Not necessarily - software that simulates input could in itself be protected with DRM, and interact with windows TPM systems.


    What you are asking for is already there. The UAC prompt is in a trusted process that can only be accessed by other trusted processes. The only way a piece of software, malware or accessibility software, can touch it is if it already has fully trusted and elevated. In that situation it could do anything it wants without triggering UAC anyway.

    Jorgie

  • Geometry Wars for Windows XP?

    I agree that it is annoying, but it is not BS.

    Not everything has to be done for a technical reason to not be BS.

    Billions of dollars are spent each year on marketing. Making good marketing decisions is good business, not BS.

    In the console world, platform exclusive games are worth millions of dollars. That's hardly what I would call BS.

    Jorgie

  • IE HTML controls hard to see in Vista

    I am glad it is not just me!

    I also don't like the way the active item is highlighted in Vista.

    In some cases it is almost cases it is impossible to see what the currently active item is especially if multiple things are selected.

  • mfpmp.exe is annoying the hell out of me

    Must be audio driver specific... I never see mfpmp.exe take more that 3%. I usually bounces between 0 and 2 and only hits 3 once in a while. This is on a Dell Latitude D620 with the onboard SigmaTel HD audio. 1.6Ghz Core Duo.

    Jorgie

  • Event 1002 Error, DHCP-Client

    I would set your lease time to 60 min and see what happens. You should see your machine renew it's address every 30 minutes. It also seems strange that the starting range of the DHCP pool is the address that Vista is calling the server. Since your routers address seems to be 192.168.1.1, you might want to start the pool at 192.168.1.2. Jorgie

  • The Registry. Why, exactly?

    Minh wrote:

    The Registry you see today is MS Registry V 3.0.You obviously wasn't around when it was introduced.


    Yea, I have only been supporting MS products since Dos 3.2.

    The regestry corruption problems in Win9x/Me do not justify spouting BS like 'they added it cause they wanted to create a single point of failure.

    'The growing pains the registry has gone through (many of which were casued by the pre XP multitasking model) do not negate the advantages of having the registry.

    People love to snipe at the low hanging fruit.The person who started the thread asked a simple question. Smart-arse remarks provide zero information and nearly zero entertainment for everyone but the smart-arse that posted them.

    I guess we should expect as much in the coffehouse...

    Come to tech-off you actually want to have a discussion.

  • The Registry. Why, exactly?

    Minh wrote:
    MS felt that error handling was a lost skill and they wanted to start training developers in that again.

    By having a single point of failure for virtually every application on a disk sector, developers are forced to get better in error handling.

    In the long run, you see that devs were able to take to .Net exceptions with ease.


    What a bunch of <bs>... (why wasn't bu...sh*t bleeped?)

    The registry is a core service. If your OS core is down, your appication won't work anyway.

    You might as well have said that they chose to use a 'file system' (insert ANY core service here) just to add a single point of failure.

    If your application does not need the registy, don't use it. You don't have to be a dick about it.