The servlet determines whether the user entered the correct CAPTCHA

Source: Internet
Author: User

And a more serious problem is that when the animation runs out, it stops. and loading animation should be circular, after consulting the document and animated source code, did not find similar loops such a control loop properties, helpless under, can only be a way out.

As mentioned above, the Start method of the animated animation can execute the callback function after the animation is completed, and if the animation executes itself after execution, the loop is implemented, so the animation is encapsulated into a function, then the loop calls itself, but now the animation is only the height of the shorter, There is no re-high part, so even if the loop does not work, the animation part needs to be fixed:

Now in the Player object's play method, we can call playerdidstartplaying through the Proxy property: method, any object that uses the player class, can obey the proxy protocol, You can implement a custom playerdidstartplaying: method, the Player class still maintains its universality and independence, convenient for the external service. Proxies are very powerful tricks that Apple itself often uses. For classes like Uitextfield, sometimes you might want to group several different methods into separate protocols, such as uitableview--, which not only has an agent (delegate), but also a data source (DataSource).

Now, let's review the program itself, only the basic operation is not enough, in order to carry out practical operation, we need to control the process of the operation. The most basic of process control is conditional execution, that is, some operations can only be performed when certain conditions are met, perform some operation under some conditions, and perform some other operation under some other conditions. This is similar to the red light stop in traffic control and the Green Line condition execution.

Set the verification code in the index.jsp, when the user clicks the verification code, calls the JS code to request the server to obtain the new verification code. Because the servlet that generated the verification code above is cached by the browser, the JS code needs to give the servlet a random parameter so that the browser sends a request to the server for a new verification code instead of going to the cache to read.

The servlet determines whether the user entered the correct CAPTCHA

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.