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
S

Stefan Troschuetz

@Stefan Troschuetz
About
Posts
1.4k
Topics
17
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • "Pretty" indentation of output using SQLXML managed classes?
    S Stefan Troschuetz

    pmarfleet wrote:

    Can I modify my stylesheet to indent the nodes?

    Yes and no. To indent the XML output you can assign yes to the indent attribute of the output element but the XSLT standard does not define that a processor has to adhere and how the XML output has to be indented. (XSLT: "If the indent attribute has the value yes, then the xml output method may output whitespace in addition to the whitespace in the result tree"). Probably the XML processor of the SQLXML processor does ignore this attribute or maybe you have to tell him explicitly which number of whitespaces he should use for indentation. Personally I never used those classes so I cannot tell what to do. Have a look if there might be a setting for this. Also it could be helpful if you post the code you've got so far, making it easier for us to help you.


    "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook

    www.troschuetz.de

    XML / XSL database xml question csharp sql-server

  • Program to capture infrared codes from a remote control
    S Stefan Troschuetz

    Check out the Lirc and/or WinLirc projects; they should give you some inspiration.


    "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook

    www.troschuetz.de

    C# csharp design tutorial question

  • Generic event procedure for mutiple controls.
    S Stefan Troschuetz

    amatbrewer wrote:

    Would it be correct to assume that since the tb.SelectAll works (selects the text in the original control) means that the tb is a pointer to the actual text box and not a copy of it?

    Yes.

    amatbrewer wrote:

    It would seem that you should be able to do it more directly, like (TextBox)sender.SelectAll(); or something similar.

    Try this one: ((TextBox) sender).SelectAll();


    "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook

    www.troschuetz.de

    C# help tutorial question

  • use Process class on Mono?
    S Stefan Troschuetz

    How about trying to set the StartInfo.UseShellExecute property to false as the exception message indicates.?


    "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook

    www.troschuetz.de

    C# help question sysadmin linux

  • How to extract specific data values from xml using VC++ [modified]
    S Stefan Troschuetz

    Certainly nobody will write the whole code for you. Try it yourself and if you get stuck on some specific point come back here and we'll be glad to help you. If you use .NET take a look at the System.Xml namespace. Otherwise MSXML may be interesting to you.


    "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook

    www.troschuetz.de

    XML / XSL tutorial c++ xml help

  • multiple forms
    S Stefan Troschuetz

    Passing Values between Forms in .NET 1.x with C# and VB.NET examples[^]


    "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook

    www.troschuetz.de

    C# csharp tutorial

  • Should we use 'ref' keyword while passing objects also...
    S Stefan Troschuetz

    Spunky Coder wrote:

    The above still gives the output as "Grade1Employee" why is it so?

    You're passing a reference to a Manager object to the method. If you change the object via this reference the changes reflect outside the method (first example). If you create a new object and assign the reference to it to the method parameter, then this change does not reflect outside the method (second example), because changes to parameters (values or references) do not reflect outside a method unless you use the ref or out keyword.


    "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook

    www.troschuetz.de

    C# question

  • problem in javascript
    S Stefan Troschuetz

    Arihant rathi wrote:

    can any one of u tell me that for javascript problem where i should write my problem...

    Certainly not in the XML/XSL or the SQL / ADO / ADO.NET forum. Personally, I would try the Web development forum.


    "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook

    www.troschuetz.de

    XML / XSL javascript css help

  • Element does not exist in namespace...
    S Stefan Troschuetz

    It would help to see the files in question or at least the important parts.


    "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook

    www.troschuetz.de

    XML / XSL help question csharp visual-studio

  • Extra pair of eyes
    S Stefan Troschuetz

    In the style sheet the Row element is child of the stylesheet element (root) and a template element that both declare no default namespace. Since the Row element has no prefix specifying a namespace it is put into the empty namespace (xmlns=""). When put into the target XML file the mapping to the namespace persists. I guess you expected it to be copied to the target XML file and then belonging to the default namespace declared on the Workbook element.


    "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook

    www.troschuetz.de

    XML / XSL xml help question

  • Please help in XMLReader of c#.NET
    S Stefan Troschuetz

    You already got an answer for this question in the C# forum (answer[^]). Instead of simply reposting the question in another forum, you should try to understand what you were told in the answer and work with that info.


    "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook

    www.troschuetz.de

    XML / XSL csharp help

  • Random Number from 6 to 86
    S Stefan Troschuetz

    Divide the number by ten, round it and finally multiply with ten:

    int x = 15;
    x = (int)(Math.Round(x / 10.0) * 10.0);


    "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook

    www.troschuetz.de

    C# csharp help tutorial question lounge

  • Random Number from 6 to 86
    S Stefan Troschuetz

    Please consider that the second parameter is the exclusive upper bound of the random variate i.e. rnd.Next(6,86); will generate random numbers between 6 and 85. If you want the 86 to be generated too, the second parameter must be 87.


    "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook

    www.troschuetz.de

    C# csharp help tutorial question lounge

  • How to allow boolean 'TRUE' or 'True' in xml
    S Stefan Troschuetz

    I have created this schema with VS and it doesn't complain: "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cookwww.troschuetz.de

    XML / XSL xml help tutorial

  • How to allow boolean 'TRUE' or 'True' in xml
    S Stefan Troschuetz

    Hard to say without having more information: What does the code do you that are running? What do you use to work with XML? Also it would be helpful too see more of your schema; at least the component that should contain the extended boolean.


    "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook

    www.troschuetz.de

    XML / XSL xml help tutorial

  • How to allow boolean 'TRUE' or 'True' in xml
    S Stefan Troschuetz

    You can define your own type that allows either a standard boolean or some specific string value. "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cookwww.troschuetz.de

    XML / XSL xml help tutorial

  • Validating XML against XSD in MSXML6.0
    S Stefan Troschuetz

    Kavita seth wrote:

    Can you please suggest some solution for this?

    Mmh, I'm not sure where this error comes from as the OEM type is declared in the schema. Maybe it has something to do with declaring all schema components in the empty namespace. I strongly recommend using a custom target namespace. Also it might be helpful to see the declaration of the INFO-COMPONENT element.


    "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook

    www.troschuetz.de

    XML / XSL xml database help question announcement

  • How to allow boolean 'TRUE' or 'True' in xml
    S Stefan Troschuetz

    Cannot see the xsd snippet. Either turn all < into &am;lt; or check the "Ignore HTML tags in this message" beneath the smilies.


    "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook

    www.troschuetz.de

    XML / XSL xml help tutorial

  • Strange behavior of Double.IsPositiveInfinity [modified]
    S Stefan Troschuetz

    Luc Pattyn wrote:

    So what is the problem ??

    Error in my post: It should be: "If the program is run in release mode, it prints out "NextDouble: Not infinity"!!". I modified this.

    Luc Pattyn wrote:

    And did you ever care to print out range (that is, if it ever goes wrong) ?

    Yes I did. The last line in NextDouble prints out range (if uncommented of course). It always gives that range is positive infinity and as I said in this case the program works as expected.


    "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook

    www.troschuetz.de

    C# help question dotnet com algorithms

  • Strange behavior of Double.IsPositiveInfinity [modified]
    S Stefan Troschuetz

    Hello all, I've posted this before in another thread[^] but I'm anxious to get some more opinions so I'm posting this again. Consider the following small command line application:

    class Program
    {
    static void Main(string[] args)
    {
    NextDouble(Double.MinValue, Double.MaxValue);
    Console.ReadLine();
    }

    public static void NextDouble(double minValue, double maxValue)	
    {		
    	double range = maxValue - minValue;		
    	if (double.IsPositiveInfinity(range))			
    		Console.Out.WriteLine("NextDouble: Infinity");		
    	else			
    		Console.Out.WriteLine("NextDouble: Not infinity");		
    	//Console.Out.WriteLine("NextDouble: " + range);	
    }
    

    }

    Looks very simple and should always print out "NextDouble: Infinity", but it does NOT. If running the program in debug mode everything is fine. If the program is run in release mode, it prints out "NextDouble: Not infinity"!! If the program is run in release mode with the last line in NextDouble uncommented everything is fine again. First I thought it may be some problem with code optimization that is by default activated for release build, but deactivating the code optimization has no influence on the result. I've furthermore taken a look at the IL code but could not see any obvious error that could explain the behavior. In my previous thread I got two responses: One responder obeserved the same weird behavior and one does not i.e. the program always prints "NextDouble: Infinity" as expected. Does anyone have an explaination or clue what is happening here? Also, maybe some of you have the time to run the program in order to get some more observations.? I'm looking forward to your input. -- modified at 5:02 Thursday 2nd August, 2007


    "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook

    www.troschuetz.de

    C# help question dotnet com algorithms
  • Login

  • Don't have an account? Register

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