Forum Replies Created

Adan Member

his sounds like a rather classical Kalman filter application. The objective is to aim at the target based on noisy sensor data. The time delays mean there’s a prediction involved.

For example, Google for: “A Simplified Approach to Understanding the Kalman Filter”

Adan Member

You cannot edit your vendor’s WSDL. Those changes have to be made from their side. You will then generate new C# web service proxy classes from the new WSDL which they publish.

If you really have to…
What you can do however, is to manually generate the C# web service client proxy manually, pointing it to the WSDL file which you have modified. You do this with the WSDL.EXE tool (Open a Visual Studio Command Line) and then use this new class in place of the one you generated by adding a service reference in your Visual Studio.

wsdl.exe PathToYourFile.wsdl /l:CS /serverInterface

Use VB or CS for your language of choice. This will create a new .cs or .vb file

NOTE: Typically, what you see in the WSDL on the url provided by your vendor is an WSDL that is automatically generated from a tool that analyses their code. As such, your changes might in fact not be supported yet by the web service that you are consuming.

Adan Member

You can store in ViewState or Session variable depend on your requirement.
ViewState is available for entire page and Session for application.

Adan Member
LblMsg.Text = HttpUtility.HtmlEncode(msg)

You need to encode your msg before inserting it into your label. It’s the thing with not trusting user input to your function.

https://msdn.microsoft.com/en-us/library/73z22y6h(v=vs.110).asp.net for further details.

Adan Member

Regardless of the semantics of what one calls “pure” C++ code, the proposed answer produces “00 AM” and “00 PM” instead of “12 AM” and “12 PM”
This can be corrected with

        oss << std::setw(2) << std::right << std::setfill('0') << (hour+11)%12+1;
        time24Hour.replace(0,2, oss.str());
        time24Hour += hour>=12?" PM":" AM";
Adan Member

I think I’ve got it! I created the program ckpw.c as shown below. I used pipe() which creates an fd array with fd[0] for input and fd[1] for output (apparently). The output of my ckpw program shows fd[0] =3, and fd[1] = 4. I used execve() to launch the checkpassword program.

I don’t really know how my real invoker (Dovecot) launches checkpassword, but this should give me a start.

Test Results:

$ ckpw
fd[0] (read): 3, fd[1] (write) 4
entered checkpassword
finished reading
15: Hello, world!
Adan Member

When you Add a variable based on a class to a list, you are not making a copy as is the case with simple variables. You simply add its address in memory to the list. By default, if you Add the same variable 20 times, you are simply having a list of 20 pointers that point to the same block of memory.

When you make a change to globals.MyErrMsgs, you are changing that single block of memory (called an instance in object terminology) and it reflects in the 20 entries in your list, because they all point to the same block of memory.

You thus need to create a new object for each of your error message:

ErrorMsgs MyErrMsgs;

MyErrMsgs = new ErrorMsgs();
case "error_messages": // Error Messages
MyErrMsgs.companyId = row.ItemArray[0].ToString().Trim().ToLower();
MyErrMsgs.errMsgId = row.ItemArray[1].ToString().Trim().ToLower();
MyErrMsgs.description1 = row.ItemArray[2].ToString().Trim();
MyErrMsgs.description2 = row.ItemArray[3].ToString().Trim();
MyErrMsgsList.Add(globals.MyErrMsgs);
MyErrMsgsList.Add(MyErrMsgs);

MyErrMsg should not be defined either as static or into the globals. MyErrMsgsList plays that role.

Notice that I have moved MyErrMsgs out of the globals. Simply define it in the method where you use it, being sure to instantiate it to a new object (call new on the variable) for each new message.

Each “new” creates a completely new object, pointing to a new block of memory, independent from the previous one. But if you’ve added that previous one to the list, the framework will keep it alive as long as the list itself lives. You’ve just used one variable to create 20 objects in memory.

Adan Member

you have to do is to give an initial value to V0 for instance: V0=-1
and then run the loop(put the whole code inside this loop)

Adan Member

THe permalink paths can be modified from queries (?p=xx) to a path structure (domain.com/date/post-title) by modifying the htaccess file.

Set the permission of the htaccess file to 777 and then chang ethe permalink structure, and WOrdpress’s admin panel will automatically re-write the .htaccess file so that the path urls work.

Adan Member

You can set up wp several different ways, but the main thing they addesss is moving a current install to a new server, not the format you selected in that install

Adan Member

Is there an error message text returned by ODBC driver? Sorry, but I can’t find error code 3151.
Anyway check that your client is using the network protocol you are supporting on the server (Named Pipes, Multi-protocol, IPX/SPX, TCP/IP). Which connection are you using – trusted, standard security or mixed. Your client must use one supported by your server. It is configurable with ODBC driver.

Adan Member

I am struggling with what is the difference – in theory – between a ‘truly’ stateful interaction and the “server-side databases” that you acknowledge exist. I know my bank knows the time of my of last interaction because the log-in times out. It may well be that the time-out happens on the client side TOO, but, again as you acknowledge, this can be circumvented by one with the right skills. I assume by bank also records my log OFF in the database, should that occur before time-out, so it knows that I am no longer logged in. What then is the distinction between this and stateful interaction? Is it that state would be kept in RAM? If so, I would say this is a distinction without a difference. But perhaps “state” is something more profound than “are you logged in?” If so, what is the definition of “state”?

Adan Member

if I instantiate the original class which has all these attributes and 5,6 methods in this class object, when I put this class object into session memory to save it so I don’t lose the attributes values when page posts back. You’re saying the session memory will only save the attributes values part of the class object? wow, never knew that before. Is there an article that you can point me to?

Adan Member

The original class with those attributes and method code is a total of 368 lines of code. Every user running this web application would only have one instance of this class object. However, let say if 20 users using this then 20 class objects would be stored in server memory, is that still okay?

Adan Member

it is not the synchronous call that is deprecated. It is the use of the Deferred object’s API with a synchronous call which is deprecated. And that only makes sense – if you have a blocking call, you do not need to trap an event when the call completes. The “handler” will be the line of code after the call.

Also, the $.ajax() call defaults to an asynchronous call. If no other config is done, then every call will be asynchronous. That also makes sense – synchronous calls are needed only in specific situations. My assertion is that this is one of them. If the script requires the return from FraudAlert() before it can continue, then it needs to wait on that return. I.e., it needs a synchronous call that blocks execution until is complete.

Viewing 15 posts - 61 through 75 (of 79 total)
en_USEnglish