|
clife537 wrote: server application path
HttpRuntime.AppDomainAppPath
or
Server.MapPath
or
AppDomain.CurrentDomain.BaseDirectory
or
Request.Path
or
Request.PhysicalApplicationPath
Vasudevan Deepak Kumar
Personal Homepage
Tech Gossips
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
|
|
|
|
|
Thanks A lottt.................
I have solved the problem.
chandu
|
|
|
|
|
This website is so good for developer with C# ,I graduated from a college in china at july this year ,now I programme everyday , so many answers I can get from this website, thank you very much ,just for I am a computer lover.
welcome to make friends with people here,my email is suntiger304@qq.com.
|
|
|
|
|
super flower wrote: ,now I programme everyday
Very Good.
super flower wrote: so many answers I can get from this website
Good to hear.
super flower wrote: welcome to make friends with people here,my email is suntiger304@qq.com.
This is considered rude and impolite here. This is a technical discussions forum for health exchange of questions related to technology and knowledge sharing. If you are interested in making friends, Orkut is the best bet source for you.
Vasudevan Deepak Kumar
Personal Homepage
Tech Gossips
Yesterday is a canceled check. Tomorrow is a promissory note. Today is the ready cash. USE IT.
|
|
|
|
|
Dear guys,
I'm developing system "object detection (shape &velocities ) using ultrasonic sensors" for my FYP . Where I need to have Data Fusion. I need code to fuse datas at intermediate levels. Any ideas?
hamil
|
|
|
|
|
Hello experts,
Can anybody tell me how I can disable an item in a checkedListBox...?
So end user can check/uncheck only enable items...;P
Regards
Pankaj Joshi
|
|
|
|
|
Hi,
pankaj.indore wrote: disable an item in a checkedListBox...?
there is no direct support for this; but this is what I would suggest (not tested!):
- create a class that describes your listbox item, and give it also an Enabled property;
- create instances of that class to populate your listbox (rather than adding strings);
- make the listbox OwnerDrawn by setting the DrawMode and providing a DrawItem handler;
- make the DrawItem actions depend on Enabled, so the user sees which items are disabled;
- in the ItemCheck event, undo the action if the item is disabled.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
i having two server pc,both pc having big data, i want to maintain synchronize folder and file structure that means if PC A & PC B having file a1.doc if any change happend in pc A's file a1.doc then it should reflect automatically on pc B's a1.doc. so can any one help me how i will achieve this thing by using .net.
|
|
|
|
|
Directory.GetAllFiles and the fileinfo class ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
I'm a bit new to C#, and am wondering - specifically - how to keep a remote MySQL connection alive as long as the program runs. It has an MDI container and will have many forms open throughout its operation. I want to keep the connection running from start until close.
I can connect, no issue there. (Although, it would be nice if the program wouldn't lock up while it was connecting. Any work-around there, at least to display a waiting cursor?) I would just like to be able to globally access the MySqlConnection object throughout the application. Thanks for any help!
_________________________________________
1 + 1 = 10. What do you not understand?
|
|
|
|
|
You can connect on another thread, that will keep the UI responsive. To create a globally accessable object, make it public and static on a class. Not that I think this is a good idea. A better idea would be to do a proper data layer and make the connection private and static in that dll/class.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hey, thanks for the reply. Unfortunately, all that at the end is a bit above my skill level right now. Why would private be better than public? And how would I do something like that, Google doesn't seem to like my search query :P
Thanks again
|
|
|
|
|
|
hi i am totally new to this programming language c#. and i wanted to know y we use interfaces..
as all we do in interfaces is write the method declaration, and when we use it in a class we write there implementations there...
why cant we just directly write the implementation in the class and use it?
will be helpful if u make me understand this concept
thank you.
sri..
|
|
|
|
|
Hi, may I suggest you buy an introductory book on the programming language you choose
and work your way through it; in that way you will get all the information necessary
to understand the language, the logic behind it, and some examples.
And later you can go back to it if you did forget some details (or skipped some of
the more advanced chapters in a first read).
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
i already have one book, but it does not clearly explain or may b i am not able to get it
i checked out on the net too.... but couldnt find anything that could clear me out..
|
|
|
|
|
OK, I will give a very short explanation:
an interface is like a contract, it promises a couple of things (the presence of some
specified public properties and methods), without revealing other functionality or any
implementation details.
Example: a lot of collections (e.g. ArrayList) know how to sort object collections.
Q: How is that possible if they don't even know what the objects are?
A: They need an object that implements IComparer interface, which means something that
can decide whether object1 is less than/equal/greater than object2, so you provide
a class that holds the
int Compare (
Object x,
Object y
)
method, the only one required by IComparer.
So you could collect cars and compare them by color, by size, by mileage, whatever
you choose to implement in the Compare method you provide. And later on you can
replace the cars by plains, and still sort them, since your collection is unaware
of what exactly it is holding.
If this is a mystery, read up on sorting and IComparer, it is one of the simplest
examples around.
PS: I will not expand on this, there are thousands of books and tons of documentation
that cover this.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
To offer some further explanation, consider IDisposable. Any number of unrelated classes may want to dispose of a resource, an interface provides a standard way to do this, this means whatever object I have, I know how to check if it needs disposing. An interface is not like inheritance, it can be used to define how completely unrelated objects impliment a commmon interface.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,
I would like to implement some form of simple checking, if the code of my program was tampered or not. The solution seems to be easy. Just calculate hash of the exe file and that's it. The problem is that I am unable to open the exe file, from which the program was launched. I have tried a C# file stream, but I got an exception. I also tried creatfile and readfile, but it does not work either. Does anyone has an idea, why I cannot open the program file for reading?
Thanks a lot for any help,
Tomas Pevny
|
|
|
|
|
Hi,
the .NET FrameWork has provisions for this; look for "strong naming" and "signing" an
assembly. When applied, Windows will perform the check for you, and refuse to even launch
your app if it has been tampered with. (If you try to protect it yourself, the tampering
may have circumvented your check anyway).
Remark: IIRC it will require all referenced DLLs to also be strongnamed/signed, which
is OK for .NET itself, but may pose a problem with third-party stuff.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
The problem is that strong names can be easily overstepped. I think there was an article about this on codeproject. Moreover, I would like to know, why I cannot open the exe file for reading?
|
|
|
|
|
Hi,
1. as I already said, one can tamper with your checking code too.
2. I am not convinced you can't read a loaded EXE file; I would try with both the right
access mode (=what you want to be allowed to=READ) and the right share mode (=what you
want others to be able to do=probably also READ).
public static FileStream Open (
string path,
FileMode mode,
FileAccess access,
FileShare share
)
I doubt Windows loads with Share.None prohibiting anyone else from reading.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
You are right. It works right now.
Thanks a lot,
Tomas Pevny
|
|
|
|
|
Hi!
I have and HashTable object in my class, i initialize it with new as the class creates.
I am trying to use the ContainsKey in a function and i get this error:
Object reference not set to an instance of an object. at VAControls.clsScheduler.TaskHandle(SchedulerTask[]& taskarray, Int32& counter) in C:\Documents and Settings\Yossi_Tubis\My Documents\Visual Studio 2005\Projects\VASchedular\VASchedular\clsScheduler.cs:line 350
at VAControls.clsScheduler.main_scheduler() in C:\Documents and Settings\Yossi_Tubis\My Documents\Visual Studio 2005\Projects\VASchedular\VASchedular\clsScheduler.cs:line 312
I initialize it, so i do not understand why i get this message.
Do you know??
Thanks
|
|
|
|
|
Hard to say without seeing the code. Have you used a debugger to see if the hashtable is what's null ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|