|
Amoxtli wrote: The request was aborted: The request was canceled.". What is wrong ? Probably something inside the web service. But since you created it then you are best placed to be able to know what it is doing.
|
|
|
|
|
Thank you for your answer. The service works fine localy in SAP test: input
<n0:zsqrt xmlns:n0="urn:sap-com:document:sap:soap:functions:mc-style">
<number>16
gives the result
-<n0:zsqrtresponse xmlns:n0="urn:sap-com:document:sap:soap:functions:mc-style">
<result>4.0E0
The code
WebRequest request = WebRequest.Create("http://guediserr.durs.si:8010/sap/bc/srt/wsdl/flv_10002A111AD1/bndg_url/sap/bc/srt/rfc/sap/zws_sqrt/200/zws_sqrt/jaojao?sap-client=200");
request.Credentials = new System.Net.NetworkCredential("GORENMI1", "tlaxcala3"); ;
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Stream dataStream = response.GetResponseStream();
StreamReader reader = new StreamReader(dataStream);
string responseFromServer = reader.ReadToEnd();
reader.Close();
dataStream.Close();
response.Close();
also gives the right WSDL content.
regards
|
|
|
|
|
So exactly how do you think anyone here can help?
|
|
|
|
|
It is very simple. Maybe someone solved similar problem and he might help me. If the mistake is in Web Service, like you said in previous post, then the problem is a little harder and I must go study it once again.
regards
Miran
|
|
|
|
|
Maybe I found the solution. Somehow, the service creates an error "The request was aborted: The request was canceled.". But if I wrap the call into While loop, I always get the result (sometimes in first loop, sometimes 5th and so on). If this is a correct solution, I still don't know, but anyway.
while (b)
{
try
{
y = root.ZSqrt(x);
b = false;
}
catch
{
b = true;
}
i++;
}
So, the problem was in Web service, like you said. Thank you.
Regards
|
|
|
|
|
But that is not a solution. You are just hiding the underlying error, and sooner or later it will jump up and bite you.
|
|
|
|
|
Aha, thanks. I'll try to find that error.
|
|
|
|
|
The PdfFileWriter library is great! I am creating a Chinese PDF file by using PdfFileWriter. But I am having trouble with it. Can anyone tell me this library can support Chinese? What's the solution? Thanks in advance!
|
|
|
|
|
Don't post this in a general forum - if you got the code from an article, then there is a "Add a Comment or Question" button at the bottom of that article, which causes an email to be sent to the author. They are then alerted that you wish to speak to them.
Posting this here relies on them "dropping by" and realising it is for them.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
I need the input strings to display unsorted first ... then call mergesort to arrange them alphabetically which I can not find any guidance with
The original merge sort works with the numbers and I understand that but getting the size of the array for names to be sorted is confusing me and wont work
private void btnExecute_Click(object sender, EventArgs e)
{
int length = Int32.Parse(Microsoft.VisualBasic.Interaction.InputBox("Enter a Number for how many Names to Sort :"));
string[] nameArray = new string[length];
foreach (string n in nameArray)
{
string name = Microsoft.VisualBasic.Interaction.InputBox("Enter " + length + " Names to add to Array:");
length = length - 1;
txtOutput.Text += name + "\r\n";
}
txtOutput.Text += nameArray.Length + "Names Added to List Unsorted ";
}
public void mergeSort(string[] nameArray, int lower, int upper)
{
int middle;
if (upper == lower)
return;
else
{
middle = (lower + upper) / 2;
mergeSort(nameArray, lower, middle);
mergeSort(nameArray, middle + 1, upper);
Merge(nameArray, lower, middle + 1, upper);
}
}
public void Merge(string[] nameArray, int lower, int middle, int upper)
{
string[] temp = new string[nameArray.Length];
int lowEnd = middle - 1;
int low = lower;
int n = upper - lower + 1;
while ((lower <= lowEnd) && (middle <= upper))
{
if ((nameArray[lower]).CompareTo(nameArray[middle]) <= 0)
{
temp[low] = nameArray[lower];
low++;
lower++;
}
else
{
temp[low] = nameArray[middle];
low++;
middle++;
}
}
while (lower <= lowEnd)
{
temp[low] = nameArray[lower];
low++;
lower++;
}
while (middle <= upper)
{
temp[low] = nameArray[middle];
low++;
middle++;
}
for (int i = 0; i < n; i++)
{
nameArray[upper] = temp[upper];
upper--;
}
}
}
|
|
|
|
|
Um.
That looks like you found some Console based code which sort-of does what you want, and (without thinking about it much at all) hacked it about to run in a WinForms app.
And now you want it fixed to do what your homework requires...
Start again: design a WinForms app that collects strings from the user and added them one at a time to a collection. Then write a merge sort that works with the collected data. You've got the framework code for the sort, it should be relatively simple to tweak.
But this is your homework: and so it's your job to do this.
And I have to say that if I was your tutor, I'd give you a failing grade for that code, even if it did work...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
yes Im learning the merge sort is the one to be altered to accept strings ... no I havent HACKED anything Im trying to learn and understand you really dont have to be as mean ablout it learning to understand it Im not asking anyone to DO it im asking for help in how to modify it as when I search everything has to do wwith ints NOT Strings
|
|
|
|
|
That's not being mean: if you had written that code you would understand it and know exactly what (trivial) changes you need to make to the merge sort to make it work with strings.
So what part of it don't you understand?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Hi,
I have a problem in this i have to execute a COBOL code in c#.net. in this COBOL code code in string format. So i just need to execute the code get the result by passing the cobol code.
suppose we have a if condition cobol code
EVALUATE TRUE
WHEN 15 > 13
MOVE ZEROS TO TEST-ADD-STATUS
WHEN OTHER
MOVE TEST-LOGO-RPT TO TEST-ADD-STATUS
END-EVALUATE
Now i want to execute this code in C#. This code generated at run time bu my system. So i need code to generic method to execute the COBOL code.
|
|
|
|
|
Im not exactely sure what you're asking, so I'll answer 3 ways
1) you could (probably) make a dot net module using https://www.gtsoftware.com/fujitsu_netcobol/[^] and your COBOL code (there must be other dot net cobol providers out there)
2) there was a free 'c' cobol library around on the net
both of those although they are a lot of work keep with the 'use cobol source' code theme - they are only practical (?affordable) if there's a lot of cobol code to (re)use
3) the last approach is transliterate your code to c# and make sure you have plenty of tests covering all the cobol edge cases
|
|
|
|
|
I know of no existing processors that can take a COBOL code snippet then compile and execute it within a C# program as (effectively) a macro language. And I can't see it being a mainstream kind of requirement!
If you really need this, I suspect you are going to have to do it yourself...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
(Login User Control) Create a UserControl called LoginPasswordUserControl that contains
a Label that displays string "Login:", a TextBox, where the user inputs a login name, a Label that displays the string "Password:" and, finally, a TextBox where a user inputs a password. LoginPasswordUserControl must provide public read-only properties that allow an application to retrieve the user inputs (i.e., login name and password). Write a driver to test LoginPasswordUserControl.
|
|
|
|
|
Yes: just follow the instructions in your homework. They really are extremely precise.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
If you can't follow that description, you're hopeless.
Hint? On that? Yeah, drop a couple of labels and textboxes on the UserControl surface and go! You're not going to get a code sample on this because there is very little code to write.
|
|
|
|
|
This is not a problem, this is a requirement, and and pretty well precise one.
The only thing you have to do is follow the instructions; so why don't you do it?
There are two kinds of people in the world: those who can extrapolate from incomplete data.
|
|
|
|
|
hi i am have an image which i would like to identify all rectangular border. does anyone know anyone know how i can do this efficiently?
an example of what i am trying to get like
0 0 0 0 0 0 0 0 0
0 1 0 0 0 1 1 0 0
0 2 2 2 2 2 2 2 0
0 2 0 0 0 0 1 2 0
0 2 0 0 0 0 0 2 0
0 2 2 2 2 2 2 2 0
0 0 0 0 0 0 1 0 0
where 1 and 2 are the same colour and 0 represents another colour
so the rectangular border i am trying to get is the rectangle coordinate of the pixel which are marked 2
|
|
|
|
|
You want to work with pixels? Go deep, deep, deep into the low-level programming, because System.Drawing [^]won't help you out.
Anyhow, how will you define a pixel to be 2, or 0, or a 1. Pixels vary in values, and even a slight different in their value would be indetectable by you, and software would provide you with a lot of unexpected results. First learn the basics, get to the intermediate level of programming then you can create an application of such logic.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
I usually stumble upon questions, which include the term "bulk" in them. Like "bulk messages". Since english is not my native language, that is why I usually get into trouble in understanding the actual purpose of the question.
So, I wanted to know, whether the blob and bulk have same meanings? Since they both denote something "large".
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
"Bulk messages" normally mean spam: either via SMS or email.
It's rarely anything that people want to receive, just product ads that the company concerned wants to send to as many people as possible, as cheaply as possible.
It's often used in questions about emails, because most web hosting services put a transmission limit on email of "nnn per hour" to prevent their systems being used as a spam source - which is often exactly what the OP is trying to do.
"blob" is a large chunk of binary data in a database context Google: Blob DataType[^] which can hold anything from basic text to a whole video file.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Blob usually means one large thing, while Bulk usually refers to a large quantity of things. See the difference?
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|