|
No, not really. C# is a pretty straightforward language; it's just this small hiccup I've run into.
How do I make it switch back to the original form?
|
|
|
|
|
Nothing. You put a button on your form, give it any text you want, like "OK", and then set the forms AcceptButton property to that button.
Well, there is one line of code you have to put into the Click event handler for that button:
Me.DialogResult = DialogResult.OK
That's it.
|
|
|
|
|
Hi,
Is there a way to automate (is it exposed) Lync loading a meeting url, the way that Outlook does when you click the link inside of the meeting and it calls Lync and opens the meeting?
Lync 2013 and Outlook 2010 and C sharp.
I've been looking through the Lync SDK and I haven't found any examples of this. I have the Lync url from Exchange already, I only need to know how to pass it to Lync and get Lync to spawn a meeting with it.
Thanks
|
|
|
|
|
turbosupramk3 wrote: the way that Outlook does when you click the link inside of the meeting Outlook sends me a clickable link; right click on the link and select "copy hyperlink". Next, shellexecute the link.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Thanks Eddy, I figured out that it actually tries to use IE first, so I was able to mimic the same behavior with the following code
if (lyncUrl != "")
{
ProcessStartInfo startInfo = new ProcessStartInfo("IExplore.exe", lyncUrl);
startInfo.WindowStyle = ProcessWindowStyle.Minimized;
Process.Start(startInfo);
}
else
{
MessageBox.Show("Lync url is blank or non existant");
}
|
|
|
|
|
turbosupramk3 wrote: I figured out that it actually tries to use IE first Weird, I had expected that it would use whatever browser would be the default.
Anyway, glad it works
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
hi Boys i read more about audio finger print and goggled more about this field
but resources is limited and found more companies that make this service but matching data on there servers and no open source algorithm or Library to make this ...
i have some body called (Advertisement Provider) and he pay money for some TV station to aired his advertisement content and he need application to identify if the TV station aired his advertisement or not ....
so after searching more ... i get that the technology that can make it called (Audio Finger Print) so i need help for this :
1- need the logic that can be used to get our goals (identify the advertisement content on TV station online streaming) need ideas please .
2- need some open source libraries can use it on C# i don't need online service that create the fingerprint local and sent it to their server to find matching i need all local with support of database .
thanks for every body for help ...
|
|
|
|
|
Shouldn't this be the type of thing you're discussing with your client? Coming up with ideas for the identification is really something you should discuss with the client. I guarantee that they will have ideas about how they want this tracking - it's called gathering requirements.
|
|
|
|
|
Thanks man for your replay
but i need more ideas just it ....
|
|
|
|
|
Hello,
I get a data stream, which I write continuously via a FileStream object as a .csv . Now, however, it is necessary that I need to search this stream to redirect the output to another file by date.
Question1: How can I parse stream by Date (either the IN or OUT Stream) ? (Stream to byte [] ??)
Question2: Can I create several StreamWriter-object to write to more files?
...switch (date)
case d1 => streamwriter1,
case d2: => streamwriter2
...and so on ...
The Code:
using (ReportResponse response = utilities.GetResponse())
{
using (var fileStream = new FileStream(fileName, FileMode.Append, FileAccess.Write))
{
response.Stream.CopyTo(fileStream);
}
}
Regards
Nicole
|
|
|
|
|
Most of the question doesn't mean anything: we have no idea what format your incoming data is in (so the "Stream to byte [] ??" comment is not very helpful. And to help you parse data, we would need to know what the data looked like, and how you identify "relevant" sections (but you should be able to get that info from the source provider).
"Can I create several StreamWriter-object to write to more files?" is easier: Yes. Up to the limit on the system file handles, which varies from system to system (Linux for example only allows 64 per process by default)
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
there are comming rows like this (1 line)
78411422311 11123456319 2015-02-22 Search Network Google search Computers 2 0 0 0.0 0 1.0 0 -- 100.00%
|
|
|
|
|
So what's the problem?
If it's in lines, that's half the work done - then all you have to do is knock up a regex to parse it - which is pretty simple:
(?<Field1>\d+)\s+(?<Field2>\d+)\s+(?<Date>\d{4}-\d\d-\d\d)\s+(?<RestOfLine>.*)$ Will probably do it.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
OriginalGriff wrote: (?<Field1>\d+)\s+(?<Field2>\d+)\s+(?<Date>\d{4}-\d\d-\d\d)\s+(?<RestOfLine>.*)$ really has a certain je ne sais quoi.
|
|
|
|
|
It's the "RestOfLine" bit that does it, isn't it?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
gpc44 wrote: How can I parse stream by Date (either the IN or OUT Stream) ? (Stream to byte [] ??)
You would of course have to parse it. Convert each line to text stream, parse that line, and look for the date.
You don't need to parse it into a date object however as long as the format is fixed. As the date changes the parsed text will also be different and that is enough to differentiate.
gpc44 wrote: Can I create several StreamWriter-object to write to more files?
Of course. When the date changes (comparing current with previous) close the previous stream and open a new one. Then continue.
|
|
|
|
|
whenever i wrote code and if i smell that any error or exception may occur at run time then i use those code in try {} catch {} block and show exception related message from catch block but i like to what is the best industry standard for exception management and error handling technique?
i like to show a friendly message to user as a result any lay man could understand what problem is occurring. guide me with best practice for exception management and error handling. thanks
tbhattacharjee
|
|
|
|
|
You are not going to learn how to be a good programmer just by posting questions here. You need to go and do some studying, and then practice what you have learned. I already gave you a link to Charles Petzolds's book, which will give you a good start on the basics of .NET and C#; you really should read it. You can then follow that with some more advanced books which you can discover through Google.
|
|
|
|
|
The answer to the question is always throw exceptions.
The only exception I can think of is some file handling situations where you can get an exception - but as previously mentioned the best thing to do is read up about it and use google.
As a general tip you should not handle exceptions as by handling an exception you are running the risk of corrupting any data in your system.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
Tridip Bhattacharjee wrote: what is the best industry standard for exception management and error handling technique?
It depends on the situation.
An exception is supposed to represent an exceptional condition within the API that is being used. The caller is then responsible for determining what that exception means - to the caller.
Thus the caller can catch it and do something or not catch it all.
That is a general answer but it is further modified by what the caller is supposed to be doing. For example it is inappropriate to allow a SQL syntax error to bubble up to a UI to leave the consumer user to deal with it. But on the other hand one must tell the user that what they were trying to do didn't work. That means somewhere in the middle something must catch that exception, do something with it, and in some way relay a different error message to the user.
A common way of dealing with exceptions is to use a logging api and log it. Like everything that requires moderation and thought as well since one should probably also log other, non-exceptional information and also not log every exception because some are in fact expected (thus generally pointless to log.)
|
|
|
|
|
Well, not to mention what has already been said, but when I first started learning, I would just download OPEN SOURCE projects i could find on the internet, and just read their code. See how they figured things out and how they handled certain things throughout their application. After doing this to as many as 20 - 30 projects, I really started to get the feel of what is COMMON PLACE and what is not.
AS far as your question, i think you answered it yourself: Tridip Bhattacharjee wrote: i use those code in try {} catch {} block and show exception related message As that is what those are meant to be used for. The bigger question is "when should you use them?"
I Fart Ideas every day! It's just only once in a while one does not stink!
|
|
|
|
|
hi all,
i dont understand why memory of my application increasing here
i m just execution a for loop to check the datagridview have some values or not
int count=dataGridView2.Rows.Count - 1;
for (int g = 0; g < count; g++)
{
if (dataGridView2.Rows[g].Cells[1].Value != null)
{
}
}
please help me for this.
thanks.
|
|
|
|
|
How are you verifying that memory is increasing? What do you actually do in that missing line?
|
|
|
|
|
What makes you think it is?
What tells you the memory is increasing? How much?
And what is in the code section other than a comment:
Becasue that could be significant.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
in task manager the application increase memory continuously when i fill that datagridview.
and after some out of memory exception comes.
|
|
|
|