|
Sorry, I don't know; try a Google search or some of the CodeProject articles[^].
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
Can anyone help me on this:
I was trying to access my IP camera and used the following code
string sourceURL = "ipaddress";
byte[] buffer = new byte[100000];
int read, total = 0;
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(sourceURL);
req.Credentials = new NetworkCredential("username","password");
WebResponse resp = req.GetResponse();
Stream stream = resp.GetResponseStream();
while ((read = stream.Read(buffer, total, 1000)) != 0)
{
total += read;
}
Bitmap bmp = (Bitmap)Bitmap.FromStream(
new MemoryStream(buffer, 0, total));
but when i compiled the code, the following message will be displayed what can I do to solve this?
"Grab Error: System.Net.WebException:The remote server returned an error:(400)Bad request. at System.Net.HttpWebRequest.GetResponse()"
Thanks for your help.
|
|
|
|
|
sourceURL is not a valid URL. That's one of the possibilities.
"Bastards encourage idiots to use Oracle Forms, Web Forms, Access and a number of other dinky web publishing tolls.", Mycroft Holmes[ ^]
|
|
|
|
|
I would appreciate a little more detail please,
let's say my ip camera address is 192.168.10.15
so I used string sourceURL = "http://192.168.10.15/nphMotionJpeg?Resolution=320x240&Quality=Standard";
so where exactly might be the problem..
Thanks again.
|
|
|
|
|
Can you check if the URL and request parameters that you are providing are valid?
"Bastards encourage idiots to use Oracle Forms, Web Forms, Access and a number of other dinky web publishing tolls.", Mycroft Holmes[ ^]
|
|
|
|
|
Do you mean that the source address(URL),user name and password that I used is valid? If yes.
Then i can access my ip camera using the given address in my browser literally
Thanks again
|
|
|
|
|
Hi Tg?
use (string sourceURL = "http://192.168.10.15/en/AViewer.html?codec=jpeg";) instead of (string sourceURL = "http://192.168.10.15/nphMotionJpeg?Resolution=320x240&Quality=Standard";)
|
|
|
|
|
In a C# 2008 desktop application, I can using the following statement to select error reports that are displayed on excel spreadsheets:
string[] excelFiles = Directory.GetFiles(strFullpath, "*ErrorReport.xlsx")
.Select(path => Path.GetFileName(path))
.ToArray();
Due to the above, I have the following questions:
1. if I want to change the statement to select either "*bErrorReport.xlsx" or "*dErrorReport.xlsx" or "*ErrorReport.xlsx",
how would I change the statement I just displayed?
2. The above statement picks 3 excel spreadsheets and there are really only two excel spreadsheets. The excelspreadshets that are valid
include:
customer_number_bErrorReport.xlsx,
and customer_number_ErrorReport.xlsx.
The invalid value that is selected is
~customer_number_bErrorReport.xlsx.
Can you show me the code, so an invalid spreadsheet called ~customer_number_bErrorReport.xlsx is not selected?
|
|
|
|
|
In stead of Select , you can use Where and filter the file names there.
"Bastards encourage idiots to use Oracle Forms, Web Forms, Access and a number of other dinky web publishing tolls.", Mycroft Holmes[ ^]
|
|
|
|
|
Thanks! How do you mark that the question was answered?
|
|
|
|
|
dcof wrote: Can you show me the code, so an invalid spreadsheet called ~customer_number_bErrorReport.xlsx is not selected?
The LINQ is not required here; one can filter the required names by giving a filter-parameter to the GetFiles method[^].
public static string[] GetFiles(
string path,
string searchPattern,
SearchOption searchOption
)
|
|
|
|
|
|
It's like keylogger but I only want to know how many times they pressed the keyboard each day.
I'm doing it in windows form.
I'd love to have some help or at least what to type in google.
Edit :
Thank's to this[^] article.
modified 17-Jan-13 1:39am.
|
|
|
|
|
|
I'm going to join this keylogging into my chatting application so my friend chat less and work much more.
They'll be able to know how many letters they typed in a day.
Is that a bad idea?
I've searched everywhere in google and tried in new project but still can't.
You can see my history of question, I ask when I don't know what to do.
|
|
|
|
|
Then you aren't looking for what you said originally. Within your app you could do that, but then why would your friend use it? And mightn't he type in Notepad and then paste to your app?
Whatever you do, you won't get what you want anyway.
Just tell your friend to get back to work.
|
|
|
|
|
|
Midnight Ahri wrote: This is to make them enjoy working.
Doesn't sound like it.
|
|
|
|
|
> It's only for 3 of my friend.
> This is to make them enjoy working.
Smacks of "the floggings will continue until morale improves".
I think you may soon have 3 fewer friends if you go ahead with this.
You can't make people enjoy working, but it's easy to make them not enjoy working...
|
|
|
|
|
Do you know anything about me? Hint : Nothing
|
|
|
|
|
I never claimed to, but I'm learning things about you quickly.
You go ahead - I'm sure your 'friends' will enjoy their work much more knowing their keystrokes are being logged.
|
|
|
|
|
You should've told me about this earlier.
I'm a programmer in this company and nothing much to do.
I won't and not going to do something useless for them if they didn't ask.
This application is what they want, not me.
I'm angry because I can't fullfill what they want.
Sorry for misunderstanding.
Oh ya, I didn't log their key, I only count how many times they typed.
|
|
|
|
|
Soooo...how are you going to tell the difference between them working and screwing around?? Hint: You can't.
|
|
|
|
|
Midnight Ahri wrote: Is that a bad idea?
Yes. You'll need to inform the victim that he/she is being monitored, otherwise you're in a heap o' legal trouble.
Second, it's bad advertisement; I would never work for someone who does not trust me. That's non-negotiable, there's no "working together" without trust.
Midnight Ahri wrote: I'm going to join this keylogging into my chatting application so my friend chat less and work much more.
What you consider "idle chatting" might be valuable research my friend.
|
|
|
|
|
Eddy Vluggen wrote: You'll need to inform the victim that he/she is being monitored, otherwise
you're in a heap o' legal trouble
That depends on the context.
|
|
|
|