|
I'll do it. It will cost you $20. When your next assignment comes, you won't know how to do it, because you didn't do this one. So, my price will double, and continue to double for each assignment. Then, you will fail your exam, because you still won't have learned anything, and you will drop out.
So, either drop out now, or do your own homework. No point putting it off.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Now that's a hell of an idea ... double the price for every homework assignment. Well played my friend. Well played.
Bryan Ray
http://bryanray.net
"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."
|
|
|
|
|
Wow ... if you don't know how to do this you really shouldn't be in a computer science class just yet. That's about as simple as it gets, buddy.
Bryan Ray
http://bryanray.net
"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."
|
|
|
|
|
Go away lamer
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
nishee!
this is professor sharada from ur university.
a friend student of sensual nature told me of your posting of homoworks on the cpiansex. but no u remember?! i sexplicitly told u to have a doubt about posting on the codeprojectians. I said with all hip thrusting force that u must no post homeopath homowork on the cpian websites!
because you have done this evil working, i must give u blackened grade. further i must ritually spank u with the paddle of shiva on your bare buns for your naughty disobedience.
Sincelery yours, Computer Information conSciences Professor and grader, Sharada Ulhas
|
|
|
|
|
good evening out there,
i'm working on a routine (using c# + wmi) that is able to change my network configuration e.g. dhcp<->static, different ip/gateway/subnet addresses etc (just like the build-in windows tcp/ip network configuration). everything works fine, but i can not find any way of switching between static defined dns servers and automatic leased dns servers (which i receive automatic from my router or equivalent). i mean, what is the counter part for "EnableDNS", like "EnableDHCP" is for "EnableStatic"? i can not find it in the windows api...
greetings
criss
|
|
|
|
|
There isn't one. DNS will get set back to DHCP if you enable DHCP on the IP address. You can't have DHCP DNS without a DHCP enabled IP pickup.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
hi dave,
so that means, if i call EnableDHCP all entries in my dns list will be deleted and it becomes "automatic"? hm, but that's not happening somehow. i can not get rid of any static dns settings.
any ideas?
criss
|
|
|
|
|
i found the solution... before calling EnableDHCP, i have to clear my DNS list by assigning an empty array to SetDNSServerSearchOrder like
...
newdns["DNSServerSearchOrder"] = new string[] { };
mo.InvokeMethod("SetDNSServerSearchOrder", newdns, null);
mo.InvokeMethod("EnableDHCP", null, null);
...
where "mo" is the ManagementObject of my networkcard.
regards,
criss
|
|
|
|
|
Hi,
I have a couple of questions in c# desctop Applics,
1)how can i respond to hitting the enter key on a combobox, to take the value entered from the user as if it's a text box?
2)how to allign the text in a rich text box to be centered??
ur help is appreciated, Thanks
|
|
|
|
|
r_jaz wrote: how can i respond to hitting the enter key on a combobox, to take the value entered from the user as if it's a text box?
Override the OnKeyPress event.
|
|
|
|
|
Check the OnkeyPress event for the first question.
regarding the second one,
right click the RTB. There is a property called TextAlign. Choose accordingly.
Keshav Kamat
India
|
|
|
|
|
Hi,
Thanks all for reply,
there's no TextAlign property for richtextboxes its for textboxes only, i used the property of SelectionAligment by SelectAll() and then DeSelectAll()
to centralize it but i wanted to see if there's a direct proprty such as TextAlign to do the job..
Thanks
|
|
|
|
|
Hi All,
I'm taking a shot at writing my own add-in. Right now I'm working on getting it to open designers for my projects forms.
I can open a designer if I know the forms file path ahead of time. How do I tell the DTE to open the designer for a specified form by it's class name? I know the form class name is frmTest, however it's file name may be something other than frmTest.cs.
Or, is there a way for me to ask the dte to give me the file that contains the definition for a specified class name?
Thanks,
|
|
|
|
|
Situation:
- GUI Application
- Windows Service
Both each have a project inside the Visual Studio solution. So during the debugging process, the each look into their own bin\Debug directory.
Both need to use the same database (dbname.mdb).
We would like to place the mdb file in the application folder. The installation should take care of that (which it already does).
How can we reach the database without having to hardcode the URI to the mdb file? During the install users can choose what the application folder should be.
Thanks in advance
|
|
|
|
|
Try System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);
"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
|
|
|
|
|
Stealing my signature! :P
Bryan Ray
http://bryanray.net
"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."
|
|
|
|
|
System.AppDomain.CurrentDomain.BaseDirectory returns the current application start folder. It migth do the trick, I use it and it works.
|
|
|
|
|
The first option given does not work. It looks in the application folder for the GUI application. The service however will look in the system32 folder.
MSilviu seemed to have the right anwser. I tested it out and it worked. So thanks for the input.
|
|
|
|
|
Hello.
So these are my problems:
I have to find a way to save a class of mine to a file.
I found serialization and I thought it might work.
But... When I tried BinarySerialization, some chars would just disapear, and I'd get an exception for "not a correct format".
XmlSerialization is throwing non-stopable exceptions, I just went to the one after.
I tried SOAP serialization, but now I came across another problem.
I need to serialize a generic collection which I built. This gives me an exception, saying that it cannot serialize a generic class. (that's after successfuly serializing List<t>).
Another thing that I have with SOAP serialization is that i'm not sure that it'll work in Linux (I was unable to install mono), since I need to import the SOAP class from Windows folder.
Can anyone recommend me on what to do?
Waiting for your help.
NaNg.
|
|
|
|
|
I don’t really understand what the problem is you are experiencing but I could tell you how I serialize into a binary stream I stream can be send or saved to file. Serializing to XML goes the same way. Note both serializer and deserializer and the object definition of the object to serialize should be the same at the sending and receiving end. To ensure this I simply put the classes in a dll which both sides use. With dotnet 1.x the formatter will give an exception when a version difference is detected. In dotnet 2.0 the formatter will serialize everything it recognizes even if there are version differences. The class to serialize should be declared with [Serializable]
///
/// Serialize object to byte array, object must be Serializable
///
/// <param name="someobject" />object to serialize
/// <returns>array
public byte[] Serialize(T someobject)
{
byte[] objectstream=null;
BinaryFormatter f = new BinaryFormatter();
MemoryStream stream = new MemoryStream();
f.Serialize(stream, someobject);
stream.SetLength( stream.Position);
objectstream = stream.GetBuffer();
return objectstream;
}
public void Deserialize(byte[] stream, out T someobject)
{
BinaryFormatter f = new BinaryFormatter();
MemoryStream serstream = new MemoryStream(stream);
someobject = (T)f.Deserialize(serstream);
}
Class def of class to serialize:
[Serializable]
public class SetConfigMessage
{
public string Name = "";
public string Value = "";
///
/// Config message
///
/// <param name="name" />
/// <param name="svalue" />
public SetConfigMessage() { }
public SetConfigMessage(string name, string value)
{
this.Name = name;
this.Value = value;
}
}
madv113
|
|
|
|
|
My problem is that I can't serialize with binary formatter (even like you did, I can't), and SOAP doesn't let me serialize generic classes that I've made.
I don't get what's hard to understand, I wrote it perfectly clear in the first message.
|
|
|
|
|
hi
i am using remoting..
on the remote system wwwroot i have a dll (FXP) which returns several strings(For different varaites of functions)....
now from the client i am getting reply for few functions and for another function i am getting server encountered internal error....
i want to knwo how can i debug and solve the problem...
as far as i know i dont have any security problems i have given all the rights.. to the folders and files which i access,,,,
thanks in advance
bye
|
|
|
|
|
This is just a shot in the dark, but if you have both static methods and instance methods, I would guess the static methods work and the instance don't. I would suggest all the methods be static. Which means you don't have to create an object to use them.
Hope that helps.
Ben
|
|
|
|
|
thanks for the idea ...
i will give try and let u knwo about it..
thanks dude
bye takecare
|
|
|
|