|
Hmm... how about downloading Visual C# Express Edition ?
You can install both C# and C++ Express Edition.
|
|
|
|
|
That should be included with Visual C# 2008 Express - install that, and find the files you want.
I presume you want to hack it so that you can use C++ and C# projects together in a single solution, rather than having to have the two IDEs open separately?
|
|
|
|
|
I'm fine for now. I've just downloaded a nice substitute of Visual C# - SharpDevelop, and I can use it to make Visual C# projects and solutions
|
|
|
|
|
I don't need anymore the C# Rules File because I have now the Visual C# 2008 Express Edition.
Thanks for your help.
|
|
|
|
|
I was able to get my code to work with the following, but it seems inefficient. Isn't this code calling the database multiple times to get objects before an insert. Anyone know the correct way to do this or have a link with a good example?
int baRequestTypeId = int.Parse(this.rblMode.SelectedValue);
int baAssociateTypeId = int.Parse(this.rcbAssociateType.SelectedValue);
int baBusinessTypeId = int.Parse(this.rcbBusinessType.SelectedValue);
SqlData.BusinessAssociateWorkFlowData dataContext = new BusinessAssociateWorkFlow.SqlData.BusinessAssociateWorkFlowData();
SqlData.BusinessAssociateContactChangeRequest baContact = new BusinessAssociateWorkFlow.SqlData.BusinessAssociateContactChangeRequest();
SqlData.RequestType baRequestType = (from r in dataContext.RequestType
where r.RequestTypeId == baRequestTypeId
select r).First();
SqlData.BusinessAssociateType baBusinessAssociateType = (from b in dataContext.BusinessAssociateType
where b.BusinessAssociateTypeId == baAssociateTypeId
select b).First();
SqlData.BusinessType baBusinessType = (from b in dataContext.BusinessType
where b.BusinessTypeId == baBusinessTypeId
select b).First();
baContact.RequestType = baRequestType;
baContact.BusinessAssociateType = baBusinessAssociateType;
baContact.BusinessType = baBusinessType;
baContact.Name = this.rtbName.Text;
baContact.Abbreviation = this.rtbAbbreviation.Text;
baContact.Code = this.rtbCode.Text;
baContact.CreatedBy = User.Identity.Name;
baContact.CreatedOn = DateTime.Now;
baContact.LastModifiedBy = User.Identity.Name;
baContact.LastModifiedOn = DateTime.Now;
baContact.ContactAddress.Add(this.AddressCntrl1.GetContactAddressEntity(ref dataContext));
dataContext.SaveChanges();
I didn't get any requirements for the signature
|
|
|
|
|
It is extremely rude to delete your previous message and repost it to another forum, especially when responses have already been given. The damage was done by originally posting to the incorrect forum, now no one will have the context of what has already been tried and the benefit of the other responses.
See here[^]
6. Do not remove or empty a message if others have replied. Keep the thread intact and available for others to search and read. If your problem was answered then edit your message and add "[Solved]" to the subject line of the original post, and cast an approval vote to the one or several answers that really helped you.
If anything delete this post and continue in the previous context.
only two letters away from being an asset
|
|
|
|
|
OK sorry. My fault. I didn't want to post it in many places and I thought you were done trying to help me. Thanks your help earlier though.
I didn't get any requirements for the signature
|
|
|
|
|
Dear friends
I am using lucene.net 2.3.2 for indexing, but I am facing memory leakage problem in many methods(GetPosting(Posting []), AddPosition(Token), ProcessDocument(Analyzer) etc) using dotTrace profiler. How do I solve this problem? Can anybody say in which version of lucene.net, no memory leakage problem occurs?
Thanks in advance Susanta
|
|
|
|
|
If no one answers your question, you might be better off asking in their forums here[^], scroll to the bottom to see how.
[Edit]
I found this[^] thread which discusses the problem by googling lucene.net memory leaks, perhaps you could give it a go while you are waiting.
[/Edit]
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.”
|
|
|
|
|
|
You can submit[^] a site by doing a "POST".
|
|
|
|
|
|
Hi All,
I'm using System.Diagnostics.Process for running a background task, from which i need to read the standard out and standard error. I'm doing this asyncronously with the Process.ErrorDataReceived, Process.OutputDataReceived events, and Process.BeginOutputReadLine() and Process.BeginErrorReadLine().
I also need to know when the process has exited, and i've received all the data. The problem is, that the Process.Exited event is fired before all of the data has been processed.
I need to tidy up other stuff when the process has exited and all the data from stdout/stderr has been received. But I cannot for the life of me find a way of working out when that is the case. Can anyone help?
thanks
Jon
|
|
|
|
|
Hi Jon,
I've been struggling with this one for a while myself and was able to create a scenario where standard out/err data were not handled by dumping a large number of lines from the process right before exiting. I had hoped to be able to switch from asynchronous to synchronous reads once the WaitForExit() returns, and then receive the remaining data with a process.StandardOutput.ReadToEnd(). Unfortunately, this is not possible:
"You cannot mix asynchronous and synchronous read operations on the redirected StandardOutput stream. Once the redirected stream of a Process is opened in either asynchronous or synchronous mode, all further read operations on that stream must be in the same mode. If you cancel an asynchronous read operation on StandardOutput and then need to read from the stream again, you must use BeginOutputReadLine to resume asynchronous read operations. Do not follow CancelOutputRead with a call to the synchronous read methods of StandardOutput such as Read, ReadLine, or ReadToEnd."
http://msdn.microsoft.com/en-us/library/system.diagnostics.process.canceloutputread.aspx[^]
As far as I can tell, this applies to anything you could check (process.StandardOutput.EndOfStream) to see if it were necessary for you to delay cleanup. Unless I'm missing something, which is entirely possible, this seems like a shortcoming of the Process class, because it essentially means that you can't trust the asynchronous interface to provide you with all of your data.
Sadly, this seems to leave us with synchronous IO, perhaps a couple extra threads, and the additional synchronization issues that this approach entails (see here[^] for a deadlock condition to watch out for).
The only other thing that has worked for me so far, and this is sort of hackish, is to sleep the thread that handles the Exited event (or a return from WaitForExit) to give the DataReceived events time to fire a few more times. I ended up with something like this:
RunningProcess.Start();
RunningProcess.BeginOutputReadLine();
RunningProcess.BeginErrorReadLine();
while (!Completed && !ProcManager.ProcedureAborted)
{
Completed = RunningProcess.WaitForExit(ProcManager.TSK_ABORT_CHECK_TIMEOUT_MS);
}
if (ProcManager.ProcedureAborted)
{
Thread.Sleep(200);
}
200ms seemed to be sufficient in the scenario that I was working on. This approach has potential issues: behavior may be system dependent, and you're making assumptions about how much time you need to flush the buffers (i.e., you might lose output on a slower system, but nothing that you aren't already losing). You may need to play around with it to find a balance between perceivable performance issues caused by too much delay, and not processing all of the output. Again, you could try moving completely to synchronous IO, but the above approach has worked fairly well for me so far.
Hope this helps,
Heath
|
|
|
|
|
I am experienceing a problem breaking up three bytes of data into bit arrays and assigning a value to an enumeration as a result, code shown bellow:
if (UpdateLEDAndBeepStatus != null)
{
BitArray byte0 = new BitArray(commandData.Data[0]);
BitArray byte1 = new BitArray(commandData.Data[1]);
BitArray byte2 = new BitArray(commandData.Data[2]);
enumLEDAndBuzzer[] LEDAndBuzz_enumArray = new enumLEDAndBuzzer[15];
if (byte0[0] == true)
{
LEDAndBuzz_enumArray[0] = enumLEDAndBuzzer.BUZZER_STATE_ON;
}
else
{
LEDAndBuzz_enumArray[0] = enumLEDAndBuzzer.BUZZER_STATE_OFF;
}
if (byte0[1] == true)
{
LEDAndBuzz_enumArray[1] = enumLEDAndBuzzer.LED1_MCUEnable_ON;
}
else
{
LEDAndBuzz_enumArray[1] = enumLEDAndBuzzer.LED1_MCUEnable_OFF;
}
When the project gets to this stage the values in the bytes are "255".
Should that not mean all 8 bits will be true?
However my code never enters the true section of my if statement claiming "byte0[0]" is false.
Either that or i am going about checking the bit values wrong, can anyone help?
Thanx George
|
|
|
|
|
Try:
BitArray byte0 = new BitArray(new byte[] {commandData.Data[0]});
I think that what your original line does is to create a BitArray of size 255, not one of size 8 containing 255.
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.”
|
|
|
|
|
your thinking has been correct. I know so by reading the documentation, something everyone should do from time to time.
|
|
|
|
|
Luc Pattyn wrote: your thinking has been correct
That's nice to know. I shall note this rare occurrence in my diary.
Luc Pattyn wrote: I know so by reading the documentation, something everyone should do from time to time.
So did I, but without trying, or seeing, all of the OPs code, I can never be sure.
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.”
|
|
|
|
|
Yeah I often regret the declarations aren't included in the code snippet.
Henry Minute wrote: That's nice to know
NP
|
|
|
|
|
Thank you it saved me alot of time trying to work it out.
Did wonder why it said the length was 255 when running that was why.
|
|
|
|
|
Two listview are placed on the form. Then select one item in listviewA and draw it to lsitviewB , why the listViewB cannot get the OnDragDrop event.
Does any other configure need to set ?
when debuging, how to see all the message in this form?
|
|
|
|
|
AllowDrop option in the properties for the listView control must be set to True .
Regards,
Nuri Ismail
|
|
|
|
|
The AllowDrop value has been setten to true, but the program still cannot get the DragDrop message.
But the DragEnter message can be received.
|
|
|
|
|
Fired.Fish.Gmail wrote: the program still cannot get the DragDrop message.
First you have to check if you correctly set the DragDrop event handler. It's very hard to guess where is the problem without a code fragment. You can compare your code with some examples which demonstrate the Drag and Drop concept.
--> Here[^] is an example that implements exactly the Drag and Drop operations between 2 ListViews.
--> Here[^] in the example part of this documentation you will find a brief explanation of Drag and Drop concept. The provided example is about drag and drop implementation between 2 ListBox controls.
I hope this helps.
Regards
Nuri Ismail
|
|
|
|
|
Thanks Nuri
I know that can not receive the DragDrop event
because in the DragOver event, the e.Effect was set as Link.
But the AllowEffect is ALL(Copy|Move) so the DragDrop event cannot do.
|
|
|
|