|
Developer tool means Webbrowser developer tool including Elements, Network, Sources, Timeline, ... , Console.
|
|
|
|
|
GeckoFX is nothing but a wrapper for the Gecko Web browser. If the Gecko browser doesn't support this stuff, you can't use it. Simple.
|
|
|
|
|
Hi,
I have this method:
public ActionResult GetPdf(string filename)
with this return statment:
return File(data, "application/pdf");
How can I store the result coming back from the above method into this array:
byte[] Data
Thanks
|
|
|
|
|
Depending on the type of data here:
return File(data, "application/pdf");
..it's either the File-method that returns a FileStreamResult[^] or the File-method that returns a FileContentResult[^] (see Controller.File(..)[^]).
If it's a FileContentResult you can get the byte-array from its property FileContents[^]. If it's a FileStreamResult you can get a byte-array by using the method Stream.Read(..)[^] to read the stream contents into a pre-allocated byte-array.
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
|
|
|
|
|
how can create chat box using asp.net
|
|
|
|
|
Please do some basic research yourself before posting a question. Googling for create chat box asp.net[^] gives tons of results where you should find some which could serve you as a starting point. If you run into a specific problem feel free to come back and ask for help.
If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson
|
|
|
|
|
I am trying to download a file or report from a website (URL) to which it requires authentication. i am attaching the image in which it pops up for me when i try to access through browser. Is it possible to login to that URL and download the file by passing the username and password. if so any one help me out how can it be done.
here is the link for the image
http://postimg.org/image/93sio456t/
Thanks,
Jagadeesh.
|
|
|
|
|
Google is your friend: Be nice and visit him often. He can answer questions a lot more quickly than posting them here...
A very quick search gave over 400,000 hits: Google "automate login to website c#"[^]
In future, please try to do at least basic research yourself, and not waste your time or ours.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Hi
Iam using VS-2010. Windows Applications. The below codes to save the report as PDF in c#...But I wish to save the particular part of report as PDF...
Note:
Suppose My report contains 4-Copies with 8 pages, my intention is to save only the
"Transporter Copy" as mentioned in Report Header area.
Is it possible to save only the particular copy of reportviewer's report...?
Thanks
My Codes
byte[] Bytes = Reportviewer1.LocalReport.Render(format:"PDF",deviceInfo:"");
using (FileStream stream = new FileStream("C:\MyFolder", FileMode.Create))
{
stream.Write(Bytes, 0, Bytes.Length);
}
|
|
|
|
|
|
Dears C# professional
How can I read RAW image format block by block in binary mode?
|
|
|
|
|
RAW is not a format, it's a name for a thousand proprietary formats and a couple of standardized ones.
Anyway, you'll probably want a BinaryReader.
|
|
|
|
|
Dear Harold
I know what you mean, raw is a picture that unprocessed yet. How can I use BinaryReader? could you give me some example?
Thanks.
|
|
|
|
|
Just make a new binary reader, giving it some stream as input (probably a file stream in this case), maybe like this: (not tested)
using (BinaryReader r = new BinaryReader(File.OpenRead("foo"))
{
And then just start pulling out data,
uint width = r.ReadUInt32();
uint height = r.ReadUInt32();
int[] pixels = new int[width * height];
for (int i = 0; i < pixels.Length; i++)
{
pixels[i] = r.ReadByte() + r.ReadByte() * 256 + r.ReadByte() * 65536;
}
}
Except of course your format will be more complicated.
You may need a different solution, for example if the format is a bitstream then BinaryReader won't help.
|
|
|
|
|
|
i have written code in c# for USB read and write using WINUSBNET library,after some time my device automatically un-plugged by OS and program exit with error code.
Managed (v4.0.30319)' has exited with code 0 (0x0).
|
|
|
|
|
i need help trying to get my ai to have basic convosations so if i say hello it will reply and say hello how are you and then i would say good but its not working
|
|
|
|
|
Member 11780399 wrote: but its not working You need to explain what that means if you want people to help you. No one can guess what your code is doing.
|
|
|
|
|
If it's not working, and it compiles, you have a logic error somewhere. If it won't compile, you have some form of syntax error. Beyond that level of information, we cannot help you because you have provided no details whatsoever.
|
|
|
|
|
In C# 2005, I used the Nokia E63, I want to check SerialPort Exist Modem, While it run does not get run COM port, you see my code
private void btnGetPort_Click(object sender, EventArgs e)
{
cmbPort.Items.Clear();
foreach (string portName in SerialPort.GetPortNames())
{
try
{
using (SerialPort sp = new SerialPort(portName, 9600))
{
if (!(sp.IsOpen)) sp.Open();
sp.DiscardInBuffer();
sp.DiscardOutBuffer();
sp.Write("AT\r\n");
System.Threading.Thread.Sleep(100);
string response = sp.ReadExisting();
if (response == "OK")
{
cmbPort.Items.Add(portName);
}
}
}
catch (Exception ex)
{
continue;
}
}
}
|
|
|
|
|
We can't really help you based on that little: but I'd guess that sleeping the thread for 100ms is not a good idea.
That's only 1/10th of a second, and at 9600 baud that's not a lot of characters - about 96 in total.
9600 baud == 9600 bits per second ~= 960 characters per second == 96 characters in 1/10th second.
So unless the data goes out quickly, the modem responds quickly, and there is no other data returned such as a "welcome" or "status" message it's quite likely that the response may be just getting lost, because you aren't giving it enough time to talk back to you.
There is also the swallowing of all errors so you don't know what problems there are.
And the high probability that the modem doesn't just return "OK" - as a minimum it's probably going to put a carriage return / line feed pair, and quite likely to echo the input back to you as well.
And it may well need flow control (RTS/CTS and DCD), or even the bits per character and parity set correctly.
So start with the debugger and look at exactly what is happening. What are you getting back? Anything? Nothing? We can't do it for you!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
According to you how much have I to put Thread.Sleep(???) to run for 9600 baud ? can I put Thread.Sleep(800) to run 9600 baud ?
|
|
|
|
|
|
No, sorry - we can't.
What I might think of as a "good project" you might think boring, simple, or hideously complicated. We don't know anything about your interests, skills, or abilities - so we can;t just say "try this" because we have no idea what would be relevant to you, or what you know that you can use to get the project moving. Let alone what projects you have completed already!
For example, if I recommend you start with a project requiring a lot of database work - but you know nothing about database - what use is that to you?
And we don't know what you want to use the project for either: practice? Hand in as part of your course? What course?
Sit down, think about the reasons for doing the project, and what you know about, and try to come up with something that fits in there, and with your interests.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
I want to be able to delay windows power events, through a windows service that will be running in the background. I need to delay these events, such as shutdown, restart, etc. a few seconds, so that I can perform an operation before the pc goes into any of these events.
Can someone please guide me in the right direction?
Thanks.
|
|
|
|