|
And how I can correct this bug???
Sorry for my bad English...
|
|
|
|
|
Hi everyone,
I'm using an AxWindowsMediaPlayer to play videos. At certain points when the program is running, I need to know exactly where in the movie I am (time or frame number). Any ideas?
Thanks,
|
|
|
|
|
I am writing a windows service that uses NHibernate for performing database access. Now, for debugging and other purpose, i am using log4net that prints log messages and thus we can keep track of the works of the service.
But the problem is- if i set log priority to INFO, it prints loads of unnecessary messages related to NHibernate. I want to block these NHibernate info's and want to keep only those messages that i wrote myself(log.info). I don't know where these NHibernate messages are coming and i need a way to stop them.
How can i disable the log messages that are automatically written by NHibernate ? Can i filter them out and keep only my log info's ? Please help if any one have any idea....
Thanks
Chayan
|
|
|
|
|
Iftekhar Naim wrote: Can i filter them out and keep only my log info's ?
Have you read the Log4Net documentation?
|
|
|
|
|
well, thanks for your reply. I did not actually read the documentation and i was just working according to a sample code. So i had no idea about filter. Now i read how to filter or block log messages. I couldn't make filter work yet. But now it is working using this-
category name="NHibernate"
level value="Error"/
category
So only error messages will be shown now. Please let me know if there is any other better solution. Thanks a lot
-- modified at 1:42 Wednesday 25th July, 2007
Chayan
|
|
|
|
|
I've started learning about generics, and am hoping to implement it in a project at work, to make things a bit easier.
I understand you can set a constraint on the generic where, for example, the generic class must have a public empty constructor, ie
public class MyClass<T> where T : new()
My question is, is there any way where I can create a constraint where T must have a constructor that accepts an object as an argument? For instance;
public class MyClass<T> where T : new(Object)
I've tried this, and get a compilation error, and from what research I've done in the MSDN documents, it doesn't look like I'll be able to.
Thanks for any help
|
|
|
|
|
Your research is quite (and annoyingly) correct.
I'm largely language agnostic
After a while they all bug me
|
|
|
|
|
Bah! Just as I suspected. Thanks anyway...
|
|
|
|
|
Your post might imply a factory problem, have you considered a factory solution in your design?
Also "Object" is un-typed. It seems that mixing it's use with Generics which are a "Typed" solution might be contradictory depending on the unknown requirements of your project.
|
|
|
|
|
Thanks for your reply, but I guess I should've been more clear with my original message. I don't want to pass a literal Object, I would like to pass an instance of a class that is used for interaction with a database that a coworker has written.
I am not too enthusiastic about using these objects, but I am required to. I was at least trying to find a way that would make it a little less painstaking. Thanks for your help though.
|
|
|
|
|
Unfortunately, as you've found out, the new constraint only states that the constrained object must implement the default parameterless constructor. When you think about it, you can see why it behaves the way that it does. Obviously, having a specific constraint on a constructor would mean that you would be constraining it to a particular type and this type may end up being orthoganal to your generic type.
Of course, you could simulate this by doing the following:
public class MyClass<T, U> where T : new() where U : MyConstrainedClass
{
public MyClass(U item)
{
}
} It's not exactly a neat solution, but it may go someway towards what you are trying to achieve.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi
I have created a message queue and i am initializing as follows
MessageQueue mq = new System.Messaging.MessageQueue (XMLMSMQRecievePath);
where XMLMSMQRecievePath is the path of the msmq.It was initially working fine ,but now it starts throwing an exception as shown in below.
The specified format name does not support the requested operation. For
example, a direct queue format cannot be deleted
Why is this error coming.Can any one assist me
Thanks in Advance
Regards
DilipRam
|
|
|
|
|
I Hope you To Join with me in thinking about new ideas for my graduation Project using C# and as basic language
Thanks
Mona
LA ELAH ELA ALLAH MOHAMED RASOL ALLAH
|
|
|
|
|
Have you talked to your school's faculty? They should be able to give you some insight...
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
|
|
|
|
|
I got a car for my graduation, and it was quite a project to get it in running order.
only two letters away from being an asset
|
|
|
|
|
If you want to impress your professor, write a program that determines whether or not a program finishes on a given input. So your program would take a program X and a file of input Y then say yes/no to whether X will exit if given Y.
|
|
|
|
|
You could write an app that thinks up graduation project ideas. Just an idea...
|
|
|
|
|
I would like to have an "Event Server" running as a service on one PC and waitin for requests coming from other PCs or even Internet .
This Event Server will receive requests , process them , and send back a answer to the caller .
Can we use the Event , Delegate to do that ? If yes , how easy is it ? If not what is the solution to write this Event Server ?
Please note , I'm a beginner in C# .
Many Thanks
GDO
|
|
|
|
|
Hi
You can create an recieve event handler on both of the application and can be used to recieve incoming messages
after receiving message do the necessary operations in local methods of corresponding application
some thing like this
obj.OnReceive += new obj.OnReceiveHandler(this.ReceiveMessage);
this is the event hander and ReceiveMessage is the local method
in the other application declare the following
public delegate void OnReceiveHandler(string Message);
public event OnReceiveHandler OnReceive;
where
OnReceive will be local method in that application.
Hope this will give you some idea
Regards
DilipRam
|
|
|
|
|
Thanks for the quick answer. I will try doing something like you suggested.
Thanks again.
|
|
|
|
|
cleverhouse wrote: I'm a beginner in C# .
So what other languages do you have experience with?
Have you previously created a Windows Service?
Have you previous experience with Interprocess Communications? If so, what communications mechanisms? Sockets? COM? CORBA? RPC? Message Queues????
|
|
|
|
|
Sounds to me like you need to look into web services. Events and delegates not only accross threads but machines would take a lot of remoting. When web services were developed for just this situation.
|
|
|
|
|
Hi,
I'm new to both C# and Windows programming in general but would like to use a USB joystick in my application. I managed this using Delphi and wonder if the same multimedia joystick API can be used in a similar way? It seems that Direct Input is mentioned more frequently in reference to C# although I only need a simple x,y,z value and some buttons presses from a basic joystick.
Can anyone reccomend a simple way to achieve this?
Thanks in advance!
Christian
|
|
|
|
|
Hi
I recommend DirectX DirectInput. I used a class developed by Alex Ward several years ago. First you need to install DirectX SDK. Unfortunately I couldn't find the original article at www.trossenrobotics.com but I can send you the code and SDK installer.
|
|
|
|
|
Hi,
I have a C# window application calling a COM DLL written in VB6. I direct import the DLL using Add reference -> COM.
Now when I change the DLL and recompile it without changing the interface (the public method I use to expose), My C# got an exception that it could not find the interface. I need to derefence and then reference the dll again in my C# project to make it work, why is that? Does it mean I can not distribute dlls in a .NET environment without re-compile the application referencing the dlls?
Thanks
|
|
|
|