|
Akshaylamba wrote: so that my People
Isn't that a bit Messianic?
You don't need to deploy your application on the LAN to use a database on the LAN.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
look into clickonce deployment - we use it extensively and are very happy with it.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi,
I would like log my keyboad strokes in a xml file. The attribute can be the key, and the value can be the timestamps or the other way ( doesn't matter). I would like to write the schema in the way that my output of schema would be exactly like this:
<LoggingActions>
<Keyboad>
<Entry key="a">0</Entry>
<Entry key="b">1213</Entry>
<Entry key="c">3445</Entry>
</Keyboad>
</LoggingActions>
so far, this is my schema:
<xs:element name="MyEvents">
<xs:complexType>
<xs:sequence>
<xs:element ref="LoggingActions"/>
</xs:sequence>
</xs:complexType> </xs:element>
<xs:element name="KeyboardEvent">
<xs:complexType>
<xs:sequence>
<xs:element ref="MyKeyEntry"/>
<xs:element ref="Time"/>
</xs:sequence>
</xs:complexType> </xs:element>
<xs:element name="MyKeyEntry"> <xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="keyReference"/> </xs:sequence> </xs:complexType> </xs:element>
<xs:element name="Time">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="timeRef"/>
</xs:sequence>
</xs:complexType> </xs:element>
<xs:element name="keyReference" type="xs:string"/> <xs:element name="timeRef" type="xs:int"/>
Instead, I am getting this xml as my output:
<LoggingActionsxmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<LoggedKey>
<MyKeyEntry>a</MyKeyEntry>
<MyKeyEntry>b</MyKeyEntry>
<MyKeyEntry>c</MyKeyEntry>
</LoggedKey>
<Time>
<timeRef>0</timeRef>
<timeRef>1213</timeRef>
<timeRef>3445</timeRef>
</Time>
</LoggingActions>
How can I combine these two together?
thanks,
modified on Monday, June 8, 2009 2:49 PM
|
|
|
|
|
Your XML is not well formed, <Entry="c"> is never well formed XML regardless of the schema (schema's don't affect well-formedness). <Entry key="c"> would be well formed and may be valid depending on your schema.
|
|
|
|
|
You're right, I mistyped it.
|
|
|
|
|
Hi,
I'm doing a small program to work with SAPI (Speech Recognition).
The main goal of the program is a client send a WAV file from a TCP client, and a server receive it and store it in hard disk. Then before closing the TCP connection, I want to "recognize" the file saved.
The problem I'm getting is, after the file is saved, I go to the function that does the speech recognition. When I go on debug, the events of speech recognition doesn't fire up. I've tried and in a stand-alone version (i only input a WAV and then do the voice recognition part) and it works.
Maybe some code to help:
After TCPListner and TCPClient
.....
FileStream fs = new FileStream(@"C:\\" + filenameOnly, FileMode.Create);
... and then I write a buffer[] (from a StreamReader) to a file.
fs.Flush();
fs.Close();
..... Then I call the SR functions and declare the events.
sr.SetInputToWaveFile(ficheiro);
sr.SpeechRecognized += new EventHandler<SpeechRecognizedEventArgs>(sr_SpeechRecognized);
sr.SpeechHypothesized += new EventHandler<SpeechHypothesizedEventArgs>(sr_SpeechHypothesized);
sr.SpeechRecognitionRejected += new EventHandler<SpeechRecognitionRejectedEventArgs>(sr_SpeechRecognitionRejected);
sr.RecognizeAsync(RecognizeMode.Multiple);
Any suggestion?
Thanks in forward.
|
|
|
|
|
the project which i am doing is windows based project . In that i need to generate some reports , so i did that with crystal reports and then i created a setup file and then i installed in another system, then i am getting the exception . After that i removed crystal reports from my project and again i installed the setup file , then its working fine. I want to know how to include the reports.
And also i have one more doubt, that is for a label control i dynmically changed the font and color of the text and then i stored those values in the database 'access' and i want to apply the values stored in the database to other labels. How to apply those stored values to other labels from the database. I retrieved from database i got the values as string , then how to apply these string values to change the color of the label.
|
|
|
|
|
Please help. Here is a snippet of my code:
using TD=System.Threading;
TD.Timer m_tMonitor;
m_tMonitor = new TD.Timer(new TD.TimerCallback(MonitorFunc), 1, 0, 60000);
I am trying to monitor a schedule every minute, and if schedule is past due then I am performing some tasks. My problem is sometimes monitorfunc is not completed in 1 minute so timercallback is triggered again. Is there a way I can use something like WAIT for monitorfunc to complete what is is doing before I call it again.
HELP!!!
|
|
|
|
|
Hi,
what do you want to happen when MonitorFunc hasn't finished in one minute:
- drop one execution (i.e. ignore the new one that overlaps, so the next run is up to one minute after the current one finishes);
- stop the running one and run the new one;
- finish the running one, then immediately run the new one?
You decide, and code accordingly!
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Hi Luc,
I am not sure if I understand you. However, I want to finish running one, and then start the new one. Basically if monitorfunc has not finished I want to pause the call if one minute is passed. Then start the call once it has finished. I hope I am making sense.
Please advice.
Sameer
|
|
|
|
|
OK, so if one run exceeds the allotted time period, you want the current run to terminate normally, and the new run of the function to follow immediately. This is some pseudo-code that would achieve this:
private int activationCounter=0;
void periodicFunction() {
int n=Interlocked.Increment(ref activationCounter);
if (n<=1) {
do {
n=Interlocked.Decrement(ref activationCounter);
} while (n!=0);
}
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
Hi Luc,
Sorry for the delay in my response and thank you for your responses. I couldn't implement your code, I am not sure if I am doing something wrong. I have put in another posting requesting guidance on building a service with a thread that looks at a folder for files and processes the file. Upon completion of the processing, it starts over again.
Help if you can please on that.
Sameer
|
|
|
|
|
Saamir wrote: I couldn't implement your code
that is extremely vague and uninformative, no one can help you based on this.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
bool stop = false;
...
Thread t = new Thread(new ThreadStart(run)){IsBackground = true}.Start();
...
private void run(){
while(!stop){
Thread.Sleep(60000);
MonitorFunc();
}
}
|
|
|
|
|
thank you for your response. I am using timercallback currently, sorry for my ignorance in threading but I am not sure how to modify all my current code to implement your method.
Sameer
|
|
|
|
|
That is not really what the OP wanted, since it will pause for an entire minute in between two executions, whereas the OP wanted it to run every minute.
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|
|
i'm trying to develop a data storing component, for it i'm in doubt about using datasets , as i heard datasets are not efficient in memory usage over Lists , is it true
|
|
|
|
|
Do what most people would do.
Develop test routines utilizing each data structure and run them in a loop maybe 1000 times (or more) and time them to find out which works best for your data.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Hi,
i want to use web cam to capture pictures. to use webcam i have to user avicap32.dll. so how can i add this to reference. i tried by add reference, but couldn't any one please just tell me how can i use avicap32.dll ....
thanks
A S E L A
|
|
|
|
|
I believe you need to use pinvoke with that dll.
This article[^] uses it, you may find it of use.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
If the camera supports Windows Image Acquisition (WIA), it's easier to use that. (See here[^])
If it doesn't, then yes acicap32 is an option. (There's a sample here[^])
I believe it would also be possible to do it with direct show, but I think it's probably a bit harder. (see here[^])
Finally there are 3rd party libraries out there that can do things like this. One example is OpenCV[^], and the OpenCVDotNet[^] wrapper.
Simon
|
|
|
|
|
Hi, I want to know all the actions that are performed on internet explorer, how can I do these all things?
I want to do these all on client side?
How can I know the information regarding somethings which have been done on web page, For example, things like:
1. How to convert the web page text on fly as there is no onload event
2. How to catch the keyboard actions like keyup, keydown, keypress when something
typed on web page.
3. How to know the information that if something is given to printer, i.e., text that is going to print, from an IE window.
Like these things, I want to get all the things when we perform some action on IE window through a plug-in.
How can I get these all things in c#?
Thank you...
|
|
|
|
|
Hi
I'm having a problem solving this problem.
I have an XML file describing how the different types (double, float, int and so on) should be interprettet, or how many bits the size of them should be. My application reads the XML and then have to cast for example a double to a float or an int to a short, based on the configuration. Afterward, the new casted or converted value has to converted to a byte array of the size of the type defined in the XML file.
I will just give an example to clarify.
1. Double value received.
2. Convert double value based on the conversion size in XML, double is cast / converted to float.
3. Create byte array from casted / converted value.
I can convert the value without problems using Convert.ChangeType(doubleValue,Type.GetType("System.Single")), but this give an object that I do not know how to make to a byte array of the correct size (32 bits).
Can anyone help me with solving the problem with converting / casting a double to a specific type defined in a XML file and converting this to a byte array ?
What I'm interrested in is the byte array being the size defined in the XML with signed values.
Thanks alot
Dennis
|
|
|
|
|
Dennis Lerche wrote: converting this to a byte array
Maybe this[^] will work.
|
|
|
|
|
Yes it works ok, unless you have an object and not a double, float etc.
What I have is an object after performing Convert.ChangeType(doubleValue,Type.GetType("System.Single")), so how do I make this to a byte[] ?
|
|
|
|