|
Nice sig...
Hawaian shirts and shorts work too in Summer.
People assume you're either a complete nut (in which case not a worthy target) or so damn good you don't need to worry about camouflage...
-Anna-Jayne Metcalfe on Paintballing
|
|
|
|
|
jdunlap wrote:
"Do unto others as you would have them do unto you." - Jesus
Not to sound picky, but I thought that was quoted by confucious??
Notorious SMC
The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning
Mark Twain
Get your facts first, and then you can distort them as much as you please
Mark Twain
|
|
|
|
|
Both of them said it. It is the basic tenet of morality - loving and caring for others. But you are right - that exact wording was probably Confucius's.
It will be different depending on which translation of the Bible you use, but here is the NASB-U version, which puts it in plain, every-day English:
Luke 6:31 "Treat others the same way you would want them to treat you."
Something to think about from day to day, isn't it?
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
this refers to that particular instance of the class.
In the snippet above you have to use this.value in order to assign the value passed in as value to the variable called value in the class.
If you didn't specify this the compiler wouldn't know that you mean the variable named value in the class instead of the local variable called value .
Make a little more sense?
James
"It is self repeating, of unknown pattern"
Data - Star Trek: The Next Generation
|
|
|
|
|
So this code translates as: "Assign the value from parameter to the 'value' variable of the DBBool class". Am I right?
|
|
|
|
|
Short and Sweet: "this" refers to the class in which you are typing the word "this" in. It just specifies that you are working with THIS class and not any other class the you refernse to, just the one were you are currently coding in....
public class OtherClass
{
string MyVar = "OtherVar";
public OtherClass()
{
}
}
public class MyClass
{
string MyVar = "YourVar";
public MyClass()
{
string OUTCOME = this.MyVar //is anything in MyClass, nowhere else
}
}
the OUTCOME would be "YourVar";
Leon v Wyk
|
|
|
|
|
I'm pretty new to .NET and XML here, and now I want to write a program in C# to remove the heading line from input XML file. For example, my input XML file will look sth. like this:
- <rptindex>
<title>xxxxx
<description>yyyyyyyy.
<subject>
..............
Now, I want modify this file and remove the first line "", so the modified file will be:
- <rptindex>
<title>xxxxx
<description>yyyyyyyy.
<subject>
..............
Can anybody advise me how to do it? Thanks!
|
|
|
|
|
Read the file line by line, and throw away the first line.
|
|
|
|
|
If you're talking about the pre-processing line or a DOCTYPE, that would work. However, if you're talking about removing the root element, you should read-in the document as an XmlDocument , get the child node(s) of the DocumentElemnt , and write those out to a file.
Reminiscent of my younger years...
10 LOAD "SCISSORS"
20 RUN
|
|
|
|
|
How do I make my own exception class?
This is as far as I got:
class WhatEverException : System.ApplicationException<br />
{<br />
}
Now...
How do I set the exception message from my class? I didn't notice any members that would allow it... am I just missing soemthing?
|
|
|
|
|
|
|
Hi,
I have a problem with streaming XML. I have created an aspx which return me an xml file format (Type text/xml, Encoding.UTF8). Also now, I try to read this stream in the XmlTextReader but I receive an Error Message when I parse it. And of course, I don't understand that.
Could you help me?
It is a bit urgent....
Thanks a lot
Code Source
XmlTextReader XR = new XmlTextReader(Server.MapPath("GenerateXmlTreeView.aspx"));
while(!XR.EOF){
XR.ReadElementString(); //Here Thrown exception
}
Sr.Close();
When I run may aspx
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Xml.XmlException: The '%' character, hexadecimal value 0x25, cannot begin a name. Line 1, position 2.
Source Error:
Source XML:
<?xml version="1.0" encoding="utf-8"?>
<treeview title="Licenses Tool">
<custom-parameters>
<param name="shift-width" value="15" />
<param name="img-directory" value="images/" />
</custom-parameters>
<folder title="1999" url="49">
<folder title="Gis Eastern" url="39">
<leaf title="Azerbaijan" url="37" reg="N" />
<leaf title="Belarus" url="20" reg="N" />
<leaf title="Bulgaria" url="21" reg="N" />
<leaf title="Croatia" url="22" reg="N" />
<leaf title="Czech Republic" url="23" reg="N" />
<leaf title="Estonia" url="24" reg="N" />
<leaf title="Hungary" url="25" reg="N" />
<leaf title="Kazakhstan" url="26" reg="N" />
<leaf title="Latvia/Lettonia" url="27" reg="N" />
<leaf title="Lithuania" url="28" reg="N" />
<leaf title="Poland" url="29" reg="N" />
<leaf title="Rumania" url="30" reg="N" />
<leaf title="Russia" url="31" reg="N" />
<leaf title="Slovakia" url="32" reg="N" />
<leaf title="Slovenia" url="33" reg="N" />
<leaf title="Turkey 1" url="38" reg="N" />
<leaf tit
-=zoltx=-
|
|
|
|
|
zoltix wrote:
Server.MapPath("GenerateXmlTreeView.aspx")
This just returns the path to the "GenerateXmlTreeView.aspx" file on the server. It doesn't execute the code contained in that file or do anything but take the virtual filename and give you the physical path to it.
You will probably be better served if you ask this in the ASP.NET forum to find out how to get the output of that page into another page.
James
"It is self repeating, of unknown pattern"
Data - Star Trek: The Next Generation
|
|
|
|
|
|
Does anyone have or know of a strategy for Data Authorization?
I have a requirement to limit a list of records returned from the database depending on user-defined filters. E.g. a grid with employees is limited by the supervisor who is logged on.
These filters can go to other tables etc.
I was thinking about passing my DataSet to a class and let that class filter it for me but i wasnt sure to put it in the BLL or in the DAL.
Thanks in advance for any help
--Adam Turner
|
|
|
|
|
It depends if you are ever going to use those records. If not, why bring them over the wire (assuming this goes over or could go over a wire) or consume memory. If it does not interact with, nor effect, the business logic and the user cannot modify the filter (only set when the user logs in or starts the program), I personally think it would seem best to handle it lower in the tiers such as DAL.
Rocky Moore <><
|
|
|
|
|
Hi all
I am about to choose a platform for a application i am willing to write. The problem is, that it will be deployed on rather not new machines (hopefully >win95, which .net framework doesnt support). Another problem is that i dont want to go to the client every time he doesnt properly install my application - here i mean .net framework errors when installing or other problems (eg. not meeting .net framework reqs : not installing IE 5.01 before, not installing win2k sp2, etc ...).
My app would be Windows Forms / Ado.NET / Ms Sql Srv Interop
And here is my question : would You recommend me choosing .NET framework as a base platform for my application, or to choose Borland with its VCL and Database components ?
please everyone - answer, write your own experiences, and so
thank You very much in advance
|
|
|
|
|
There is never a time I would choose Borland (too many bad memories there). Nevertheless, I do not see why you are so limited. Of course, it would depend on which language(s) you have under you belt, which language would best fit the situation and what you expect from the program. There are other options such as C++/MFC or VB with MSDE or MS Access files. You could also use FoxPro or MS Access.
You, as the programmer, are also able to take care of any installation issues since your install program should check for these conditions.
I did notice the "hopefully" on the limit of greater than Win 95. If there is any chance you will support Win 95 then .NET is out!
Of course, with .NET you will gain flexibility, expandability and scalability along with maintainability. Therefore, I guess it depends on what the “ability” your client wants
Rocky Moore <><
|
|
|
|
|
Thanks for answer
About limitations - clients want application to run on Ms Sql Srv - actually i am porting it from access based solution to Ms Sql based;
language - C++/MFC i the language i am best at, but it would take much longer time to build applications (over 40 forms, and when using MFC its too long for me). VB - old one - i am afraid, the at one moment it will have limitations that i am not able to cope with ( i preffer solid ground languages, not interpreted ones) - VB.NET - is good, but i am feeling much better at C#
ehh, nevermind, nevertheless, thanks for answer
|
|
|
|
|
Konrad Rotuski wrote:
(over 40 forms,
That sounds like a sizable app. Personally, I use C# and make the minimum requirement Win98. That way you have a scalable application for the future that is fairly easy to maintain (depending of course on how you create it). Depending on your forms, VS.NET C# does have a Data Form wizard that might be able to help with some of the work.
Rocky Moore <><
|
|
|
|
|
In vb.net, if I define a function as such:
Public Sub Foo(a as string)
...
End Sub
I could call it like this, if I am not bothered of the parameter I pass in:
Foo(New String())
Is there anyequivalent technique in C#?
Notorious SMC
The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning
Mark Twain
Get your facts first, and then you can distort them as much as you please
Mark Twain
|
|
|
|
|
|
:slaps head: duh!
But what if the parameters are objects?
Notorious SMC
The difference between the almost-right word & the right word is a really large matter - it's the difference between the lightning bug and the Lightning
Mark Twain
Get your facts first, and then you can distort them as much as you please
Mark Twain
|
|
|
|
|
Well, if you want to pass an invalid object(I belive it's what Nothing is in VB), Foo(null);
If you want to pass a valid object, but don't care what it is like, Foo(new Whatever());, just like in VB (Assuming it has a 0-param constructor. If it doesn't, you'll have to fill in some parameters or just use null)
|
|
|
|