|
The problem you're observing is due to the fact you are using a backslash \ as the path separator and not the forward slash / as written in the specification. IE is being "user friendly" (DAU) and being a child of windows it also accepts backslashes. I will not rant about how MS has done a lot of harm with this irregular behaviour because IE's stupidity doesn't stop there.
Cheers!
"I had the right to remain silent, but I didn't have the ability!"
Ron White, Comedian
|
|
|
|
|
i have this error and the solutions that i found don't work.
the error is:
-------------
Error 12 Unable to copy file "obj\x86\Debug\WindowsFormsApplication1.exe" to "bin\Debug\WindowsFormsApplication1.exe". The process cannot access the file 'bin\Debug\WindowsFormsApplication1.exe' because it is being used by another process. WindowsFormsApplication1
Error 11 Could not copy "obj\x86\Debug\WindowsFormsApplication1.exe" to "bin\Debug\WindowsFormsApplication1.exe". Exceeded retry count of
10. Failed. WindowsFormsApplication1
Warning 9 Could not copy "obj\x86\Debug\WindowsFormsApplication1.exe" to "bin\Debug\WindowsFormsApplication1.exe". Beginning retry 9 in 1000ms. The process cannot access the file 'bin\Debug\WindowsFormsApplication1.exe' because it is being used by another process. WindowsFormsApplication1
Warning 8 Could not copy "obj\x86\Debug\WindowsFormsApplication1.exe" to "bin\Debug\WindowsFormsApplication1.exe". Beginning retry 8 in 1000ms. The process cannot access the file 'bin\Debug\WindowsFormsApplication1.exe' because it is being used by another process. WindowsFormsApplication1
Warning 7 Could not copy "obj\x86\Debug\WindowsFormsApplication1.exe" to "bin\Debug\WindowsFormsApplication1.exe". Beginning retry 7 in 1000ms. The process cannot access the file 'bin\Debug\WindowsFormsApplication1.exe' because it is being used by another process. WindowsFormsApplication1
Warning 6 Could not copy "obj\x86\Debug\WindowsFormsApplication1.exe" to "bin\Debug\WindowsFormsApplication1.exe". Beginning retry 6 in 1000ms. The process cannot access the file 'bin\Debug\WindowsFormsApplication1.exe' because it is being used by another process. WindowsFormsApplication1
Warning 5 Could not copy "obj\x86\Debug\WindowsFormsApplication1.exe" to "bin\Debug\WindowsFormsApplication1.exe". Beginning retry 5 in 1000ms. The process cannot access the file 'bin\Debug\WindowsFormsApplication1.exe' because it is being used by another process. WindowsFormsApplication1
...
THE SOLUTION THAT I FIND:
-------------------------
add following lines of code to the pre-build event command line of your project.
if exist "$(TargetPath).locked" del "$(TargetPath).locked"
if exist "$(TargetPath)" if not exist "$(TargetPath).locked" move "$(TargetPath)" "$(TargetPath).locked"
SECOND SOLUTION:
--------------
if exist "$(ProjectDir)bin\$(TargetFileName).locked" del "$(ProjectDir)bin\$(TargetFileName).locked"
if exist "$(ProjectDir)bin\$(TargetFileName)" if not exist "$(ProjectDir)bin\$(TargetFileName).locked" move "$(ProjectDir)bin\$(TargetFileName)" "$(ProjectDir)bin\$(TargetFileName).locked"
Can you please help me??
|
|
|
|
|
maybe it is the basic thing to say, but did you make sure the application properly shut down before compiling it?
access the task manager and in it, under processes look for anything associated with your application
also, did you try:
Build>clean solution and then Build>rebuild
Hope this Help
Eyal
|
|
|
|
|
Thank you very much!!
Your solution it works !!!
|
|
|
|
|
|
Hello all!
how do I make the computer think the mouse has performed a scroll, thus making him respond and indeed scroll across the screen?
Thanks in advance!
|
|
|
|
|
|
Hi fellows,
I have to resolve the following problem: how can I create a MP4 video file from a bunch of images (jpg, gif, tiff or bmp)? Can somebody help me?
Thanks!
|
|
|
|
|
It's called a "slideshow".
There are many products out there (freeware and for $10+) that will take "pictures" and make a "movie".
If you're not particular about the final format, you can even use "Windows MovieMaker" (and use a MP4 converter after-the-fact if necessary).
Odds are, you may alread have other "movie maker" software on your PC if you use HP or Canon products.
Just Google: slideshow mp4
|
|
|
|
|
I don't want to buy one or to get one. I want to develop one.
|
|
|
|
|
If you would have added C# to the Google search it would have given you the answer.
|
|
|
|
|
Is this the answer to my problem, to google for some key words? Smart answer. So, we can throw away such kind of forums and use only google search. Thanks for the useful answer, it helped alot.
|
|
|
|
|
|
|
Good Morning,
I have a C# desktop application in VS10. I want to able to use an online search engine to retrieve information. I use the following code to call a webpage from the desktop:
string getPage = "http://www.theWebpage.com/";
System.Diagnostics.Process.Start(getPage);
Once I am on that page, I want to pass the information from a textbox on my application directly to a search box on the webpage. Now, I can obviously do this by cutting and pasting the info into the webpage, but what I was wondering if I can have it load the info into the search box automatically when the page loads. The closest I can come now is to automatically copy the info from the textbox using the copy function, but that still requires to user to click and paste. I know how to do this from webpage to webpage but I have never done it from a desk application before. Can it be done? Thank You...Pat
|
|
|
|
|
PDTUM wrote: string getPage = "http://www.theWebpage.com/";
System.Diagnostics.Process.Start(getPage);
string getPage = "http://www.thewebpage.com/?=" + LabelName.Text;
Edit: Added missing "=" sign and put code in code block.
Frazzle the name say's it all
Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.
John F. Woods
modified 29-Mar-13 8:12am.
|
|
|
|
|
Hello programmers, I am still green programmer.
I got a task to which I have encoded information and
present all information a total of eight characters
I can not think and can not find any alternatives appeal to you
can you help me?
Yours sincerely Modestas
|
|
|
|
|
Start here[^], and also here[^].
Use the best guess
|
|
|
|
|
Maybe this should be in the algorithms forum?
Are you talking about using some sort of hashing algorithm to represent things as an eight character string?
|
|
|
|
|
PIEBALDconsult
Thanks for the offer. This is something like what you are saying.
8 length string has to show all the information.
Thanks again.
|
|
|
|
|
That doesn't really offer any more detail.
|
|
|
|
|
Encode your information in a text file on the web, then use tinyurl.com to get an 8-character url reference to it.
|
|
|
|
|
Hi Braniacs
I have a performance optimization problem that has been bothering me for some time. I have tried to squeeze more performance from it without much success.
The system (simplified) is as follows:
1) Requests come in over an HTTP Post (I need to respond syncronously / inline)
2) I process the request, and return a response (all xml)
3) If I do not have a result ready within 15 seconds, I respond with a 'server busy, try later' type message.
As the central message processing mechanism I have used a Task based approach to queue, start and wait for messages (max of 15 seconds)
When a message is processed almost instantanesouly, the throughput (requests per second) is quite good (1000/s). However, when message processing is delayed by 200ms, this
degrades rather badly to 40/s
A few snippets:
public void AddMessage()
{
Task.Factory.StartNew<MessageResponse >(() =>
{
return worker.ProcessMessage(),
,
TaskCreationOptions.None);
}
public MessageResponse GetMessage()
{
task.Task.Wait(15 * 1000);
switch (task.Status)
{
case TaskStatus.Running:
message = "Your request is taking longer than usual"
case TaskStatus.RanToCompletion:
message = (MessageResponse)task.Result;
}
return message;
}
Note:
Task creation options None / Longrunning / PreferFairness has no impact. When running the visual studio performance analyser, I can visually see Longrunning creating a new thread for each request (expected), and None using a limited number (underlying threadpool) to service the requests.
Looking at both ANTS performance profiler and Visual studio Performance analyzer, there are no concurrency issues around contention and no other obvious areas where time is being wasted (either cpu time or wall clock time)
What is clear from the visualized results is that in a situation where say 1000 requests are queued, 90% of the program time is spent on thread servicing and context switching (obviously very expensive). My conclusion is that waiting on the result (over multiple requests) is very costly.
If i doing this on a web page or WPF form I could make it completely asyncronous, however I dont have this option.
Is there any where I can alter the message processing mechanism to optimize concurrency better? I am open to anything really , would even explore async / await if it would benefit.
Thanks in advance
|
|
|
|
|
my main problem is when i add dynamically a progressbar on flowLayoutPanel1 for each request then how can i increase right progressbar value frombackgroundWorker1_ProgressChanged event
when user click on start button then i will call RunWorkerAsync function of background worker....it is fine. here i am writing a sample code and try to show my problem.
my form has one textbox, one button and one flowLayoutPanel1 with FlowDirection topdown.
when user enter any url in textbox and click on start button then i will start file download with BackGroundWorker and add one progress bar dynamically on flowLayoutPanel1. 10 file can be downloaded at a time. so when user enter ten url one after after one and click on submit button then ten file will be downloading in background.
my problem is how to increment 10 progress bar progress properly from backgroundWorker1_ProgressChanged event another issue is when any file download will complete then the progress bar for which it has been created will be removed from panel
here is my full code. please have a look and tell me what i need to do to achieve my task. if anyone see there is problem in my code for which a dead lock may appear then also please guide me how to avoid dead lock. here is my code
public partial class Form1 : Form
{
static int pbCounter = 1;
public Form1()
{
InitializeComponent();
}
private void btnStart_Click(object sender, EventArgs e)
{
ProgressBar pb = new ProgressBar();
if (pbCounter <= 10)
{
pb.Width = txtUrl.Width;
flowLayoutPanel1.Controls.Add(pb);
pbCounter++;
System.ComponentModel.BackgroundWorker backgroundWorker1 = new System.ComponentModel.BackgroundWorker();
backgroundWorker1.DoWork += new DoWorkEventHandler(backgroundWorker1_DoWork);
backgroundWorker1.RunWorkerCompleted += new RunWorkerCompletedEventHandler(backgroundWorker1_RunWorkerCompleted);
backgroundWorker1.ProgressChanged += new ProgressChangedEventHandler(backgroundWorker1_ProgressChanged);
backgroundWorker1.RunWorkerAsync();
}
}
private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
{
System.ComponentModel.BackgroundWorker worker = sender as System.ComponentModel.BackgroundWorker;
}
private void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
if (e.Error != null)
{
MessageBox.Show(e.Error.Message);
}
else if (e.Cancelled)
{
}
else
{
pbCounter--;
}
}
private void backgroundWorker1_ProgressChanged(object sender, ProgressChangedEventArgs e)
{
this.progressBar1.Value = e.ProgressPercentage;
}
}
tbhattacharjee
|
|
|
|
|
Hi,
I updated your code and it should work, but I didn't test it, so you have to try it out.
public partial class Form1 : Form
{
static int pbCounter = 1;
int counter = 0;
public Form1()
{
InitializeComponent();
}
private void btnStart_Click(object sender, EventArgs e)
{
ProgressBar pb = new ProgressBar();
if (pbCounter <= 10)
{
pb.Tag = counter++;
pb.Width = txtUrl.Width;
flowLayoutPanel1.Controls.Add(pb);
pbCounter++;
System.ComponentModel.BackgroundWorker backgroundWorker1 = new System.ComponentModel.BackgroundWorker();
backgroundWorker1.DoWork += new DoWorkEventHandler(backgroundWorker1_DoWork);
backgroundWorker1.RunWorkerCompleted += new RunWorkerCompletedEventHandler(backgroundWorker1_RunWorkerCompleted);
backgroundWorker1.ProgressChanged += new ProgressChangedEventHandler(backgroundWorker1_ProgressChanged);
backgroundWorker1.WorkerReportsProgress = true;
backgroundWorker1.RunWorkerAsync(counter);
}
}
private void backgroundWorker1_DoWork(object sender, DoWorkEventArgs e)
{
System.ComponentModel.BackgroundWorker worker = sender as System.ComponentModel.BackgroundWorker;
worker.ReportProgress(<percentToReport>, e.Argument);
e.Result = e.Argument;
}
private void backgroundWorker1_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)
{
if (e.Error != null)
{
MessageBox.Show(e.Error.Message);
}
else if (e.Cancelled)
{
}
else
{
pbCounter--;
ProgressBar barToRemove = null;
foreach (object control in flowLayoutPanel1.Controls)
{
ProgressBar bar = control as ProgressBar;
if (bar != null && bar.Tag == e.Result)
{
barToRemove = bar;
break;
}
}
if (barToRemove != null)
{
flowLayoutPanel1.Controls.Remove(barToRemove);
}
}
}
private void backgroundWorker1_ProgressChanged(object sender, ProgressChangedEventArgs e)
{
foreach(object control in flowLayoutPanel1.Controls)
{
ProgressBar bar = control as ProgressBar;
if (bar != null && bar.Tag == e.UserState)
{
bar.Value = e.ProgressPercentage;
break;
}
}
}
}
Hope this helps,
Thomas.
|
|
|
|