|
Thanks........
|
|
|
|
|
Hi,
I got the following exception error when I debug my .net application in 2005.
"Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack."
Actually I am binding the data to gridview. I am sure that the data is there in dataset and binding to gridview. while binding, I am getting the above error.
I have searched in net, I got the solutions like, run in mixed mode (managed and native). I did the same means, I enabled both managed and native code debugging options. But still I am getting the same error. Could you please tell me how can I solve this?
I am using windows 2003 server with service pack 2.
Thanks in Advance,
AR Reddy
|
|
|
|
|
well to be honest I dont have an exact idea of this error but i think you should try capturing the DataError Event of that DGV and see whats happening in that.
Rocky
You can't climb up a ladder with your hands in your pockets.
|
|
|
|
|
Hi Reddy,
Interesting error! On googling a bit i found that it can be because of the response.redirect method in the catch block!
The response.redirect normallu throws out a thread abortion error so in the catch block it is throwing this error.
Remove your response.redirect in your catch block i guess it should work fine!
If you want to redirect to a specific on an exception use the web.config instead
Hope this helps!
gauthee
|
|
|
|
|
Hi,
I'm trying to find a way to access ACPI from within C#.
I want to read thermal zone _TMP property. I've searched the web, and found references to acpi.sys driver. This should be able to get the thermal information, but I can't find a way how to read it.
Does anyone have any experience with accessing ACPI from C#?
Does anyone perhaps know of some API or so to access the ACPI info?
Any help would be appreciated!
Tim
|
|
|
|
|
|
I've found these pages before, but they seem to be specific for the Notebook Hardware Control application (NHC).
I tried this program, and it can read all information of my system correctly. However I find this application to be much more then what i need (bloated, let's say), so I would like to write my own simple application to read only those values from ACPI that are of interest for me.
The examples given on the site of your first URL show how the NHC app will read the values. There they allow to create source files for your specific system, wich the app will then read and show.
This is not what I want to do. I have my System Description Table (DSDT) disassambled with the intel utility and i know wich values, methods, functions I want to read. What I need to know, but don't seem to find is how to call the methods or read the values from whitin my own application (C#).
I do not want a written out solution on how to read this, only some guidance to the right API calls or whatever needed to accomplish this task.
Anyway, thanks for your help Hessam Jalali and my best regards to you all!
Tim
|
|
|
|
|
Did you ever find a C# solution to read ACPI data for temps, speeds, voltages? Dave Kolb
http://dotnetcodeslingers.com
|
|
|
|
|
im doing research about eliminate noise in ECG signal..so that im looking for source code which will eliminate the 50Hz power line noise from the ECG signal.any programming language also acceptable..but im more familiar with C language.please help me..
|
|
|
|
|
is there any other sites where i can find information?
|
|
|
|
|
couldnt you write a filter to do this ? Also have you considered using matlab. I do recall the DSP library within matlab is very extensive when it comes to filter design.
The article below refers to using a Finite Impuluse Reponse filter for the noise removal from ECG
http://www.eng.nus.edu.sg/EResnews/0410/sf/sf_7.html[^]
Also if you find converting the transfer function of a FIR filter into code difficult then try this book
http://www.dspguide.com/[^]
It provides psudeocode, should be easy enough to convert to c.
|
|
|
|
|
thanks for your message..i have no background in matlab..so my lecturer asked to go for c language..i couldnt open the link of the article you'd given to me..i went through the dsp guide..my reserach about development of adaptive digital notch filter for the removal of power line noise from biomedical signal(ECG).
|
|
|
|
|
I assume you are doing a paper in digital signal processing then doing it without matlab is a crime. Matlab offers you a much better environment for signal processing algorithm development and analysis then C would.
Try this link for info on notch filter design for removal of a 50hz signal using matlab.
http://www.dsprelated.com/showmessage/57537/1.php
Asking someone to give you source code on forums wont make you magically complete your project therefore you need to start reading some IEEE papers on the adapative digital notch filter and figure out how to implement it. That's where the power matlab comes into play, it has built in routines to allow you to do the mathematical aspects of filter design alot easily. Personally, I think your lecturer suggesting to do it in C doesnt really understand the concept of prototyping all too well. The issue is that if you do it in C you will have to do all the mathematics all over again whereas in matlab most of the mathematics are standard routines which you call to make your algorithm work.
Learning Matlab is worth while because the concepts of DSP is alot easily explained and learned through matlab then any other platform.
Good luck
|
|
|
|
|
hi,
can i draw a circuit in matlab?
ashwiny
|
|
|
|
|
|
Hi all,
Does anybody know how to merge cells in DataGridView like in FlexGrid in
VB6?
There was an method MergeCol and MergeRow.
I am using DataGridView with an DataSet, exactly for this reason, because
I need one row with 3 cols, and the next one with only one col.
Something like this
------------------------------------------------------
¦ some data ¦ some data ¦ some data ¦
------------------------------------------------------
¦ Some other data should be here ¦
------------------------------------------------------
¦ some data ¦ some data ¦ some data ¦
------------------------------------------------------
¦ Some other data should be here ¦
------------------------------------------------------
¦ some data ¦ some data ¦ some data ¦
------------------------------------------------------
¦ Some other data should be here ¦
------------------------------------------------------
Thanx in advance
Know is Drop, Unknown is Ocean
|
|
|
|
|
I really dont think DataGridView supports such an operation...
Rocky
You can't climb up a ladder with your hands in your pockets.
|
|
|
|
|
If you're going to want to do that, you're most likely going to have to build your own control to do so
"I need build Skynet. Plz send code"
|
|
|
|
|
Hello,
I search for a fast possibility to send data from a server to the client. It should be possible to send the data from one PC to the other. For some other functions the server implements at the moment a remote interface with RegisterWellKnownServiceType...
What is the best possibity to send data (in worst case it could be about 1Mb/s) to the client?
Best regards
Hansjörg
|
|
|
|
|
another thing that I have forgotten...the data is allways a instance of the same class
Thanks
Hansjörg
|
|
|
|
|
Seems you are using Remoting and in .NET remoting you can send streams from server side to client with requesting it from the client area
I used it for sending none shared files from the server to client and the speed was far more 1MByte/Sec (but this method is not such a secure one for file sharing!)
and ofcourse with sending streams you can send all types of data (so you can send your instances as Data with serializing them on the fly in memory stream and then send the stream to client)
I can't give you a complete code because it was part of a bigger project and I must send you lots of code to work
but here is the code I wrote for testing it is possible to do this or not
sorry the code is somewhat messy (it was for testing puposes only)
the share part
namespace NetTest
{
public class RemoteFileBrowser:MarshalByRefObject
{
public delegate void EventFireHandler();
public event EventFireHandler eventFiredFromRemoteObject;
public RemoteResult GetStream(string path)
{
if (!File.Exists(path)) return new RemoteResult();
return new RemoteResult(new FileStream(path, FileMode.Open));
}
public RemoteResult Failed()
{
return new RemoteResult();
}
public string GetMachineName()
{
return Environment.MachineName;
}
public string GetAuthor()
{
if (this.eventFiredFromRemoteObject != null) this.eventFiredFromRemoteObject();
return "Hessam Jalali";
}
}
}
the server side
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Host Started");
TcpChannel tc = new TcpChannel(50000);
ChannelServices.RegisterChannel(tc,false);
RemoteFileBrowser rfb = new RemoteFileBrowser();
rfb.eventFiredFromRemoteObject += new RemoteFileBrowser.EventFireHandler(rfb_eventFiredFromRemoteObject);
RemotingConfiguration.RegisterWellKnownServiceType(rfb.GetType(), "rfb.rem", WellKnownObjectMode.Singleton);
Console.WriteLine();
Console.WriteLine("Press any key to Exit...");
Console.ReadKey();
ChannelServices.UnregisterChannel(tc);
}
static void rfb_eventFiredFromRemoteObject()
{
Console.WriteLine("Event Fired inside");
}
}
and the client side
namespace NetTestClient
{
static class Program
{
static void Main()
{
Console.WriteLine("Enter Address");
string uri=Console.ReadLine();
#region Remote File Stream
RemoteFileBrowser remoteRfb = RemotingServices.Connect(typeof(RemoteFileBrowser), uri) as RemoteFileBrowser;
(remoteRfb_eventFiredFromRemoteObject);
Console.WriteLine(remoteRfb.GetAuthor());
Console.WriteLine("Remote Machine is " + remoteRfb.GetMachineName());
RemoteResult remoteRes = remoteRfb.GetStream(@"N:\Tools for Linux.iso");
RemoteResult remoteFailed = remoteRfb.Failed();
Console.WriteLine();
Console.WriteLine(remoteRes.Message + " Continue...");
Console.ReadKey();
if (remoteRes.Succeed)
using (StreamReader br = new StreamReader(remoteRes.File))
{
Console.WriteLine();
Console.WriteLine("Dumping File");
Console.WriteLine();
while (!br.EndOfStream)
Console.WriteLine(br.ReadLine());
}
remoteRes = null;
#endregion
Console.ReadKey();
}
}
}
hope the post would be useful
|
|
|
|
|
I'm not sure at the moment if this works.
The main purpose of this application is to send the log data to other connected clients. For that I don't wan't to poll allways the server..
but maybe that there is possibility to use the stream! do you know if it is possible to deserialize objectes allways from the same stream?
Best regards and many thanks
|
|
|
|
|
hansipet wrote: do you know if it is possible to deserialize objectes allways from the same stream?
If you mean one stream for all
Yes it is possible but you must set the pointers of the stream manually eachtime by yourself for preventing errors.and ofcourse you need some implementation for preventing asynchronous calls from clients for requesting the stream and update requests from the server on the that.
and if you mean same stream as serialized in request
the answer is yes again and this time you just need to set the pointers to first of the stream with using methods like seek
hansipet wrote: I don't wan't to poll allways the server
if you said that because of the singleton it can be singleCall so after calling and disposing the stream the resources from server side will release and there would be no problem.
but if your Log files are not so huge I think creating a class as LogDataHolder and mark it as serializible then return it as value to clients would be a better idea.
good luck
|
|
|
|
|
how to enable visual style in C# applications. it is enable at design time, but at run time, i see forms as classic design.
|
|
|
|
|
If you mean the look of Windows XP, then you need to have the Windows XP theme enable on your PC. If you have switched to the classic Windows theme, you won't be able to get the XP look in your applications I think.
Talal
-- If this is a post that has been helpful to you, please vote for it. Thank 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."
--Rich Cook
|
|
|
|